What Is a Relational Database?
A relational database stores data in tables. Each table has columns that define what kind of data lives in it and rows that hold the actual records. The "relational" part is that tables can reference each other through shared values, so you can split your data across many small focused tables and still ask questions that combine them.
The model was invented by Edgar Codd at IBM in 1970, in a paper called "A Relational Model of Data for Large Shared Data Banks". Fifty-five years later it is still the default choice for almost every business system on the planet. There is a reason for that, and the reason is the subject of this lesson.
Tables, rows, columns
Imagine a small bookshop. You want to track which books you stock and which customers have ordered them. In a relational database you would model that as two tables:
Books
+-------+--------------------+--------+--------+
| id | title | author | price |
+-------+--------------------+--------+--------+
| 1 | The Power of One | Bryce | 280.00 |
| 2 | Disgrace | Coetzee| 250.00 |
| 3 | Long Walk to Freedom| Mandela| 320.00 |
+-------+--------------------+--------+--------+
Customers
+-------+--------------+---------------------+
| id | name | email |
+-------+--------------+---------------------+
| 101 | Thandi Khoza | thandi@example.com |
| 102 | Pieter de Wet| pieter@example.com |
+-------+--------------+---------------------+
Every table has the same shape: columns at the top, rows below. Every row in the same table has the same columns. Every column has a single data type (text, number, date) that applies to every row.
Keys and relationships
The interesting part is the third table. When a customer orders a book, you do not duplicate all the book details and all the customer details into a new row. You record only the link between them:
Orders
+-------+-------------+---------+----------+
| id | customer_id | book_id | quantity |
+-------+-------------+---------+----------+
| 5001 | 101 | 1 | 2 |
| 5002 | 101 | 3 | 1 |
| 5003 | 102 | 2 | 1 |
+-------+-------------+---------+----------+
Orders has a customer_id column that matches an id in Customers, and a book_id column that matches an id in Books. These references are called foreign keys. The id columns they point to are called primary keys.
What "relational" actually means
The word does not mean "tables relate to each other through foreign keys", though that is true. It comes from set theory. A relation in mathematics is a set of tuples. A table is a set of rows (tuples) that share the same structure. So a relational database is literally a database of relations in the mathematical sense.
That mathematical grounding is why SQL is so powerful. Most things you do to data are operations from set theory: selecting subsets, joining sets, finding intersections, applying predicates. SQL is the dialect we use to express those operations.
The major relational engines you will meet
There are about eight RDBMS engines that dominate the industry. You will run into most of them in a SA career.
| Engine | Vendor | Where you will see it |
|---|---|---|
| SQL Server | Microsoft | Banks, insurers, large SA enterprises, government, anywhere .NET is the dev stack. The primary dialect this course teaches (T-SQL). |
| PostgreSQL | Open source | Startups, modern web apps, Supabase, AWS RDS, anywhere a powerful free option is preferred. Strong on standards. |
| MySQL / MariaDB | Oracle / MariaDB Foundation | WordPress sites, LAMP-stack web apps, smaller business systems, lots of legacy hosted-on-shared-hosting deployments. |
| Oracle Database | Oracle | Large enterprises, especially financial services and telcos. Expensive but entrenched. Uses PL/SQL as the procedural dialect. |
| SQLite | Open source | Embedded in mobile apps, browsers, IoT devices. Single-file database. The most-deployed database engine in the world. |
| IBM Db2 | IBM | Mainframe-attached enterprises, still common in large banks running legacy core systems. |
This course teaches T-SQL (SQL Server) as the primary dialect because it is what most SA enterprises use, and because the way SQL Server handles indexing and concurrency (which we cover in Course 2) is the cleanest model for teaching those concepts. Where the other engines do something interestingly different, we will flag it in a sidebar.
- Tables hold the data. Each table is a set of rows. Each row has the same columns. Each column has one data type.
- Keys connect tables. A primary key uniquely identifies a row. A foreign key references a primary key in another table.
- The relational model is mathematical. Set theory underpins it, which is why SQL is so powerful for asking complex questions.
- Six engines dominate. SQL Server, PostgreSQL, MySQL, Oracle, SQLite and Db2 cover almost every relational deployment you will encounter in SA.