0% found this document useful (0 votes)
6 views3 pages

Fourth and Fifth Normal Form

Fourth Normal Form (4NF) requires that a relation has no non-trivial multivalued dependencies, which occur when a single value of one attribute corresponds to multiple values of another attribute in a table with at least three columns. To avoid anomalies, such as losing related data when modifying entries, tables should be decomposed into separate entities for independent attributes. Fifth Normal Form (5NF) extends this concept by ensuring that tables can be decomposed further without losing data or creating new records, maintaining integrity through join dependencies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Fourth and Fifth Normal Form

Fourth Normal Form (4NF) requires that a relation has no non-trivial multivalued dependencies, which occur when a single value of one attribute corresponds to multiple values of another attribute in a table with at least three columns. To avoid anomalies, such as losing related data when modifying entries, tables should be decomposed into separate entities for independent attributes. Fifth Normal Form (5NF) extends this concept by ensuring that tables can be decomposed further without losing data or creating new records, maintaining integrity through join dependencies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Fourth Normal Form (4NF)

A relation is in 4NF if it has no non-trivial multivalued dependency.

For a dependency A à B, multivalued dependency exist when for a single value of A1 more than one
value of B1, B2 exist in a table. For a table to have multivalued dependency, the table must have at least
three columns. If we only have two columns in a table, we can simply distribute the multivalued data
into multiple rows in the table.

A B A B
B1 A1 B1
A1
B2 A1 B2

Thus, no need of decomposing the table.

Three conditions for a multivalued dependency:

1. For A - - >> B , for a single value of A multiple value of B exist.


2. Table has at least three columns.
3. For a table of columns A, B, C ; B and C should be independent.

If all these are true, then, multivalued dependency exist. Such as A - - >> B and A - - >> C.
To further understand this, consider the ‘Enrollment’ table below.
Enrollment

S_id Course Hobby


1 Math Cricket
1 Science Hockey

Here, we have a student having two courses and two hobbies. This situation leads to a database
anomalies, that is, when we remove one hobby of the student then we lost one course of the student.
Similarly, if we remove a course of the student, we also lost one hobby of the students. To avoid that
situation there is a need to insert two rows for every course or hobby added to the table.
Enrollment

S_id Course Hobby


1 Math Cricket
1 Science Hockey
1 Math Cricket
1 Science Hockey

Now, does it make sense? The is NO! To correct it, we split the table as show below.
Solution.

Student_Course Student_Hobby

S_id Course
1 Math
Hobby
1 Science
S_id
1 Cricket
1 Hockey

Fifth Normal Form (5NF)

A relation is in 5NF if it handle a general case of multivalued dependency known as Join


Dependency.
It is also known as Project-Join Normal Form.

Conditions
1. It is in 4NF.
2. If we can decompose table further to eliminate redundancy and anomaly, and when we re-join
the decomposed tables by means of candidate keys, we should not be losing the original data or
any new record set should not arise. In simple words, joining two or more decomposed table
should not lose records nor create new records.

To understand it more, we consider the 'AGENT_COMPANY_PRODUCT' table, populated as shown. Here


we have an agent for a company and that company makes a product, then he always sells that product
for the company. Under these circumstances, the 'agent company product' table as shown below:

The assumption being that ABC makes both Nuts and Bolts and that CDE makes Bolts only. This table can
be decomposed into its three projections without loss of information as demonstrated below:
All redundancy has been removed, if the natural join of PI and P2 IS taken, the result is:

The spurious row as asterisked. Now, if this result is joined with P3 over the column 'company
'product_name' the following table is obtained:

This is a correct recomposition of the original table and no loss decomposition into the three projections
was achieved.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy