Databases: records and fields
Computer Science · Key Stage 2 · The School
Records and fields
A DATABASE stores information in an organised way. Each RECORD is one entry. It could be one book, one pupil, or one product. Each FIELD is one piece of information about that entry. Title, author and year are all fields. Every record in a database shares the same set of fields. A library with ten thousand books stores every book the same way. That shared shape is what makes searching and sorting possible.
Searching a database
A library database can be searched by author, by title, or by year. A search for "Author = Rowling" returns only matching records. It does this however many thousands of other records exist. Searching a well-built database is far faster than checking books one at a time. A search that would take a person hours can take a computer a fraction of a second. This stays true however large the database grows.
Sorting a database
The same records can be SORTED in different orders. Alphabetically by title. By year published. Or by author surname. Sorting does not remove or change any record. It just changes the order they are shown in.
Designing fields for a new database
A database for a school library needs several fields: title, author, year, and whether it is currently on loan. Missing a needed field, like "on loan", means a useful question can never be answered later. Deciding the fields carefully, before entering any records, saves work later. Adding a missing field once hundreds of records already exist is a much bigger job. Every one of those existing records would need updating by hand.