Advanced Database Systems: Lecture # 7 Normalization (Revision)
Advanced Database Systems: Lecture # 7 Normalization (Revision)
Repeating group
EMPLOYEE:
EmpID FirstName LastName Salary DateOfBirth ContactNo Designation
1001 Ahmad Tahir 50000 12-Jun-1992 0333-9999999 Manager
0300-9999999
1002 Zubair Saeed 70000 02-Feb-1990 0333-8888888 Manager
0321-8888888
0349-8888888
Determinant
Instructor: Furqan Shahid
Functional dependency examples
EmpNO → DateOfBirth
(Empno is determinant of DateOfBirth)
EmpNO → Salary
(Empno is determinant of Salary)
EMP_CONTACT:
2NF
EMPLOYEE:
EmpID FirstName LastName Salary DateOfBirth Designation EmpID ContactNo
1001 Ahmad Tahir 50000 12-Jun-1992 Manager 1001 0333-9999999
1002 Zubair Saeed 70000 02-Feb-1990 Manager 1001 0300-9999999
1002 0333-8888888
1002 0321-8888888
1002 0333-8888888
1NF
STUDENT
RegNo Name Address DateOfBirth PassedCourse CourseTitle CourseCredits ObtainedGPA
1001 Usman H#1,St#1, City1 17-May-1990 CS-001 PF 4 3.0
1001 Usman H#1,St#1, City1 17-May-1990 CS-002 OOP 4 3.5
1002 Uzair H#2,St#2,City1 09-Aug-1991 CS-001 PF 4 3.5
1002 Uzair H#2,St#2,City1 09-Aug-1991 CS-002 OOP 4 2.5
1002 Uzair H#2,St#2,City1 09-Aug-1991 CS-003 DBMS 3 4.0
Instructor: Furqan Shahid
Example-2 (Functional dependencies)
Currently:
(RegNo, PassedCourse) → Name, Address, DateOfBirth, CourseTitle,
CourseCredits, ObtainedGPA
STUDENT:
2NF
RegNo Name Address DateOfBirth STD_RESULT:
1001 Usman H#1,St#1, City1 17-May-1990 RegNo PassedCourse ObtainedGPA
1002 Uzair H#2,St#2,City1 09-Aug-1991 1001 CS-001 3.0
COURSE: 1001 CS-002 3.5
CourseCode CourseTitle CourseCredits 1002 CS-001 3.5
CS-001 PF 4 1002 CS-002 2.5
CS-002 OOP 4 1002 CS-003 4.0
CS-003 DBMS 3
Instructor: Furqan Shahid
Thank you