| Databases : Relational vs Flat File
|
|
|
In a flat file database data can only be stored in one file. Here is an example of a flat file database that stores information about students in a school including
what form they are in and who their form teacher is :
There are two serious problems that have been caused by trying to store this data in a flat file database :
- Redundant Data : Some data is stored more than once. This means that storage space is wasted and inconsistency can occur.
- Data Inconsistency : Because some items of data are stored more than once, it is possible that in error two different values for the same item could be stored.
If a relational database is used instead then data can be stored in multiple files which are linked by common fields. Here is the same data
stored in two files in a relational database :
Relational databases have two important advantages over flat file databases :
- Control Over Redundant Data : Wherever possible data is only stored once, so storage space is not wasted
- Data Consistency : Because each data item is stored only once it is not possible for the
same item to store two different values, hence the data will always be consistent.
GCSE ICT Companion 04 - (C) P Meakin 2004