Database Normalisation Flashcards
What is normalisation?
The process to minimise redundancy and improve consistency in databases
What are the two major goals that drive DB design by means or normalisation?
Information preservation and minimum redundancy
What are the four informal guidelines that can determine the quality of relation schema design?
- Clear semantics of the attributes in the schema
- Reducing the redundant information in tuples
- Reducing the null values in tuples
4, Disallowing the possibility of generating spurious tuples
What is a conceptual design?
specifies the requirements of the users, a detailed overview of the enterprise and ensure the requirements are met
What is a logical design?
maps the high level conceptual schema onto an implementation data model
What is a phsyical design?
specifies the physical features of the databases for the chosen DBMS
What is a functional dependency?
A formal constraint among attributes, so that they behave like functions
What is an injective function?
Every subset of the codomain is at most the image of a single domain element (i.e. two domain elements cannot have the same image)
What is a surjective function?
Every subset of the codomain has at least one pre-image (i.e. the range is the full codomain)
What is a key?
A minimal uniqueness constraint on attributes. A table can have multiple candidate keys
What are the rules of a key?
It cannot be NULL, the value must be unique, primary key values should rarely be changed, primary key must be given a value when a new record is inserted
When is a relation in 1st normal form?
It contains no duplicate associations, all attributes are atomic (single valued), all attributes are distinct, the ordering of rows is irrelevant.
When is a relation in 2nd normal form?
- It is in 1NF
- Every non-prime attribute of the relation is fully dependant on each candidate key of the relation (OR All non-key attributes are fully functionally dependent on the primary key)
When is a relation in 3rd normal form?
- It is in 2NF
- It has no transitive functional dependencies (OR All non-key attributes are transitively dependent on the primary key)