Databases: structure, keys and forms Cambridge IGCSE Information & Communication Technology revision
Not started
Learn it
In plain words
A database is an organised collection of data. Before any data goes in, its structure has to be designed: what tables there are, what fields each has, what type of data each field holds, and how the tables are linked.
7 things to know
- A table holds data in records (rows) and fields (columns).
- Data types: text (also called alphanumeric), numeric (integer, decimal or currency), date/time, and Boolean (also called logical), which has two values, such as yes and no. A Boolean field can be shown as yes/no, true/false or a checkbox.
- A flat file database is a single table. It is simple to set up, but the same data is often repeated in many records, which wastes storage and leads to mistakes when it is changed.
- A relational database has two or more tables that are linked. Each item of data is stored once, so there is less duplication, and a change made in one place applies everywhere. It is more complex to design.
- A primary key is a field that uniquely identifies each record in a table.
- A foreign key is a field in one table that is the primary key of another table. It is what links the two tables.
- A good data entry form has a clear title and labels, fields in a logical order, boxes of a suitable size, drop-down lists and tick boxes to reduce typing, clear navigation buttons and enough white space.
Worked example
A library has a Books table (with BookID) and a Loans table that records which book was lent to which member. How are the tables linked?
- BookID is the primary key of the Books table: it identifies each book.
- The Loans table has a BookID field too. There it is a foreign key.
- The foreign key links each loan to one record in the Books table, so the book's details are not repeated in every loan.
Tips and tricks
- A telephone number is text, not numeric: no arithmetic is done with it, and a leading zero must be kept.
- Primary key: unique in its own table. Foreign key: a primary key from another table, used as the link.
It lands in your notebook with its questions as flashcards.
Databases: structure, keys and forms: 6 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
What is a primary key?
No two records can share its value.
Which data type suits a field recording whether a fee has been paid?
It has two values: yes or no.
Which data type should be used for a telephone number?
Leading zeros would be lost in a numeric field.
What is a flat file database?
Data is often repeated in it.
What does a foreign key do?
It holds the primary key of the other table.
Which is a feature of a good data entry form?
Choosing from a list prevents spelling errors.
Quiz
6 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
3 questions, 6 marks. Write your answers on paper, then check them.
Databases: structure, keys and forms
Cambridge IGCSE Information & Communication Technology 0417 · 6 marks · papermunch.org
Name ______________________________ Date ______________
Give two advantages of a relational database compared with a flat file database.[2]
Show answerHide answer
Data is not duplicated, so less storage is used. Data only has to be changed in one place, so it stays consistent.
Describe the difference between a primary key and a foreign key.[2]
Show answerHide answer
A primary key is a field that uniquely identifies each record in its table. A foreign key is a field that is the primary key of another table, and links the two tables.
State two features of a well-designed data entry form.[2]
Show answerHide answer
Clear labels for each field. Drop-down lists or tick boxes to reduce typing errors. (Also: a logical order of fields, navigation buttons.)
Answers: Databases: structure, keys and forms
- 1. Data is not duplicated, so less storage is used. Data only has to be changed in one place, so it stays consistent.
- 2. A primary key is a field that uniquely identifies each record in its table. A foreign key is a field that is the primary key of another table, and links the two tables.
- 3. Clear labels for each field. Drop-down lists or tick boxes to reduce typing errors. (Also: a logical order of fields, navigation buttons.)



