1. Flat file database

Information is held in a single table where each column is called an attribute and each row is a record.

Copy of Example of a flat file database

<aside> ❌ Why are they bad? Data redundancy (i.e. repetition of data) and data inconsistency (i.e. errors in the values or format of data that should be identical).

</aside>

2. Relational databases

The solution to flat-file databases.

An example of a relational database

An example of a relational database

Advantages of relational databases:

  1. No data redundancy – in a well-designed relational database there should be no duplicated data (other than the key field).
  2. No data inconsistency – as data is not duplicated, there is no risk of the same data item being stored differently in another record.
  3. Flexibility – A relational database can be queried with greater flexibility than a flat-file system. Relationships mean that data can be combined in a variety of ways to produce the views that different areas of an organisation require.

Understanding the difference between entities and attributes.

  1. Entity – Library books.

    Attributes – ISBN number, author, category etc.

  2. Entity – Flights.

    Attributes – Flight No., aircraft type, departure/arrival date/time, destination etc.