Relational database concept
What Is a Relational Database?
A relational database is a database that organises data into multiple separate tables, where the tables are linked to one another through shared data values. The word "relational" refers to these relationships between tables - not to relationships between people or objects in the real world.
The key insight behind the relational model is that storing all data in a single large table creates problems: data is repeated unnecessarily, updates become error-prone, and the structure becomes rigid and hard to query. Splitting data across multiple focused tables - and linking them where needed - avoids these problems.
Why Use Multiple Tables?
Consider a school database. Storing every pupil's form tutor's full name, room number, and contact details alongside every pupil record means that information is duplicated hundreds of times. If the tutor moves to a new room, every pupil record must be updated individually. Instead, a relational database holds tutors in one table and pupils in another, with a simple link between them:
When tables are linked in this way, data only needs to be stored once - in the table where it belongs. If Ms Khan moves to a different room, only one record in the Tutors table needs to change, and the update is instantly reflected for every pupil linked to her. This avoids the problem of data redundancy (storing the same information multiple times) and reduces the chance of inconsistencies creeping in.
The mechanism that creates the link between tables is a shared value - a field that appears in both tables and allows the database to match records. The specific terminology for how this works (primary key and foreign key) is covered in the next benchmark.
Key Takeaways
- A relational database stores data in multiple separate tables that are linked to each other through shared values.
- Splitting data across related tables avoids data redundancy - information is stored once in the table where it belongs.
- Linking tables means a single update in one table is reflected everywhere that data is used, reducing errors and inconsistencies.