Flashcards
Database Normalisation

Flashcards do conjunto (14)
- 1Zero Normal FormA flat-file database
All elements in a single table
Similar to a spreadsheet.
Lots of data repetition and redundancy - 2First Normal FormFor a database to be in First Normal Form, there must be no repeated fields.
This database repeats the book data 3 times - 3First Normal FormThe repeated data is taken out and put into its own table with its own primary key

- 4But what if the customer wants to borrow more than one book?We could, instead, put a loan ID in the Book table:
Many-to-many relationships can not be created with a single primary key
- 5First Normal FormTo get round this, we use a Compound Primary Key.
A compound primary key uses two element to create the key.
Each element can be repeated, but the combination of the two can not. - 6put a compound primary key in the Book table:

- 7Second Normal FormFor a table to be in Second Normal Form, there must be no elements dependant on part of a compound primary key.
- 8example

- 9Second Normal FormThe elements dependant on part of the key are separated
- 10example

- 11Third Normal FormFor a database to be in Third Normal Form, there must be no non-key dependencies
- 12Third Normal Form

- 13Third Normal FormPut the non-key dependencies into their own table

- 14How to rememberEach attribute is dependent on the key, the whole key, and nothing but the key!
So, to get to third normal form, your non-repeating fields (first normal form) need to be dependent on the whole of the key (second normal form), and nothing other than the key (third normal form).
Informações
- Descrição
- FlashCards sobre Database Normalisation, criado por Ed Allen em 17-12-2019.
- Criado por
- Ed Allen
- Visualizações
- 2
- Avaliação