Week6TutorialQuestion1Solution_91647 (1)
Week6TutorialQuestion1Solution_91647 (1)
Normalisation
Question Table
Business Rule
● There is precisely One Sheet for Each Employee
for Each Week.
● Sheets are not Numbered
● Each Employee belongs to One Department
● Employee No values and Department No values
are Unique.
Business Rule
● Employee Names are NOT Unique.
● Each Job is assign a Unique Job No and
corresponding Non Unique Job Description
● The Sheet gives Hours worked by the particular
Employee in the Week on a particular Task as part
of the Job
Table with Data
Un Normal Form (UNF)
Repeating
Data
Un Normal Form (UNF)
● All attributes with repeating groups included in a
single Relation
○ Write down all Attributes from the table above and
name this Relation.
Week(EmployeeName, EmployeeNo, DepartmentNo,
WeekNo, JobNo, JobDescription, Task, Rate, Hours)
○ Choose a suitable Unique Identifier for this
Relation
Week(EmployeeName, EmployeeNo, DepartmentNo,
WeekNo, JobNo, JobDescription, Task, Rate, Hours)
Un Normal Form (UNF)
● All attributes with repeating groups included in a
single Relation
○ Write down all Attributes from the table above and
name this Relation.
○ Choose a suitable Unique Identifier for this
Relation
○ Show Repeating Group within { } in this Relation
Week(EmployeeName, EmployeeNo, DepartmentNo,
WeekNo, {JobNo, JobDescription, {Task, Rate, Hours}})
Un Normal Form (UNF)
● All attributes with repeating groups included in a
single Relation
○ If we do not have Repeating Group in UNF, this
Relation is already in First Normal Form (1NF)
○ You may have one Repeating Group within another
Repeating Group
○ You may have one Repeating Group then another
Repeating Group.
○ You may even have Single or Composite Unique
key in UNF.
Un Normal Form (UNF)
Repeating
Data
First Normal Form (1NF)
● Any repeating groups have been removed, so that
there is a single value at the intersection of each
row and column of the Relation
○ Relation without Repeating Group is already in First
Normal Form (1NF)
○ Remove all Repeating Group forming new Relations
○ Step 1: Remove the Outer Most Repeating Group to
form new Relation and name it.
Week(EmployeeName, EmployeeNo, DepartmentNo, WeekNo)
WeekJob(JobNo, JobDescription, {Task, Rate, Hours})
First Normal Form (1NF)
● Any repeating groups have been removed, so that
there is a single value at the intersection of each
row and column of the Relation
○ Step 1: Remove the Outer Most Repeating Group to
form new Relation, name it.
○ Step 2: Carry forward Unique Identifier to this Relation.
Week(EmployeeName, EmployeeNo,WeekNo, DepartmentNo)