0% found this document useful (0 votes)
4 views2 pages

UNIT 4 Rdbms

The document discusses functional dependencies in relational databases, defining key concepts such as trivial, non-trivial, fully functional, partial, and transitive dependencies. It also outlines the process for converting a relation from Third Normal Form (3NF) to Boyce-Codd Normal Form (BCNF), emphasizing the importance of ensuring that for every non-trivial functional dependency, the determinant must be a super key. Steps include identifying functional dependencies, checking for BCNF violations, decomposing relations, and repeating the process until all relations meet BCNF criteria.

Uploaded by

sandyaselvam
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)
4 views2 pages

UNIT 4 Rdbms

The document discusses functional dependencies in relational databases, defining key concepts such as trivial, non-trivial, fully functional, partial, and transitive dependencies. It also outlines the process for converting a relation from Third Normal Form (3NF) to Boyce-Codd Normal Form (BCNF), emphasizing the importance of ensuring that for every non-trivial functional dependency, the determinant must be a super key. Steps include identifying functional dependencies, checking for BCNF violations, decomposing relations, and repeating the process until all relations meet BCNF criteria.

Uploaded by

sandyaselvam
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

UNIT - IV

FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASE

Functional Dependency

A functional dependency, denoted as X → Y, exists in a relation R if, for any two tuples (rows) in R,
whenever those tuples agree on the attributes in X, they must also agree on the attributes in Y.

 X is called the determinant

 Y is the dependent

Types of Functional Dependencies

1. Trivial Functional Dependency:

o X → Y is trivial if Y ⊆ X.

o Example: {StudentID, Name} → StudentID

2. Non-Trivial Functional Dependency:

o X → Y is non-trivial if Y is not a subset of X.

3. Fully Functional Dependency:

o X → Y is fully functional if Y is dependent on X and not on any subset of X.

o Example: {StudentID, Course} → Grade but StudentID → Grade is not true.

4. Partial Dependency:

o A dependency where a non-prime attribute is functionally dependent on part of a


composite key.

o Only occurs in tables with composite keys.

5. Transitive Dependency:

o If X → Y and Y → Z, then X → Z is a transitive dependency.

BCNF ….Steps to be followed to convert a relation in 3NF to BCNF

BCNF (Boyce-Codd Normal Form)

BCNF is a stronger version of 3NF. A relation is in BCNF if:

For every non-trivial functional dependency X → Y, X must be a super key.

Even if a relation is in 3NF, it might not be in BCNF if some FDs violate this condition — i.e., when a
non-super key determines other attributes.

Step 1: Identify Functional Dependencies

List all functional dependencies (FDs) of the relation.


🔍 Step 2: Check for BCNF Violations

For each functional dependency X → Y:

 Check if X is a super key.

 If X is not a super key, then it's a BCNF violation.

✂️Step 3: Decompose the Relation

For each FD that violates BCNF (X → Y where X is not a super key):

1. Decompose the relation into two new relations:

o R1 = (X ∪ Y) — all attributes in the violating FD

o R2 = (R - Y) ∪ X — remaining attributes and determinant X

2. Keep the FDs associated with their appropriate relations.

🔁 Step 4: Repeat Until All Relations are in BCNF

 Repeat Steps 2 and 3 on the new relations.

 Continue until all functional dependencies in all relations have their left side as a super
key.

You might also like