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 X→YX \rightarrow Y is trivial if Y⊆XY \subseteq X.
  • XY→YXY \rightarrow Y is trivial.
  • Y→XYY \rightarrow XY is non-trivial.

Armstrong's Axioms​

  1. Reflexivity: If XY→XXY \rightarrow X, then X→YX \rightarrow Y.
  2. Augmentation: If X→YX \rightarrow Y, then XZ→YZXZ \rightarrow YZ.
  3. Transitivity: If X→YX \rightarrow Y and Y→ZY \rightarrow Z, then X→ZX \rightarrow Z.
  4. Union: If X→YX \rightarrow Y and X→ZX \rightarrow Z, then X→YZX \rightarrow YZ.
  5. Decomposition: If X→YZX \rightarrow YZ, then X→YX \rightarrow Y and X→ZX \rightarrow Z.
  6. Pseudotransitivity: If X→YX \rightarrow Y and WY→ZWY \rightarrow Z, then WX→ZWX \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