Practice IB Computer Science (CS) Topic A.2 the Relational Database Model with authentic exam-style questions for both SL and HL students. This question bank focuses on the exact syllabus content for A.2 the Relational Database Model and mirrors Paper 1, 2, 3 style where relevant.
Get instant solutions, detailed explanations, and build confidence with questions aligned to IB examiner expectations.
Define the term tuple.
The table below, COURSE_REGISTRATION, stores information about students and the modules they have joined.
| Student_ID | Course_ID | Registration_Date |
|---|---|---|
| S788 | CS102 | 2023-08-15 |
| S788 | MA105 | 2023-08-15 |
| S902 | CS102 | 2023-08-16 |
Identify the primary key for this table and justify your choice.
Outline the purpose of a Data Manipulation Language (DML).
Identify three reasons for implementing views (virtual tables) in a relational database.
Jackson City University has a Music Department that provides music lessons to students in a number of high schools in the city. The Jackson City University Music Department teachers visit the different schools in the city to teach students a range of musical instruments. The following diagram shows an unnormalized table of student data. | Student_
ID | First_
Name | Family__
Name | Date_of_
birth | Student_Choice | School | School__
Post_Code | School_
phone_no |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 305 | JOE | PARKAR | | VIOLIN,
PERCUSSION | Tampines | 512233 | 065544335,
065544336 |
| 306 | MARY | ALCHIN | | GUITAR,
KEYBOARD | Arab
Street | 198876 | 065543213 |
| 307 | RAM | WONG | | GUITAR | Bedok | 467501 | 06543321,
065433222 |
| 308 | KATE | MOHAMA | | PERCUSSION | Simei | 512233 | 065444412 |
| 309 | RYAN | TAN | | GUITAR | Seng
Kang | 208563 | 065667898 |
| 310 | PHILIP | BALMER | | VIOLIN | Orchard | 309893 | 065756379 |
| 311 | MIKE | MOSES | | GUITAR | Clementi | 308978 | 065745677 |
| | | | | | | | |
Explain one benefit of normalizing a database.
Identify three ways that incorrect data could be prevented from being added into the School_phone_no field.
Outline what would be necessary to make the above unnormalized table conform to 1st Normal Form (1NF).
Construct the 3rd Normal Form (3NF) of the unnormalized relation shown above.
Explain the difference between 2nd Normal Form (2NF) and 3rd Normal Form (3NF).
Identify two issues that can occur when a database suffers from an update anomaly.
Define the term referential integrity.
Explain the importance of consistency in a database transaction.
Distinguish between the conceptual schema and the external schema in the database architecture.
Describe how a database management system (DBMS) handles security using access control.
Armour Hardware Company has the following data about salespersons and the quantities of items sold.
Each salesperson can sell many different products.
SALES_PERSON
Outline why the SALES_PERSON table is not in 1st Normal Form (1NF).
Construct the 3rd Normal Form (3NF) of the unnormalized relation shown above.
Outline why it is necessary to ensure that referential integrity is maintained in databases.
Outline why a primary key may consist of more than one attribute.
Outline two reasons why databases are normalized.
One-to-7 is an international organization that works with teachers and other educators. One department within this organization provides an online forum for teachers to discuss ideas for lessons and to share resources.
In order to access this forum teachers are required to submit the following information, which will be stored in a table in the database.
Figure 1: Online form to register personal details to the One-to-7 forum
Once the submit button on the online form has been selected, the personal data is input into the database.
Once the teacher is registered they can post comments on the forum.
The One-to-7 database is managed by the database administrator (DBA).
Outline why the transaction needs to be atomic in the context of this scenario.
Identify one reason why the teacher’s name has been split into two fields.
Identify two tasks that are carried out by the database administrator (DBA).
Outline one reason why there may be concerns about the amount of personal information that is requested.
The DBA is considering using the email address as the primary key, but is concerned that many of the 250 000 educators who are registering for this online forum may have more than one email address. Users may create duplicate accounts, deliberately or accidentally, by using different email addresses as usernames.
Explain the factors that would need to be considered in using a composite primary key instead of only using the email address.
Explain how transactions are managed to ensure isolation when registered teachers add comments to a discussion thread on the forum.