Lecture 5 Flashcards Preview

Database Systems > Lecture 5 > Flashcards

Flashcards in Lecture 5 Deck (4)
Loading flashcards...
1
Q

3 types of anomalies:

A

Update (inconsistency)

Deletion

Insertion

2
Q

summary of 1NF, 2NF, 3NF

A

1NF - contains no repeating data elements

2NF - 1NF and contains no partial-functional dependencies

  • only full functional dependency
    • A and B are attributes of a relation,
    • B is fully dependent on A if B is functionally dependent on A but not on any proper subset of A
  • every non-primary-key-attribute is fully functionally depedent on the primary key

3NF - 2NF and contains no transitive dependencies

  • no non-primary-key attribute is transitively dependent on the primary key
  • i.e. non-key attributes are mutually independent
    • Elements which are mutually dependent are separated off into another table with the independent part as the key
3
Q

1NF to 2NF

A
  • Identify the primary key in the 1NF relation
  • Identify the functional dependencies in the relation
    • Elements which are not fully dependent are separated off into another table with the relevant part of the key
    • If partial dependencies exist on the primary key remove them by placing then in a new relation along with a copy of their determinant
4
Q

transitive dependency

A

A —> B and B —> C,
so A —> C (transitive)

(Provided that A is not functionally dependent on B or C).