DBMS and RDBMS
The software that runs a database, and why most of it today is relational.
Lesson 2 of 35 · about 10 minutes
The lesson
In the last lesson you met a short word: DBMS, a database management system. Let's open it up.
Think of the library again. The books on the shelves are the database: the data itself. The librarians, the catalogue and the rules about borrowing are the DBMS: the software that looks after the data. It stores it, finds it when you ask, stops two people from getting in each other's way, and keeps it safe if the power fails. You never touch the shelves directly. You always go through the librarian.
Early database software stored data in different shapes. Some kept it like a family tree, where every record had exactly one parent above it: the shop, then each author, then that author's books. That worked until data didn't fit the tree. Good Omens was written by Terry Pratchett and Neil Gaiman together, so it had to be copied under both authors, and copies can drift apart.
In 1970, a researcher at IBM called Edgar Codd suggested a simpler idea: keep all data in tables of rows and columns, and link tables together using shared values called keys. A table in this idea is called a relation, so this is the relational model. Software built this way is a relational database management system, or RDBMS.
| customers.id | name | city |
|---|---|---|
| 1 | Emma | London |
| 2 | Yuki | Tokyo |
| orders.id | customer_id | book |
|---|---|---|
| 101 | 2 | Sapiens |
| 102 | 1 | Small Gods |
| 103 | 2 | Norwegian Wood |
Orders 101 and 103 both say customer 2, so both are Yuki's. Her name is written only once, so it can never disagree with itself.
So what's the difference?
| DBMS | RDBMS | |
|---|---|---|
| What it is | Any software that manages a database | A DBMS that stores data in linked tables |
| How data is shaped | Could be files, trees, documents or tables | Always tables of rows and columns |
| Links between data | Not always enforced | Tables are linked with keys, and the links are checked |
| Language | Varies | SQL |
| Examples | Any of the ones on the right, plus older or special-purpose systems | MySQL, PostgreSQL, Oracle, SQL Server, SQLite |
The simplest way to remember it: every RDBMS is a DBMS, but not every DBMS is relational. Every square is a rectangle, but not every rectangle is a square.
Today, most business databases are relational. Your bank, airline bookings, online shops and payroll almost certainly run on an RDBMS. Some apps also use non-relational databases, often called NoSQL, such as MongoDB or Redis, for special jobs. This course is about relational databases, because that's where SQL lives.
- A DBMS is the software that stores, finds and protects the data in a database.
- An RDBMS is a DBMS that keeps data in tables linked by keys, and you talk to it with SQL.
- Every RDBMS is a DBMS, but not every DBMS is relational. Most business databases today are relational.