August
1999 QUESTION 4 Total Marks: 20 Marks |
Click here to access other
questions
SUGGESTED SOLUTIONS |
A company keeps a
database to record information about their employees : as well as personal details, they
record information about any training courses attended and about which particular posts
the employee has held within the company. A sample record from the database is given
below.
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
(a) | Normalize the employee record, showing clearly the UNF, 1NF, 2NF and 3NF. State any assumptions that you make. | [12] | ||||||||||||||||||||||||||||||||||||||||
UNF Employee (Employee#, Employee-name, Employee-address, Date-of-birth, {Course#, Course-description, Location, Date-attended, Pass-level}, {Job-title, Department-code, Department-name, Date-appointed, Salary} ) 1NF Employee(Employee#, Employee-name, Employee-address, Date-of-Birth) Emp-Course (Employee#, Course#, Course-description, Location, Date-attended, Pass-level) Emp-post (Employee#, Job-title, Department-code, Department-name, Date-appointed, Salary) 2NF Employee (Employee#, Employee-name, Employee-address, Date-of-Birth) Emp-course (Employee#, Course#, Location, Date-attended, Pass-level) Course (Course#, Course-description) Emp-post (Employee#, Job-title, Department-code, Department-name, Date-appointed, Salary) 3NF Employee (Employee#, Employee-name, Employee-address, Date-of-Birth) Emp-course (Employee#, Course#, Location, Date-attended, Pass-level) Course (Course#, Course-description) Emp-post (Employee#, Job-title, Department-code,Date-appointed, Salary) Department (Department-code, Department-name)
|
||||||||||||||||||||||||||||||||||||||||||
(b) | What is the objectives of Denormalisation? Why should it be carried out with great care? | [2] | ||||||||||||||||||||||||||||||||||||||||
The objectives of
denormalization is to reduce the number of physical databases tables to be accessed, by
reducing the number of joins needed to derive the answer to a query. However, denormalized rows are larger, which means that fewer rows can fit into a given secondary memory block and this may cause slower processing time.
|
||||||||||||||||||||||||||||||||||||||||||
(c) | Describe three situations where denormalisation should be used. | [6] | ||||||||||||||||||||||||||||||||||||||||
Three situations in
which denormalization should be used are:
|