Normalization
Deriving BCNF/3NF
In the critieria for good DB design, it should not have
  • redundancy where students taking courses repeats course information
  • update anomalies where you can update GPA vlaue while leaving others unchanged
  • insertion anomalies where you cannot add new course unless student takes it
  • deletion anomalies where deleting all students taking course removes information abot course
Decomposition splits our relation into smaller relations that returns original information when joined. We don't want arbitrary decomposition. We want it to be
  • lossless so does not produce extraneous information not in original relation when joined
  • dependency preserving so it is efficient and you don't need to join to perform CRUD operations
Functional Dependencies (FD) define relationships between attributes.
A → B means that there is 1 B for every A.
To get these properties, we must get our database to satisfy certain normal form which are constraints that FD must meet.
1NF is met if attribute values are atomic or indivisible.
2NF is met if all non-prime attributes are fully FD on the primary key(s).
3NF is met if there are no FDs X → Y, Y → Z where X is a key and Y is a non-key.
BCNF is met if there are no FDs X → Y where X is a non-key.
ex1) a,b,c->d,e,f;
ex2) a bc->d     ef;