D03 Tutorial Updated
D03 Tutorial Updated
D03 Tutorial Updated
(a) Identify the tables that will give a normalized solution to this problem. Draw
an E-R diagram that shows these tables and the relationships between
them.
a) You are required to design a relational database solution for the clinic.
Identify the tables that will give a normalized solution. Show the
process of normalization.
[6]
1NF:
PatientRecord(RecordNo, Date, NRIC, Name, Address, DoctorName, StaffID,
Specialization, Contact, MC, TrackingNo, StartDate, EndDate, SerialNo,
Description, Symptom, Price, Quantity)
2NF:
PatientRecord(RecordNo, Date, NRIC, Name, Address, DoctorName, StaffID,
Specialization, Contact, MC, TrackingNo, StartDate, EndDate)
MedOrderRec(RecordNo*, SerialNo*, Quantity)
MedicineInfo(SerialNo, Description, Symptom, Price)
3NF:
Patient(NRIC, Name, Address)
Record(RecordNo, NRIC*, Date, StaffID*, MC, TrackingNo*)
Staff(StaffID, DoctorName, Specialization, Contact)
MCRecord(TrackingNo, StartDate, EndDate)
MedOrderRec(RecordNo*, SerialNo*, Quantity)
MedicineInfo(SerialNo, Description, Symptom, Price)
Patient
one-many
Staff one-many Record one-one MCRecord
one-many
MedOrderRec many-one MedicineInfo
4. Given the following scenarios, identify the necessary tables in the
normalized form, with potential fields for table descriptions. Then draw an
E-R diagram to show the relationships between these tables.
(a) The school library currently stores their data in flat files. These files contain
information about students, books and their loaning details.
A book can be borrowed by any student, and a student can borrow any
book. Students need to fill up a loaning record form each time he/she
wants to borrow a book. A student is entitled to borrow up to 5 books each
time using the same loaning record form.
(b) A hospital keeps the hospitalization records for the patients. The system
should record down information of patients staying and related information
such as bed number.
(c) A school keeps the records of subject information of teachers who teach
the subject and students who take the subject.