- Subjects
- Computer Science
- Question bank
- A3.1 Database fundamentals
A3.1 Database fundamentals questions for IB Computer Science
87 questions on Database fundamentals, written by Augment in the style of IB exam papers. Six of them are below in full, to answer on paper.
- IB Computer Science
- Part of A3 Databases
- SL and HL
Questions by paper and level
SL and HL questions are for students at either level. HL only questions cover what only HL students study.
| Paper | SL and HL | HL only | All |
|---|---|---|---|
| Paper 1 | 78 | 9 | 87 |
Counted on
Questions to try
Written by Augment in the style of IB exams, not past papers. Answer them on paper, then check each one against its markscheme with a free account.
A veterinary clinic stores details of pets and their owners in a relational database. Sample data from two of its tables is shown.
Owner
OwnerID | OwnerName | Phone |
|---|---|---|
OW101 | Amira Haddad | 0412 556 019 |
OW102 | Tomas Lindqvist | 0420 773 145 |
OW103 | Grace Okafor | 0433 908 262 |
Pet
PetID | PetName | Species | OwnerID |
|---|---|---|---|
P5001 | Biscuit | Dog | OW102 |
P5002 | Luna | Cat | OW101 |
P5003 | Pepper | Rabbit | OW102 |
P5004 | Max | Dog | OW103 |
- (a)
Identify the primary key of the Owner table.
1 mark
- (b)
Identify the foreign key in the Pet table.
1 mark
- (c)
Explain why the value OW102 may appear more than once in the Pet table but only once in the Owner table.
2 marks
A secondary school records the grade each student achieves in each course. Students who fail a course may retake it in a later term. Sample data from the Result table is shown.
StudentID | CourseCode | Term | Grade |
|---|---|---|---|
S2231 | CHEM1 | 2025-T1 | 3 |
S2231 | CHEM1 | 2025-T3 | 5 |
S2231 | HIST2 | 2025-T1 | 6 |
S2304 | CHEM1 | 2025-T1 | 4 |
S2304 | HIST2 | 2025-T3 | 7 |
- (a)
Explain why StudentID cannot be the primary key of the Result table on its own.
2 marks
- (b)
Identify a suitable composite primary key for the Result table and justify your choice.
3 marks
A bike-sharing company in a large city currently keeps its records in several spreadsheets: one for bikes, one for customers and one for rides. Each row in the rides spreadsheet repeats the customer's name, email address and the bike's docking station. The company plans to move to a relational database.
- (a)
State what is meant by a relationship in a relational database.
1 mark
- (b)
Outline two benefits to the company of storing these records in a relational database rather than in the spreadsheets.
4 marks
- (c)
Explain how a foreign key in the rides table helps to maintain data integrity when a new ride is recorded.
3 marks
- (d)
The company expects to record the GPS position of every bike every five seconds.
Explain one limitation of a relational database for storing this data.
3 marks
A public library uses a relational database with the tables Book(ISBN, Title, AuthorName, PublisherID) and Publisher(PublisherID, PublisherName, Country). Primary keys are underlined in the library's documentation as ISBN and PublisherID.
- (a)
Define the term primary key.
1 mark
- (b)
Distinguish between the role of PublisherID in the Publisher table and its role in the Book table.
2 marks
- (c)
Outline why ISBN is a suitable primary key for the Book table but Title is not.
2 marks
A regional airline lets travel agents in several cities book seats on its flights through a shared relational database. On a busy morning, two agents try to book the last remaining seat on the same flight within a second of each other.
- (a)
Describe the problem that could occur if the database had no concurrency control.
2 marks
- (b)
Explain how concurrency control in a relational database management system (RDBMS) would prevent this problem.
3 marks
An online marketplace sells many kinds of product. A pair of trainers has a shoe size and colour; a laptop has a processor, memory size and screen size; a concert ticket has a venue and date. New product categories are added every few weeks. All products are stored in one relational table, Product.
- (a)
Outline what is meant by a rigid schema.
2 marks
- (b)
Explain why a rigid schema is a limitation for the marketplace's Product table.
3 marks
Practice all 87 in Augment
Free with an account. Every question has its markscheme, and Augment keeps the ones you got wrong so you can come back to them.
More questions in Databases
- A3.1Database fundamentalsThis page
- A3.2Database design
- A3.3Database programming
- A3.4Alternative databases and data warehousesHL only
More on Database fundamentals
- A3.1 Database fundamentals notesWhat Database fundamentals covers, explained, with its key terms.
- IB Computer Science question bankEvery Computer Science topic counted, and one question from each with its markscheme.
- Computer Science exam formatEach Computer Science paper, how long it is and its share of the grade.
Check your answers in Augment
A free account opens all 87 questions on Database fundamentals with their markschemes, and keeps a record of what you have marked.