What Is a Relational Database?
Imagine a small online shop that keeps its records in one giant spreadsheet. Every time Asha places an order, someone types her name, her city and her email again. When she moves from Pune to Delhi, half her rows get updated and half do not, and now the shop has two versions of the truth. A relational database exists to stop exactly this.
The rule
One thing per table, one fact per row, linked by keys.
A relational database stores data in tables (the formal name is relations). Each table holds one kind of thing: customers, products, orders. Each row is one instance of that thing, and each column is one detail every row has. One column, the primary key, gives every row a unique identity, like customer_id.
Tables connect by storing another table's key. An order does not copy Asha's name and city; it stores her customer_id, and the database can look up the rest whenever you ask. That stored key is called a foreign key.
This is the small shop we will use for the whole course:
customers (customer_id, name, city, email, joined_on)
products (product_id, name, category, price)
orders (order_id, customer_id, product_id, quantity, order_date, status)Asha's city lives in exactly one row of customers. Change it once and every order that points to her sees the new city automatically.
You talk to a relational database in SQL (Structured Query Language). You describe what you want — "every order from a customer in Pune" — and the database works out how to fetch it.
The shortcut
When you meet any new set of data, sort every word in its description into four buckets: noun → table, instance → row, detail → column, "belongs to" → key.
Read the sentence
"Asha from Pune ordered 2 notebooks priced at 60 rupees each on 3 March."
The trap to watch for: a detail that repeats across many rows (like Asha's city on every order) is a sign it belongs in a different table.
Drills
Answer fast — trust the rule.
In the customers table, a single customer such as Asha is stored as one…
Why does orders store customer_id instead of the customer's name and city?
In relational database theory, what does the word relation formally mean?
Which column is the best choice to identify each row of products uniquely?
Remember
- One thing per table, one fact per row, linked by keys.
- Noun → table, instance → row, detail → column, "belongs to" → key.
- A detail copied onto many rows is a warning sign: it probably belongs in its own table.
