Practice A.2 The relational database model with authentic IB Computer Science (CS) exam questions for both SL and HL students. This question bank mirrors Paper 1, 2, 3 structure, covering key topics like programming concepts, algorithms, and data structures. Get instant solutions, detailed explanations, and build exam confidence with questions in the style of IB examiners.
A school maintains a database of students' details and teaching resources on a central server. This data can be accessed by all teachers in the school.
Teachers may need to edit resources when preparing their lessons.
When storing student details, data security is an important consideration.
The school has appointed a database administrator (DBA).
A DBA is required to carry out tasks such as ensuring there is a strategy to recover the database if it becomes corrupted and that the data is shared ethically.
Suggest how the privacy of student data can be ensured.
Explain how concurrent use of the school database is possible in this situation.
Describe two ways that data security in the school's database can be maintained.
Describe one strategy that could be used to ensure the data can be recovered if the database becomes corrupted.
Define the term database management system (DBMS).
Identify two tasks that a database administrator carries out to ensure the security of the database.
Outline the purpose of a data definition language (DDL).
Identify three characteristics of logical schema.
A bank uses a relational database to manage accounts and transactions.
Define the term normalization.
Explain why normalization is important in the design of a banking database.
Identify two different types of relationships within databases.
Define the term database transaction.
Explain the importance of durability in a database transaction.
Describe the nature of the data dictionary.
Identify four responsibilities of a database administrator.
Galaxy Bookstore is an international chain that sells a variety of books. The bookstore database includes information about publishers, authors, and books. The tables for the Galaxy Bookstore database are shown below:
| Publisher_Name | City | Country | Telephone |
|---|---|---|---|
| Star Editions | London | UK | 4420712345 |
| Blue Moon | New York | USA | 1212987654 |
| Sunlight Press | Sydney | Australia | 6123456789 |
| Author_ID | First_Name | Last_Name | DOB | Publisher_Name |
|---|---|---|---|---|
| AU123 | Linda | Bright | 04/15/1980 | Star Editions |
| AU456 | Mark | Twain | 11/30/1835 | Blue Moon |
| AU789 | Alice | Walker | 02/09/1944 | Sunlight Press |
| ISBN | Title | Genre | Author_ID | Year_Published |
|---|---|---|---|---|
| 978-1234567890 | Sunshine on the Road | Non-Fiction | AU789 | 2010 |
| 978-0987654321 | The Moon’s Shadow | Fiction | AU456 | 2015 |
| 978-1122334455 | Bright Days | Poetry | AU123 | 2018 |
| 978-9988776655 | Life in the Shadows | Fiction | AU456 | 2019 |
Explain why referential integrity is essential in maintaining the relationships between the Author and Publisher tables.
Construct the entity-relationship diagram (ERD) for this database scenario, showing the relationships between the Publisher, Author, and Book entities.
Describe two validation issues that may arise with the Title attribute in the Book table.
State the output of the following SQL query: SELECT Title FROM Book WHERE Genre = 'Fiction' AND Author_ID = 'AU456'
Write an SQL query to retrieve the names of books published by “Sunlight Press.”
A logistics company designs a database for managing drivers, vehicles, and deliveries.
Define many-to-many relationship.
Describe how a many-to-many relationship could be implemented in the logistics database.
Describe two advantages and two disadvantage of using many-to-many relationships.
An online bookstore wants to design a database for tracking inventory and sales.
Define the term entity-relationship diagram (ERD).
Describe the purpose of an ERD in database design for the bookstore.
Draw an ERD to show the relationships between entities: Customer, Order, and Book.
A library database stores information about books, authors, and genres.
Define normal form.
Outline the importance of third normal form (3NF) in database design.
Explain two issues that can arise if a database is not in 3NF.
Outline what is meant by a database management system.
Outline one advantage of using beta testing prior to the release of a new product.
A travel agency wants to store customer booking information in a relational database.
Define foreign key.
Explain the importance of foreign keys in managing relationships between database tables.
Describe one potential issue that could arise if foreign keys are not properly implemented.