Flat file databases

A flat file database consists of one table. As a result, a large database will most likely have data which is unnecessarily repeated several times in the same table.

The table below holds data on teachers in a school. It also contains information about the department they work in.

IDForenameSurnameDepartmentDepartment IDPhone number
1ColinArthurICT001300
2LauraBrownICT001300
3StephenMacLeodICT001300
4ScottSinclairEnglish002301
5MichelleWieEnglish002301
6RossDyettPE003302
7IanAndersonPE003302
8BettyFloodGeography004303

In this flat file database, the data on each member of staff is held together with all data for each department.

This is unnecessary as some information is stored more than once (eg the same phone number). This also results in an increased file size for the database. Using flat file databases can lead to three very specific problems:

  • insert anomaly
  • delete anomaly
  • update anomaly