1/7
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
candidate key
all column values are unique and a 'candidate' for primary key.
A candidate key is a simple or composite column that is unique and minimal.
A table can have multiple candidate keys.
Minimal
Minimal means all columns are necessary for uniqueness.
The smallest set of attributes for unique identification(candidate key), promoting efficiency.
Primary key usually is unique and minimal.
e.g. choosing only one column with unique values for primary key, instead of a composite column.
non-key
A non-key column is a column that is not a possible candidate key.
third normal form
A table is in third normal form when all non-key columns depend on the key, the whole key, and nothing but the key.
A table is in third normal form if, whenever a non-key column A depends on column B, then B is unique.
Boyce-Codd normal form
Learn Boyce-Codd Normal Form (BCNF)
Improved version of 'third normal form'.
While 'third normal form' applies to all 'non-key' columns(which will allow occasional redundancy), Boyce-Codd normal form applies to ALL columns(which eliminates this redundancy).
Boyce-Codd normal form eliminates all redundancy arising from functional dependence.
all dependencies(functional dependency) are on unique columns.
In a Boyce-Codd normal form table, if column A depends on column B, then B must be unique.
Boyce-Codd normal form is ideal for tables with frequent inserts, updates, and deletes.
Trivial Dependencies
When the columns of A are a subset of the columns of B, A always depends on B. Ex: FareClass depends on (FlightCode, FareClass). These dependencies are called trivial.
Normalization
Normalization eliminates redundancy by decomposing a table into two or more tables.
redundancy is eliminated with normalization, the last step of logical design.
depends on
Column A depends on column B when each B value is related to at most one A value. A and B may be simple or composite columns.
Denormalization
Denormalization means intentionally introducing redundancy by merging tables, to eliminate JOIN
queries.