1. File-based approach and the relational answer
A file-based approach has a list of limitations. It has more data redundancy, because the same data is stored many times. It has more data inconsistency, because duplicated data might be stored differently, or data updated in one place is not updated everywhere. It has program-data dependence, because any change to the structure of the data means the programs that access that data have to be rewritten.
It is also not easy to perform complex searches, because a new program has to be written each time. User views cannot easily be implemented, so there could be a lack of privacy.
A relational database addresses these. Linked tables mean that each data item is stored only once, which reduces redundancy, and data stored once only needs to be updated once. The data is separate from the software, so changes to the data do not require programs to be rewritten. Complex queries are easier to run, and different views let users see only specific aspects of the database.
Examiner insight
Worked example 13 marks
Bobby tells Kim that a file-based approach is usually better than a relational database.
Explain why Bobby is incorrect.
- 1
Flat-file has more data redundancy [1]
- 2
... because the same data is stored many times [1]
- 3
There is program-data dependence with flat files, so any change to the structure of the data means the programs that access that data have to be rewritten [1]