THE DRS INTERNATIONAL SCHOOL
IBDP - 2024-26
SUBJECT: Computer Science
Topic : Databases
Candidate Name: Task sheet Date: 19 June 2025
Scenario: CityCare Hospital Network
CityCare is a group of hospitals operating across multiple cities. They use a central database to manage patient
records, doctors, visits, and prescriptions. The hospital is upgrading to include real-time processing, backup
systems, and analytical tools for diagnostics and public health research.
The hospital's schema includes:
Patient (PatientID, Name, DOB)
Doctor (DoctorID, Name, Department)
Visit (VisitID, PatientID, DoctorID, VisitDate)
Prescription (PrescriptionID, VisitID, MedicationName, Dosage)
Question 1
a) Draw an Entity-Relationship diagram for the schema above, showing all relationships.
b) Define and give examples of:
i) Surrogate key
ii) Foreign key
iii) Composite key
c) Write an SQL query to list names of doctors who had patient visits after '2025-01-01'.
Question 2
a) Explain what normalization means and describe how converting Prescription to 2NF improves consistency.
b) Describe two types of anomalies that occur in unnormalized tables.
c) Explain one way the DBA can protect sensitive patient information while allowing access to authorized
staff.
Question 3
The hospital is moving to predictive health analytics using data mining and warehouse systems.
a) Define the term data warehouse and state two differences from traditional databases.
b) Give two examples of how data mining could improve healthcare services.
c) A nurse updates vitals while a doctor adds diagnosis. Explain how consistency and durability in a
transaction apply to this case.
*********************