0% found this document useful (0 votes)
62 views

Second Normal Form: Prime Attribute An Attribute, Which Is A Part of The Prime-Key, Is Known As A

The document discusses different normal forms for database relations: - Second normal form requires that non-prime attributes are fully dependent on the primary key and not on a subset of the primary key. - Third normal form extends this by requiring that non-prime attributes are not transitively dependent on the primary key through other non-prime attributes. - Boyce-Codd normal form is the strictest, requiring that any non-trivial functional dependency has the entire primary key as the determinant.

Uploaded by

Sudhir Anakal
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)
62 views

Second Normal Form: Prime Attribute An Attribute, Which Is A Part of The Prime-Key, Is Known As A

The document discusses different normal forms for database relations: - Second normal form requires that non-prime attributes are fully dependent on the primary key and not on a subset of the primary key. - Third normal form extends this by requiring that non-prime attributes are not transitively dependent on the primary key through other non-prime attributes. - Boyce-Codd normal form is the strictest, requiring that any non-trivial functional dependency has the entire primary key as the determinant.

Uploaded by

Sudhir Anakal
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

Second Normal Form

Before we learn about the second normal form, we need to understand


the following

Prime attribute An attribute, which is a part of the prime-key, is known as a


prime attribute.

Non-prime attribute An attribute, which is not a part of the prime-key, is said to


be a non-prime attribute.

If we follow second normal form, then every non-prime attribute should


be fully functionally dependent on prime key attribute. That is, if X A
holds, then there should not be any proper subset Y of X, for which Y
A also holds true.

We see here in Student_Project relation that the prime key attributes are
Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e.
Stu_Name and Proj_Name must be dependent upon both and not on any
of the prime key attribute individually. But we find that Stu_Name can be
identified by Stu_ID and Proj_Name can be identified by Proj_ID
independently. This is called partial dependency, which is not allowed
in Second Normal Form.

We broke the relation in two as depicted in the above picture. So there


exists no partial dependency.

Third Normal Form


For a relation to be in Third Normal Form, it must be in Second Normal
form and the following must satisfy

No non-prime attribute is transitively dependent on prime key attribute.

For any non-trivial functional dependency, X A, then either


o

X is a superkey or,

A is prime attribute.

We find that in the above Student_detail relation, Stu_ID is the key and
only prime key attribute. We find that City can be identified by Stu_ID as
well as Zip itself. Neither Zip is a superkey nor is City a prime attribute.
Additionally, Stu_ID Zip City, so there exists transitive
dependency.
To bring this relation into third normal form, we break the relation into
two relations as follows

Boyce-Codd Normal Form


Boyce-Codd Normal Form (BCNF) is an extension of Third Normal Form
on strict terms. BCNF states that

For any non-trivial functional dependency, X A, X must be a super-key.

In the above image, Stu_ID is the super-key in the relation


Student_Detail and Zip is the super-key in the relation ZipCodes. So,
Stu_ID Stu_Name, Zip
and
Zip City
Which confirms that both the relations are in BCNF.

You might also like