
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of the fourth normal form (4nf) in database normalization. 4nf is an advanced form of bcnf, which ensures that a relation is free from multi-value dependencies (mvds). The concept of mvds, their relationship with functional dependencies (fds), and how to determine if a relation is in 4nf. It also provides examples and explanations of anomalies that can occur when a relation is not in 4nf and how to resolve them.
Typology: Slides
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















4th Normal Form
A Boyce Codd normal form relation is in fourth normal form if
(a) there is no multi value dependency in the relation or
(b) there are multi value dependency but the attributes, which are multi value dependent on a specific attribute, are dependent between themselves.
This is best discussed through mathematical notation.
Assume the following relation
R(a:pk1, b:pk2, c:pk3)
Recall that a relation is in BCNF if all its determinant are candidate keys, in other words each determinant can be used as a primary key. Because relation R has only one determinant (a, b, c) , which is the composite primary key and since the primary is a candidate key therefore R is in BCNF.
Consider a case of class enrollment. Each student
can be enrolled in one or more classes and each class can contain one or more students.
Clearly, there is a many-to-many relationship
between classes and students. This relationship can be represented by a Student/Class cross- reference table:
{StudentID, ClassID}
{StudentID, ClassID, TeacherID}
realize that it is not possible to add a new class taught by some teacher without adding at least one student who is enrolled in this class.
to-many relationship through its own cross-reference table.
case 2: Assume the following relation with multi-value dependency:
Employee (Eid:pk1, Languages:pk2, Skills:pk3) Eid --->> Languages Eid --->> Skills
Languages and Skills are dependent. This says an employee speak several languages and has several skills. However for each skill a specific language is used when that skill is practiced.
4th Normal Form and anomalies
Cont…
Thus employee 100 when he/she teaches speaks English but when he cooks speaks French. This relation is in fourth normal form and does not suffer from any anomalies.
Eid Language Skill
100 English Teaching
100 Kurdish Politic
100 French Cooking
200 English Cooking
200 Arabic Singing
4th Normal Form and anomalies
Cont…
Eid Language Skill
100 English Teaching
100 Kurdish Politic
100 English Politic
100 Kurdish Teaching
200 Arabic Singing
This relation is not in fourth normal form and suffers from all three types of anomalies.
Insertion anomaly: To insert row (200 English Cooking) we have to insert two extra rows (200 Arabic cooking), and ( English Singing) otherwise the database will be inconsistent. Note the table will be as follow:
Eid Language Skill 100 English Teaching 100 Kurdish Politics 100 English Politics 100 Kurdish Teaching 200 Arabic Singing 200 English Cooking 200 Arabic Cooking 200 English Singing Docsity.com