Skip to main content

Normalization Theory

Functional Dependencies

Aside
  • Quick way to remember: studentID (PK) \rightarrow studentName.
  • studentID determines studentName.
studentIDstudentNamecourseCodevalid?
stu001BobCOMP 3000
stu002JaneCOMP 3005
stu003BobCOMP 1405
stu003BobCOMP 1406
stu001JamesCOMP 2402❌ Contradicts row 1. If this row exists, then studentID \rightarrow studentName is false.

Trivial Functional Dependencies

  • A functional dependency XYX \rightarrow Y is trivial if YXY \subseteq X.
  • XYYXY \rightarrow Y is trivial.
  • YXYY \rightarrow XY is non-trivial.

Armstrong's Axioms

  1. Reflexivity: If XYXXY \rightarrow X, then XYX \rightarrow Y.
  2. Augmentation: If XYX \rightarrow Y, then XZYZXZ \rightarrow YZ.
  3. Transitivity: If XYX \rightarrow Y and YZY \rightarrow Z, then XZX \rightarrow Z.
  4. Union: If XYX \rightarrow Y and XZX \rightarrow Z, then XYZX \rightarrow YZ.
  5. Decomposition: If XYZX \rightarrow YZ, then XYX \rightarrow Y and XZX \rightarrow Z.
  6. Pseudotransitivity: If XYX \rightarrow Y and WYZWY \rightarrow Z, then WXZWX \rightarrow Z.

Superkeys and Candidate Keys

R=(A,B,C,G,H,I)(AG)+=ABCGHIR = (A, B, C, G, H, I) \\ (AG)^+ = ABCGHI

  • Superkey: All attributes in the relation are determined by this key. In this example, AGAG is a superkey.
  • Candidate Key: A small subset of attributes that each individually uniquely determine all other attributes in the relation. In this example, if AGAG is a candidate key, it has to mean A and G can uniquely determine all other attributes in the relation (individually).

Assignment 3

a3_image1

a3_image2

a3_image3