IBDP Computer Science A3.1 Database fundamentals SL Paper 2 - New Syllabus
Question
A dental clinic employs dentists and nurses.
- Many dentists work at a single dental clinic.
- Many nurses work at a single dental clinic.
- A dentist can work with many nurses.
- A nurse can assist many dentists.
A dentist adds comments to the clinic’s database using an electronic device rather than using a paper-based medical record.
A database transaction occurs when a patient pays their bill. To maintain data consistency and integrity during the transaction, the database goes through several states.
Log files are stored prior to database updates. If the database crashes, the log files are used to recover the database.
Most-appropriate topic code
▶️ Answer/Explanation
(a)
For the correct answer:
The relationships are:

A dentist can work with many nurses and a nurse can assist many dentists, giving a many-to-many relationship. A link table may alternatively be used to remove the many-to-many relationship.
(b)
For the correct answer:
1. Accessibility: the database can be accessed from different locations, whereas a physical medical chart may only be available in one location. Nurses and dentists can therefore view the patient’s information simultaneously.
2. Data sharing: electronic records can be shared quickly between departments, clinics or hospitals. This improves communication and supports coordinated healthcare.
Other valid advantages include:
- Data analytics: databases can support data mining to identify trends in diseases or treatment outcomes, helping healthcare professionals improve treatment.
- Backup and recovery: database records can be backed up and restored if data is lost or damaged, whereas a physical chart may be permanently lost.
- Validation: database inputs and transactions can follow validity rules and constraints, reducing errors and improving consistency and accuracy.
- Search and query: patient information can be located quickly using queries and filters, saving dentists’ time.
- Legibility: electronic records avoid problems associated with difficult-to-read handwritten notes, reducing the risk of incorrect treatment.
- Security: databases can use passwords and permission levels to restrict access to private medical information.
- Updates: records can be inserted, updated or deleted electronically without rewriting or reprinting entire documents.
(c)
For the correct answer:
- Initial state: before payment, the patient’s account shows the amount that is still due.
- Transition state: while the payment is being processed, the patient’s record may be temporarily locked while the payment information is updated.
- Final state: after a successful transaction, the new balance is recorded and the patient’s status may be changed to
PaidorCleared.
If the transaction fails, the system can roll back to the initial state so that the database remains consistent and accurate.
(d)
For the correct answer:
- A consistent version of the database is recovered from a backup.
- The log file is scanned to determine the most recent checkpoint.
- The committed and uncommitted transactions since that checkpoint are identified.
- The committed transactions are redone or reapplied to the database.
- The uncommitted transactions are undone or rolled back in the case of immediate update.
Explanation: Log recovery uses the recorded transaction information to restore the database to a consistent state. Completed transactions are reapplied, while incomplete transactions are removed or reversed.
