Databases: Normal Forms
https://www.guru99.com/dbms-functional-dependency.html
9 flashcards · Computer Science · by lakesare
What are 3 data anomalies that occur in unnormalized databases?
Insertion Anomaly - The nature of a database may be such that it is not possible to add a required piece of data unless another piece of unavailable data is also added. E.g. A library database that cannot store the details of a new member until that member has taken out a book. Update Anomaly - Incorrect data may have to be changed, which could involve many records having to be changed, leading to the possibility of some changes being made incorrectly. Deletion Anomaly - A record of data can le…
What are higher normal forms (4th and 5th)?
Note that by the time you have normalized a set of relations to Boyce-Codd Normal Form (BCNF, sometimes called 'three-and-half Normal Form'), you almost certainly have a set of relations that are also in Fourth and Fifth Normal Form. You only have to take special steps to get to these higher normal forms in certain very rare situations Higher normal forms: the Fourth and Fifth Normal Forms are sometimes called the ‘higher’ normal forms.
What's a functional dependency?
Functional dependency is when one or more attributes determine one or more attributes. For instance:Social Security Number -> (First Name, Last Name).However, by definition of functional dependency:(Social Security Number, First Name) -> Last NameThis is also a valid functional dependency.
What's a partial functional dependency?
A FD (functional dependency) that holds in a relation is partial when removing one of the determining attributes gives a FD that holds in the relation. A FD that isn't partial is full. Eg: If {A,B} → {C} but also {A} → {C}then {C} is partially functionally dependent on {A,B}.
What's transitive functional dependency?
Name: 1st normal form 2nd normal form 3rd normal form boyce-codd normal form.
When is relation in 1st normal form?
When each value should be atomic. Bad - this relation has non-atomic phone-numbers column:Good - here are three ways we can put this relation in the 1st normal form:
When is relation in 2nd normal form?
There should be no partial functional dependencies. A FD (functional dependency) that holds in a relation is partial when removing one of the determining attributes gives a FD that holds in the relation. A FD that isn't partial is full.Eg: If {A,B} → {C} but also {A} → {C} then {C} is partially functionally dependent on {A,B}. Bad - All of the attributes that are not part of the key depend on Title, but only Price also depends on Format. To conform to 2NF and remove duplicities, every non-key a…
When is relation in 3rd normal form?
There should be no transitive functional dependencies.