Unlocking the World of Business Intelligence with SQLBI

A functional dependency X→Y exists when the value of attribute determines the value of attribute .
Trivial Dependency:
A dependency is trivial if is a subset of .
Example:
Consider a relation :
Non-Trivial Dependency:
A dependency is non-trivial if is not a subset of .
Example:
In a relation , is non-trivial because is not part of .
Trivial dependencies do not provide new information, whereas non-trivial dependencies are critical for normalization and reducing redundancy.
A decomposition is non-loss if the original relation can be reconstructed using the natural join of its decomposed relations without losing data.
Example:
Relation with :
A relation is in 1NF if all attributes have atomic values (indivisible).
Example:
Violation:
Subjects column contains multiple values.
Solution:
A relation is in 2NF if it is in 1NF and there are no partial dependencies.
Example:
is the composite key. If the student’s name depended only on StudentID, it violates 2NF.
Solution: Decompose into:
A relation is in 3NF if it is in 2NF and has no transitive dependency.
Example:
EmployeeID | DepartmentID | DepartmentName |
---|
Here, depends on , which depends on E, violating 3NF.
Solution: Decompose into two relations:
Dependency preservation ensures that all functional dependencies hold in the decomposed relations.
Relation with and :
BCNF ensures that every determinant (attribute on the left of a dependency) is a superkey.
If Solution: Decompose into:
A relation is in 4NF if it is in BCNF and has no multi-valued dependencies.
Here, Subject and Hobby are independent of each other but depend on StudentID.
Solution: Decompose into:
A relation is in 5NF if it cannot be decomposed further while preserving dependencies.
Solution: Decompose into:
Comments
Post a Comment