Databases store data in an organized way so it can be queried and analysed. This unit covers why we move from a single flat file to a relational database made of linked tables, the keys that create those links, and the relationships between entities.
Slide 1 / 4
Flat file vs relational databases
A flat file database stores everything in a single entity (table), which repeats data and wastes storage space.
Repeated data causes data inconsistency: when the same fact is stored many times, it is hard to know which copy is correct.
Flat files suffer from three anomalies: insert, deletion and update anomalies.
A relational database splits the data into several linked entities to reduce this repetition.
Check you've got it
0/4
1. In a veterinary flat file database, you cannot add a new vet's details until a patient and an owner also exist in the same record. Which anomaly is this?
2. What is a foreign key?
3. One vet can carry out many treatments, but each treatment is carried out by only one vet. What is the cardinality of this relationship?
4. A receipt must always be linked to at least one item that was bought. What does this describe?
Free revision content. Multiple-choice answers are marked instantly. Written answers are marked by AI on /free-mark.