- What is first normal form (1NF)?
- A table is in first normal form when all data is atomic, so each cell holds one value. It must have a primary key and no duplicated rows or columns. To reach it, split names, address parts and telephone numbers into their own fields, and remove duplicate rows so the key is unique.
- What is a partial dependency, and how is it removed for second normal form (2NF)?
- A table is in 2NF when it is in 1NF and has no partial dependencies. A partial dependency is a field that depends on only part of a compound key. To remove it, move that field to a new table, make the part of the key it depends on the primary key of that table, and keep it in the original table as a foreign key.
- What is third normal form (3NF)?
- A table is in 3NF when it is in 2NF and has no non-key dependencies, meaning a non-key field depends on another non-key field. Move those fields to a new table, with the field they depend on as its primary key. That field stays in the old table as a foreign key. A 3NF database still repeats foreign key values, but it does not repeat whole records.
- What are the advantages and disadvantages of normalising a database?
- Normalising removes redundant data, so less storage space is needed. A change is made in one place, so the data stays consistent with fewer errors. The main disadvantage is that normalising needs greater expertise, so it costs more.
- What is unnormalised form (UNF)?
- A table in unnormalised form has had no normalisation rules applied. It can hold more than one value in a cell, such as a list of trips, and it can hold a field that is not atomic, such as a full name. The same data can be duplicated many times.
- Does a normalised database contain any duplicated data?
- A normalised database has no redundant data and no duplicated records, but a foreign key value is still repeated in the linked table. Saying that a normalised database has no duplicated data at all is the most common error. Give the reason that foreign keys repeat.