the ER model provided a common language between
users and models that could be directly converted into a database
t/f: all database tables qualify as relations
false
normalization is the solution to
redundancy and anomalies, requirements for relations are too generic to take care of these problems
3 types of anomalies
update, insertion, deletion
normalization
process for evaluating and correcting table structures to minimize data redundancies by decomposing relations with anomalies to produce smaller, well-structured relations
normalization is a check against
potential mistakes/inefficiencies that might be in structure of database tables
well-structured relations
contains minimal data redundancy and allows users to insert, delete, and update rows without causing data inconsistencies
insertion anomaly
adding new rows forces user to create duplicate data
deletion anomaly
deleting rows may cause a loss of data that would be needed for other future rows
modification (update) anomaly
changing data in a row forces changes to other rows because of duplication
general rule of thumb for well structured relations
table should not pertain to more than one entity type
if A and B are two sets of attributes of a relation R, then:
B is functionally dependent on A if each value of A in the relation is associated with exactly one value of B
functional dependency is represented by
A -> B
first letter in functional dependency is called
determinant
any relation that does not have multi-valued attributes is in
First Normal Form (1NF)
- aka atomic
by definition, any valid relation is in
1NF
starting normalization process:
a relation is in second normal form or 2NF if
it is in first normal form, and every non-key attribute is fully functionally dependent on the primary key
fully dependent implies
no partial functional dependencies, i.e. no non-key attributes are functionally dependent on only part of the primary key
converting to 2NF, you start with
a relation in 1NF
converting to 2NF steps after start
2NF: make new tables to eliminate partial dependencies
2NF: reassign the corresponding dependent attributes
any relation in 1NF that has a single-attribute primary key is
automatically in 2NF