What Is a Relational Database?

If you’re learning SQL, you’ll hear the term relational database a lot. In fact, SQL was specifically designed to work with relational databases.

But what exactly does that mean?

At its core, a relational database is simply a way of organizing data into structured tables that can be related to each other. Those relationships make it possible to store information efficiently and retrieve it in powerful ways using SQL.

Understanding this concept will make many other SQL topics—like joins, keys, and normalization—much easier to understand later.

Data Organized Into Tables

A relational database stores data in tables, which look similar to spreadsheets.

Each table contains rows and columns.

Rows represent individual records, while columns represent attributes of those records.

For example, imagine a table that stores information about paintings in a gallery.

Example Table

TitleArtistYearCreatedCountryOfOrigin
Mona LisaLeonardo da Vinci1503Italy
The Starry NightVincent van Gogh1889Netherlands
The ScreamEdvard Munch1893Norway

Each row represents a single painting, and each column describes something about that painting.

So far, this looks simple. But the real power of relational databases comes from something else: relationships between tables.

Tables Can Be Related to Each Other

A relational database rarely stores everything in a single table. Instead, information is divided into multiple tables that connect to each other.

For example, instead of storing the artist name directly in the paintings table, a database might store artists in a separate table.

Example Table: Gallery.Artists

ArtistIDArtistNameCountry
1Leonardo da VinciItaly
2Vincent van GoghNetherlands
3Edvard MunchNorway

The paintings table could then reference the artist using an ID.

Example Table: Gallery.Paintings

TitleArtistIDYearCreated
Mona Lisa11503
The Starry Night21889
The Scream31893

This relationship allows the database to connect information across tables without storing the same data repeatedly.

SQL queries can combine these tables whenever needed.

For example, a query could join the tables together to show painting titles alongside artist names.

Why Relational Databases Use Relationships

Splitting information into related tables has several important advantages.

Reduced duplication
Storing artist information in one table prevents repeating the same details for every painting created by that artist.

Improved consistency
If an artist’s information changes, it only needs to be updated in one place.

Better organization
Each table focuses on a specific type of information, making the database easier to maintain and understand.

These ideas are part of a broader concept called database normalization, which we’ll explore in more detail in another post.

The Meaning of “Relational”

The word relational simply refers to the fact that tables are connected through relationships.

These relationships are typically created using keys, such as:

  • Primary keys – unique identifiers for rows in a table
  • Foreign keys – columns that reference data in another table

For example, ArtistID might be the primary key in the Gallery.Artists table and appear as a foreign key in Gallery.Paintings.

Those connections allow SQL queries to combine data from multiple tables in meaningful ways.

Where Relational Databases Are Used

Relational databases power many of the systems we interact with every day.

Examples include:

  • Online stores tracking orders and customers
  • Banking systems managing accounts and transactions
  • Hospital systems storing patient and medical records
  • Streaming platforms tracking shows, users, and viewing history

Whenever structured data needs to be stored and connected logically, relational databases are often the solution.

SQL and Relational Databases

SQL (Structured Query Language) was designed specifically for relational databases.

SQL allows you to:

  • Retrieve information from tables
  • Filter and sort results
  • Combine data from related tables
  • Add, update, or delete records
  • Define relationships between tables

In other words, SQL is the language used to communicate with a relational database.

Once you understand how relational databases organize data, SQL queries start to make much more sense.

Key Takeaways

• A relational database stores data in structured tables made up of rows and columns.
• Tables represent specific types of information, such as paintings or artists.
• Tables can be related to each other, allowing data to be connected across the database.
• Relationships reduce duplication, improve consistency, and keep data organized.
• SQL is the language used to retrieve and manage data stored in relational databases.

Relational databases are the foundation of SQL, and understanding how they organize data will make the rest of your SQL journey much easier.

Scroll to Top