Databases: Tables and Records
A database is an organized collection of related data. We learn about tables, fields, records and key fields, as well as sorting and filtering.
All topics (5 of 11)
Chapter 1. Spreadsheets
Chapter 2. Databases
Chapter 3. Computer Networks and the Web
Chapter 4. Number Systems
A database is an organized collection of related data. A list of books in the school library, a class register or a shop’s product records are all examples. Databases are created and managed with database management systems (DBMS), for example Microsoft Access, LibreOffice Base or PostgreSQL.
Data in a database is stored in tables. Each column of a table is called a field and holds one characteristic, such as a name or a date of birth. Each row is a record, which contains all the data about one object, for example one student.
A data type is set for every field: text, whole or decimal number, date, or a yes/no value. This reduces mistakes: you cannot type a word into a date field. To tell records apart clearly, a key field with values that never repeat is used, for example a student’s ID number, because names may be the same.
The advantage of a database is finding the information you need quickly. Records can be sorted by a field (for example, names in alphabetical order), filtered (for example, showing only 8th grade students) and searched with queries. Data is entered once and then used many times in different ways.
Key takeaways
- A database is an organized collection of related data.
- A table column is a field and a row is a record.
- A data type is set for each field.
- A key field tells records apart.
- Sorting, filtering and queries help find the data you need quickly.
Practice tasks
- In your notebook, draw the structure of a “Library” table with the fields book title, author, year of publication and number of copies; write a suitable data type for each field.
- In a database program (or an ordinary spreadsheet), create a table of 6 student records with the fields ID number, name, class and date of birth.
- Sort the table by name in alphabetical order, then set a filter that shows only the students of one class.
Review questions
Test yourself: think first, then reveal the answer.
1What are a field and a record in a database?Show answerHide answer
A field is a table column (one characteristic); a record is a table row (the data about one object).2Why is a key field needed?Show answerHide answer
It clearly distinguishes each record from the others, because its values never repeat.3What is filtering?Show answerHide answer
Showing only the records of a table that meet a given condition.
0 of 11 topics completed
Sign in to mark