- If a relation is in a certain normal form, it is known that certain kinds of problems are avoided/minimized
- This can be used to decide whether decomposing the relation will help
- If for all X→A in F+, X→A is trivial (X contains A) or X contains a key for R
- Relation R is in BCNF if the only non-trivial FDs that hold over R represent key constraints
- Ensures that no redundancy can be detected using FD information alone
- Most desirable normal form in terms of redundancy
- Decomposition into
- Given: Relation R with FDs F
- Look among the given FDs for a BCNF violation X→B
- If any FD following from F violates BCNF, then there will surely be an FD in F itself that violates BCNF
- Compute X+
- Not all attributes, or else X is a superkey
- Decompose R using X→B
- Replace R by relations with schemas:
- Project given FDs F onto the two new relations
- Lossless decomposition
- Steps
- Find keys of relation R
- Find a BCNF violation FD X→A
- Compute X+
- Decompose to R1 and R2
- Find projecting FDs
- Problem
- When AB→C and C→B
- There are two keys, {A,B} and {A,C}
- C→B is a BCNF violation, so we must decompose into AC,BC
- After decomposing you can no longer guarantee that AB→C
- Modifies the BCNF condition so it does not have the decomposition problem
- An attribute is prime if it is the member of any key
- X→A violates 3NF iff X is not a superkey and A is not prime
- Allows for some redundancy (it is a compromise when BCNF is not possible)
- Should be used when a lossless-join, dependency preserving decomposition into BCHNF is not possible
- To ensure dependency preservation
- Use a minimal cover for F (the fewest possible functional dependencies that still produces F+)
- If any X→A in the minimal cover is not preserved, add XA to a relation