A relational database is a system for storing data in tables made up of rows and columns, where relationships between different pieces of data are expressed by matching values across tables rather than by nesting or linking records directly. A table of customers might list each customer’s unique ID, full name, mailing address, and phone number, while a separate table of orders lists each order’s ID, the date it was placed, and the customer ID it belongs to, and the two tables are connected simply by that shared ID value. This simple, mathematically grounded structure, formalized by IBM researcher Edgar Codd in 1970, has made the relational model the dominant way of organizing structured data for more than fifty years, powering everything from small business applications to the backend systems of the largest banks and online retailers.
Tables, Keys, and Structure
Every table in a relational database follows a fixed structure called a schema, which defines what columns exist and what type of data, such as text, numbers, or dates, each column is allowed to hold. Each row in a table represents one individual record, and a special column or combination of columns called the primary key uniquely identifies every row, ensuring no two records can be mistaken for one another. When one table needs to reference a record in another table, it stores that record’s primary key as a value in its own row, called a foreign key, which is exactly how the orders table in the earlier example links each order back to the correct customer without duplicating that customer’s full information in every single order record.
This approach to linking tables through keys rather than duplicating data is central to a design practice called normalization, which organizes a database to minimize redundant information and reduce the risk that the same fact, such as a customer’s address, ends up stored in multiple places and quietly falls out of sync when it changes in only one of them. Highly normalized designs trade some query complexity, since answering a question may require combining several tables together, for strong guarantees about data consistency, while some systems deliberately accept a degree of controlled duplication, called denormalization, to make frequently run queries faster at the cost of more careful updates.
SQL and Everyday Use
Relational databases are queried and managed using Structured Query Language, or SQL, a specialized language built specifically for retrieving, filtering, combining, and updating data stored in tables. A single SQL statement can join the customers and orders tables from the earlier example on their shared ID to answer a question such as which customers placed an order in the last month, something that would require far more manual work in a system that did not organize data relationally. SQL’s declarative style, where a programmer describes what result they want rather than the exact steps to produce it, lets the database system itself figure out the most efficient way to execute each query, often using specialized structures such as indexes to avoid scanning an entire table.
Popular relational database systems include MySQL, PostgreSQL, Oracle Database, SQLite, and Microsoft SQL Server, all of which implement the same core relational concepts with their own particular features, licensing terms, and performance characteristics suited to different scales of application. Relational databases enforce properties often summarized by the acronym ACID, standing for atomicity, consistency, isolation, and durability, which together guarantee that transactions, groups of operations that must all succeed or all fail together, never leave data in a half-finished or contradictory state, even if a system crashes midway through. This reliability is a major reason relational databases remain the default choice for financial systems, medical records, and other applications where losing or corrupting data is simply not an acceptable outcome.
Frequently Asked Questions
How is a relational database different from a spreadsheet? A spreadsheet stores data in a single flat grid and offers little built-in protection against duplicate or inconsistent entries. A relational database splits data across multiple linked tables, enforces strict rules about what each column can contain, and uses keys and transactions to keep related data consistent even as many people or programs update it simultaneously.
Are all databases relational? No. Non-relational, or NoSQL, databases store data in other forms, such as flexible documents, simple key-value pairs, or graphs of connected nodes, which can be a better fit for data that does not naturally organize into fixed rows and columns or that needs to scale across many servers more easily than traditional relational systems often allow.
What does ACID mean in the context of databases? ACID describes four properties relational databases guarantee for transactions: atomicity ensures a transaction either completes fully or not at all; consistency ensures it never leaves the database in an invalid state; isolation ensures concurrent transactions do not interfere with each other; and durability ensures completed changes survive even a system crash.
Why did the relational model become so dominant? Before Codd’s 1970 paper, databases often required programmers to know the exact physical layout of data on disk just to retrieve anything, which made systems fragile and hard to change. The relational model let data be described and queried in simple, logical terms, tables, rows, and keys, completely separate from how it was physically stored, and this separation, combined with the arrival of practical SQL implementations in the following decade, made relational systems dramatically easier to build, query, and maintain than what came before.
Key facts
- Relational databases organize data into tables linked by keys.
- A primary key uniquely identifies each row; a foreign key references another table's primary key.
- Normalization reduces redundant, inconsistent data across tables.
- SQL is the standard language for querying relational databases.
- ACID properties guarantee reliable transactions.
Quick checkHow do relational databases link data stored in different tables?Show answer
They connect tables by matching key values. A primary key uniquely identifies each row in a table, and a foreign key in another table stores that same value to reference the related record, avoiding the need to duplicate data.
Sources
- Codd (1970), A Relational Model of Data for Large Shared Data Banks; PostgreSQL documentation
Editorially reviewed by Specialty Digest Editorial TeamLast reviewed November 2, 2026Researched and drafted with AI assistanceReport an issue
