Professional Documents
Culture Documents
1718sem1 - Ans
1718sem1 - Ans
ITP4903
2017/2018 Semester One Main Examination
Suggested Answers
Qn. Solution
Q1 Note: Deduct 0.5 mark for any type of errors not specified
ON Item(ItemSize);
Q2 Note: Deduct 0.5 mark for any type of errors not specified
Q3(a) The medication relation has data redundancy and data redundancy will cause update
anomalies.
Deletion Anomalies.
To delete the tuple for patient P0022, the details related to doctor D015 Betty (or
medicine M012 Crestor) are also lost.
Modification Anomalies.
To change the doctor name of D002, the change must be carried out on ALL tuples
related to D002. Otherwise, the data will become inconsistent.
TWeight
(c) Because it is a derived attribute and can be obtained by UWeight x Dosage
(d)(i) UNF:
Medication(PatNo, PatName, DocID, DocName, MedID, MedName,
UWeight, Dosage)
(ii) 1NF: (removing repeating group: MedID, MedName, UWeight, Dosage)
Patient(PatNo, PatName, DocID, DocName)
Medication(PatNo, MedID, MedName, UWeight, Dosage)
(e)
Medication
Q4(a)(i) Candidate key: An attribute, or minimal set of attributes, that uniquely identifies a
tuple within a relation.
Example: (Any one of the followings)
TourGuideID or
Mobile or
TICLicense
(ii) Alternate key: Candidate keys that are not selected to be primary key.
Example:
TICLicense or Mobile
(b)(i) Attribute Domain: Specifies the set of allowable values associated with attribute.
(ii) TourGuideID is the foreign key of in TOUR relation and its value should either
match the existing values of the TourGuideID in the relation TOURGUIDE or be
wholly null.
(d)
Any two of the followings: (1 mark each, max. 2 marks)
Program-Data Dependence
Data Redundancy
Limited Data Sharing
Lengthy Development Times
Excessive Program Maintenance
(accept other reasonable answers)
or
External level is the users’ view of the database and
Internal level is the physical representation of the database on the computer