flat file
A single plain text file that holds all the data as lines, with no tables linked to each other and no rules enforced.
In more detail
The course starts from a CSV file (comma-separated values), where every order line repeats the customer's name and city. Nothing stops two copies of the same fact from disagreeing, nothing checks that values are valid, and answering a question means writing a loop over every line. A relational database fixes each of these problems.
Example
1004,2024-04-21,Chen Wei,Singapor,SG,HDMI Cable,1,1500 # the misspelt city is a second, disagreeing copyRelated terms
- relational database — A database that stores data in tables and links rows in one table to rows in another through shared key values.
- normalisation — Designing tables so each fact is stored in exactly one place, by splitting repeated data into related tables.
- table — A named set of rows that all have the same columns, where each row records one fact about one thing.
Taught in
- Why Tables And Relations Beat Files — PostgreSQL, Indexing & Relational Data Modeling