5ER Keysand Normalization
5ER Keysand Normalization
I
studentid name age phone
19-11-2022 2
Composite Key
X
studentid subject_id marks exo mname
-1
■ PartNum NumOrdered Quoted Price
Natan
t _/
primari/i
Super Key
• Super Key is defined as a set of attributes within a
table that can uniquely identify each record within a
table. Super Key is a superset of Candidate key.
Deletion of a row can cause more than one set of facts to be removed
Search and Sort Issues
SELECT SalesOffice
FROM SalesStaff
WHERE Customer1 = ‘Ford' OR
Customer2 = ‘Ford' OR
Customer3 = ‘Ford'
First Normal Form (1NF)
As per the 1st Normal form each column must contain atomic value
student_id and every other column depends on it, or can be fetched using it.
What is Partial Dependency?
student_id name reg_no Course address
10 Akon 07-WY CSE Kampala
11 Akon 08-WY IT Jinja
Together, student_id + subject_id forms a Compoiste Key
subject_id subject_name
1 Java
2 C++
3 Php
2 10 2 75
3 11 1 80
Third Normal Form (3NF)
subject_id
exam name is dependent on both student_id and
score id student id subject id marks exam id