Normalization: Convert a schema to normal form that guarantees good design.

Principle: Avoid Redundancy

Redundant Data: If some fields in the database can be inferred from others when removed, they are redundant.

Update Anomaly: When a change must update many entries to stay consistant (e.g. when updating seller addresses, all tuples with that seller must change)

Deletion Anomaly: When a deletion removes more data than intended (e.g. when deleting the 1983 Walmart entry, Walmart’s address is lost)

Functional Dependency Theory

Functional Dependency: $X \rightarrow Y$ (x functionally determines y)

Superkey: A superkey is a FD that determines every other attribute

Functional Dependency Algorithms

Online Checkers: raymondcho.net

Untitled

Equivalent Sets of FDs: $S_1$ is equivalent to $S_2$ when $S_1$ holds $\Leftrightarrow S_2$ holds (e.g. $S_1=\{A \rightarrow BC\}, S_2=\{A\rightarrow B, A\rightarrow C\}$)

Closure Test: To determine if an FD follows from a set of FDs: (e.g. S = {A → B, B → C}, want to know if FD = A → BC follows)

  1. Start with the X+ = LHS of FD, expand to add all RHS of F ∈ S that has LHS ⊂ X+ (e.g. A = AB = ABC)
  2. If the RHS of FD ⊂ X+, conclude that FD follows. (e.g. BC ⊂ ABC, so A → BC follows)