Flat File Databases & Relational Databases (3.9.a)
Flat File Databases
All records are kept in one table. One row of the table corresponds to one record. Each column of the table corresponds to one field. This means that data could be duplicated or inconsistent across tables, wasting time and storage. Changes to the data may require the entire file to be rewritten, which is inefficient, especially as the database gets large.
Data is kept in a number of related (or "linked") tables, so data cannot easily be duplicated, and data cannot be inconsistent. Data is easier to change, and the format can be changed more easily. Access to the data can be controlled more flexibly.
Third Normal Form (3.9.b)
Third normal form avoids duplicate data, by making sure there are no dependencies between attributes other than the primary key. Many to many relationships are not acceptable in third normal form.
Entity Relationship Diagrams
The diagrams below show:
- A one to one relationship (top left) - one owner owns one dog.
- A one to many relationship (top right) - one owner owns many dogs.
- A many to one relationship (bottom right) - many owners own one dog.
- A many to many relationship (bottom left) - many owners own many dogs. This cannot exist in 3NF.