Skip to content
PostDatabase Management System / RDBMS

09-Relational-Database-Design-BCNF

2023-11-03
Back to Blog

Relational-Database-Design-BCNF ​

Lossless-join Decomposition ​

  • For the case of R=R1∪R2 a decomposition of R into R1 and R2 is lossless join if and only if at least one of the following dependencies is in F+:

R1∪R2→R1R1∪R2→R2

Dependency Preservation ​

  • Let the schema R is decomposed into R1,R2,…Rn.
  • Let Fi be the subset of dependencies F+ that only includes attributes in Ri for 1≤i≤n,
  • The decomposition is dependency preserving, if (F1∪F2∪⋯∪Fn)+=F+
  • If the decomposition is not dependency preserving, then checking updates for violation of functional dependencies may require computing joins, which is expensive.

Example: R={A,B,C}F={A→B,B→C} can be decomposed in two different ways

  • R1={A,B},R2={B,C}

    • Lossless-join decomposition
      • R1∩R2={B} and B→BC
      • Dependency preserving
  • R1={A,B},R2={A,C}

    • Lossless-join decomposition
      • R1∩R2={A} and A→AB
      • Not dependency preserving (cannot check B→C without computing R1⨝R2)

BCNF ​