Practice Questions
OxfordAQA IGCSE Computer Science (9210): Relational databases – Practice Questions
Original OxfordAQA IGCSE Computer Science 9210 practice questions with answers on tables, records, fields, keys, data types, redundancy and inconsistency.
- Subject
- Computer Science
- Level
- IGCSE
- Topic
- Topic 7: Relational databases and structured query language (SQL)
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to OxfordAQA IGCSE Computer Science (9210), For teaching from September 2017, exams from May/June 2019. Official specification .
Syllabus page (what it covers and how it is assessed): OxfordAQA IGCSE Computer Science.
Syllabus points this page covers
9210
- 3.7.1 Relational databases
This page covers 1 of the 3 subtopics in topic 7, Relational databases and structured query language (SQL).
Found an error? Report a correction.
Need help with this topic? Request a free trial class for IGCSE Computer Science (9210).
These are original questions written for Marlbridge, for revision and practice on this content. They are not reproduced past-paper questions, and they do not replicate the exam’s exact structure, question count or mark tariffs; examination boards hold copyright in their own papers. Use these alongside the official past papers available free from your board.
Related: Relational databases study guide | Relational databases revision notes
These questions cover section 3.7.1 Relational databases of the OxfordAQA International GCSE Computer Science (9210) specification.
A shop uses a database with two tables.
Customer
| CustomerID | Name | Town |
|---|---|---|
| 11 | Ruth Adams | Bolton |
| 12 | Sam Patel | Derby |
| 13 | Lee Chen | Bolton |
Purchase
| PurchaseID | CustomerID | Item | Quantity | Delivered |
|---|---|---|---|---|
| 501 | 12 | Lamp | 1 | True |
| 502 | 11 | Desk | 2 | False |
| 503 | 12 | Chair | 4 | True |
| 504 | 13 | Lamp | 2 | False |
Section A
1. State what is meant by a database. [1]
2. State what is meant by a relational database. [2]
3. Use the Purchase table to give an example of each of the following.
(a) a record [1]
(b) a field [1]
4. State what is meant by a primary key. [2]
5. State what is meant by a foreign key. [2]
Section B
6. Identify the primary key of each table and the foreign key in the Purchase table. [3]
7. State the most suitable data type for each field in the Purchase table: Quantity, Item and Delivered. [3]
8. A designer suggests that the Name field of the Customer table should be the primary key. Explain why this is a poor choice. [2]
9. The shop wants to store a customer’s telephone number. Choose a suitable data type and explain your choice. [2]
10. Another designer suggests using one table instead, with the fields PurchaseID, Name, Town, Item, Quantity and Delivered.
(a) Explain how this design would lead to data redundancy. [2]
(b) Explain how it could lead to data inconsistency. [2]
(c) Explain how the two table design avoids these problems. [3]
11. Sam Patel moves from Derby to Leeds. State how many records would need to be changed in the single table design and how many in the two table design, and explain the benefit of the relational design. [3]
12. A new Purchase record is entered with the CustomerID 19, but there is no customer with the CustomerID 19 in the Customer table. Explain why this is a problem. [2]
13. State two advantages, other than reducing redundancy and inconsistency, of storing data in a database instead of in separate paper lists. [2]
Answers
1. An organised collection of data that is stored so that it can be searched, updated and shared [1].
2. A database in which the data is stored in several tables [1] that are linked together by key fields [1].
3. (a) Any one whole row, for example 503, 12, Chair, 4, True [1]. (b) Any one column name, for example Item [1].
4. A field [1] whose value uniquely identifies each record in the table [1].
5. A field in one table [1] that is the primary key of another table, and so links the two tables [1].
6. Customer: CustomerID [1]; Purchase: PurchaseID [1]; foreign key: CustomerID in Purchase [1].
7. Quantity: integer [1]; Item: text (string) [1]; Delivered: Boolean [1].
8. Two customers could have the same name [1], so the field might not uniquely identify each record, which is required for a primary key [1].
9. Text (string) [1]; a telephone number is not used in calculations and may start with a zero, which an integer would remove [1].
10. (a) The customer’s name and town would be repeated in every purchase that the customer makes [1]; for example Sam Patel and Derby would appear in both PurchaseID 501 and 503 [1]. (b) The same customer could be entered with different spellings or different towns in different rows [1], so the data would disagree [1]. (c) The customer’s details are stored once in the Customer table [1]; each purchase holds only the CustomerID [1], so there is no repeated data and the details cannot differ between records [1].
11. Single table: 2 records (Sam Patel appears in purchases 501 and 503) [1]; two table design: 1 record, in the Customer table [1]; the town is stored in one place only, so no purchase can be left showing the old town and the data stays consistent [1].
12. The foreign key value does not match any primary key in the Customer table [1], so the purchase refers to a customer who is not recorded, and the link between the tables is broken [1].
13. Any two from: data can be searched and sorted quickly [1]; many users can use the same up-to-date data at once [1]; data is stored in a structured way so it is easier to keep accurate [1]; it takes up less space than separate lists [1].
Where marks are usually lost
- Describing a foreign key without saying that it is the primary key of another table.
- Mixing up redundancy and inconsistency in Question 10.
- Choosing a name as a primary key.
- Writing that a field is a row, or a record is a column.
- Choosing integer for a telephone number.
Related resources
-
Revision notes
OxfordAQA IGCSE Computer Science (9210): Relational databases – Revision Notes
Revision notes for OxfordAQA IGCSE Computer Science 9210 section 3.7.1: database terms, keys, data types, redundancy and inconsistency, with a self-test.
Computer Science · OxfordAQA · IGCSE
Revise topic -
Study guides
OxfordAQA IGCSE Computer Science (9210): Structured Query Language (SQL) – Study Guide
Study guide to OxfordAQA IGCSE Computer Science 9210 section 3.7.3: SELECT, FROM, WHERE, INSERT INTO, UPDATE and DELETE FROM, with worked queries and outputs.
Computer Science · OxfordAQA · IGCSE
Read guide -
Practice questions
OxfordAQA IGCSE Computer Science (9210): Structured Query Language (SQL) – Practice Questions
Original OxfordAQA IGCSE Computer Science 9210 practice questions with answers on SQL SELECT, FROM, WHERE, INSERT INTO, UPDATE and DELETE FROM.
Computer Science · OxfordAQA · IGCSE
Try questions
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.