Introduction
Normalisation replaces a relation by smaller relations whose attributes together cover . Splitting is only safe if two properties hold. The decomposition must be lossless: joining the pieces back must give exactly the original relation, with no extra (spurious) tuples. It should also be dependency preserving: every functional dependency of must be checkable on the pieces without joining them.
The tasks for a decomposition are to decide whether it is lossless, whether it preserves dependencies, and what the 3NF synthesis or BCNF decomposition algorithm produces. The tests, the two algorithms, and the reason 3NF and BCNF differ on preservation follow.
Prerequisites
- Normal Forms: 1NF, 2NF, 3NF and BCNF: the target forms and the role of candidate keys.
Core concepts
A decomposition of is a set of schemas with .
- Lossless join. For every legal instance of : . The join always contains ; a lossy decomposition adds spurious tuples, it never loses tuples. "Lossy" means information about which values belong together is lost.
- Projection of onto . . It may contain FDs that are in no member of .
- Dependency preserving. : every FD of follows from the FDs that live inside single pieces.
Binary lossless test. is lossless iff or is in , that is, iff the common attributes form a superkey of at least one side.

How it works: the chase test for any number of pieces
For pieces, build a tableau with one row per and one column per attribute. Row holds a distinguished symbol in column if , otherwise a unique symbol . Then repeatedly, for each FD , find two rows equal on all columns of and make them equal on (replace a by an if one of them is an , otherwise by one of the symbols, everywhere it occurs). The decomposition is lossless iff some row becomes all .
Example tableau. , , pieces , , , :
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
(rows , agree on ) sets in row ; (rows , ) sets ; now rows and agree on , so sets . Row is all : lossless.
Algorithms and pseudocode
Testing preservation of one FD without computing .
PRESERVED(X -> Y, decomposition R_1..R_n, F)
result <- X
repeat
for each R_i
result <- result union (CLOSURE(result intersect R_i, F) intersect R_i)
until result does not change
return (Y is a subset of result)The decomposition preserves iff every FD of passes. Polynomial time.
3NF synthesis (lossless and dependency preserving, always):
3NF-SYNTHESIS(R, F)
Fc <- canonical cover of F, FDs with equal left sides merged
for each X -> Y in Fc: create schema X union Y
if no schema contains a candidate key of R: add one candidate key as a schema
remove any schema contained in anotherBCNF decomposition (lossless, may lose FDs):
BCNF-DECOMPOSE(R, F)
result <- {R}
while some R_i in result is not in BCNF
find X -> Y holding on R_i (in the projection of F+), nontrivial, X not a superkey of R_i
replace R_i by (X union Y) and (R_i - (Y - X))
return resultEach split is lossless because the two pieces share and . Testing BCNF of a piece needs the projected FDs, so the algorithm is exponential in the worst case.
Mathematical explanation
Why the binary test works. Suppose . Take any tuple of the join: it comes from and that agree on . Let be a tuple projecting to . Since agrees with the source of on and that set determines , agrees with it on all of , so . No spurious tuple appears.
Why BCNF can lose dependencies and 3NF cannot. 3NF synthesis creates one schema per FD of the canonical cover, so every FD lives in some piece. BCNF decomposition splits wherever a left side is not a superkey and can separate the attributes of another FD. For with , , every BCNF decomposition breaks .
Why synthesis adds a key. The key schema makes the chase succeed: starting from the key row, each FD of the cover fills one more column, ending with an all- row.
Worked examples
Example 1: spurious tuples. with only . Decompose into , : , , and the join has 4 tuples, 2 of them spurious, and . The common attribute determines neither side. Decomposing into , is lossless ().
Example 2: the binary test (Figure 1). , . : common , , lossless. : common , , lossless. : nothing in common, lossy (the join is a Cartesian product). : common , , lossy.
Example 3: chase. In the tableau above, dropping the piece leaves , which is lossy. Two ways to see it. Directly: in the starting tableau no FD applies at all, because no two rows agree on , on , or on both and , so the chase stops at once with no all- row. Structurally: a row that becomes all proves that its piece determines every attribute, so a lossless decomposition always has a piece that is a superkey; here no piece contains the only candidate key . The decomposition is lossless (row fills and ) but does not preserve .
Example 4: lossless but not preserving. , , decomposed into : common , , lossless; both pieces are in BCNF; is lost.
Example 5: preserving through a derived FD. , . is lossless and preserves both FDs. is lossless (common ) but loses ; note that the projection onto contains , which is not in .
Example 6: 3NF synthesis. , (already canonical). Schemas , , . The only candidate key is (neither nor is on a right side, and ); no schema contains it, so add . Result : every piece is in 3NF (in fact BCNF), the chase succeeds from row , and every FD lives in one piece.
Example 7: BCNF decomposition of the same relation. violates BCNF on . Splitting on with gives and . In , violates BCNF: split into and . has projected FD and key : BCNF. Result , lossless, but is lost (no piece contains , and ).
Example 8: running PRESERVED on a cycle. , , pieces , , . Every single attribute is a key, so row of the chase becomes all (, then ) and the decomposition is lossless. , , each lie inside a piece. lies in none, so run the test, visiting , , in each pass:
| Pass | Piece that adds something | result |
|---|---|---|
| start | ||
| 1 | : | |
| 2 | : | |
| 3 | : |
result, so is preserved, and the decomposition is lossless and dependency preserving. The FD travels round the cycle through the pieces.
Example 9: what a key piece does. , . The only candidate key is .
- : no common attribute, lossy.
- : the row for gets from and from , so it becomes all : lossless. This is exactly the key schema that 3NF synthesis adds.
- : lossy. Initially in the chase, rows and agree on , but no FD has left side ; rows and agree on , so gives row the symbol under . The final rows are : , : , : , with no all- row.
- Concrete spurious tuples: satisfies both FDs, and has 4 tuples, two of them spurious, for example .
Important properties and observations
- A decomposition never loses tuples; lossy means spurious tuples are added.
- Binary test: use the exact FD criterion or in . A disjoint decomposition is ordinarily lossy, but can be lossless if the empty determinant determines an entire piece. With no such constant dependency, no common attributes means lossy.
- Chase: works for any number of pieces; lossless iff some row becomes all distinguished.
- 3NF synthesis is always lossless and preserving; BCNF decomposition is always lossless but may lose FDs.
- Preservation uses projections of , not just the FDs of that happen to fit inside a piece.
- Lossless and preserving are independent: Examples 4 and 3 () show each without the other.
Common misconceptions.
- "A lossy decomposition loses tuples." It adds spurious ones.
- "If some FD of fits in no single piece, the decomposition is not preserving." It can still be preserved through derived FDs: for and pieces , , the FD fits in neither, yet (in ) and (in the projection onto ) imply it. Use the PRESERVED test.
- "Pairwise lossless joins make a multi-way decomposition lossless." Use the chase for three or more pieces.
GATE examination perspective
- Is it lossless? Binary test for two pieces, chase for more.
- Is it dependency preserving? Check every FD with PRESERVED or by projecting closures.
- Count or list the relations. Consider those produced by 3NF synthesis or BCNF decomposition.
- Combined questions. Decompositions that are lossless but not preserving, or the reverse.
- Spurious tuples. Count the tuples of a join of projections on a small instance.
Summary
Sources
- A. Silberschatz, H. F. Korth, S. Sudarshan, Database System Concepts, 7th ed., McGraw-Hill, 2019 (2020 copyright), 7.2 Decomposition Using Functional Dependencies, 7.4 Functional-Dependency Theory, 7.5 Algorithms for Decomposition Using Functional Dependencies.
- R. Elmasri, S. B. Navathe, Fundamentals of Database Systems, 7th ed., Pearson, 15.2 Properties of Relational Decompositions; 15.3 Algorithms for Relational Database Schema Design.