What is a Relational Database?

Technology — James William Steven Parker

A relational database is a database that organises data according to the relational model, in which information is represented logically through relations that are commonly presented to users as tables. A table consists of rows and columns, with each row representing a record or tuple and each column representing an attribute with a defined domain or type. Relational databases use relationships among tables to represent connected information rather than necessarily duplicating the same information in every record.

For example, a customer table can contain one record per customer while an orders table can contain multiple orders associated with each customer through an identifier. The relational model was formally introduced by computer scientist Edgar F. Codd in a landmark 1970 paper, building on mathematical concepts from set theory and predicate logic. Commercial relational database systems subsequently became one of the dominant approaches to structured data management.

A relational schema defines the structure of the database. It specifies tables or relations, columns, data types, constraints and relationships. A primary key identifies rows uniquely within a table, while a foreign key can reference a key in another table and establish a referential relationship. Unique constraints can prevent duplicate values, NOT NULL or equivalent constraints can require values to be present, and CHECK constraints can restrict values according to specified conditions.

These rules help maintain data integrity independently of the application code that happens to access the database. Relational design frequently separates different entities into different tables to reduce unnecessary duplication. This process is associated with normalisation, which provides principles for organising attributes and dependencies. Normalisation can improve consistency and reduce update anomalies, although deliberately denormalised structures can sometimes be appropriate for performance or reporting workloads.

SQL, or Structured Query Language, is the principal language associated with relational databases, although individual systems implement different dialects and extensions. SQL supports operations for querying and manipulating data, defining database objects and controlling access. SELECT statements retrieve information, INSERT creates rows, UPDATE modifies existing rows and DELETE removes rows. JOIN operations combine related information from multiple tables according to specified conditions, while GROUP BY and aggregate functions support summarisation.

SQL is primarily declarative: a query describes the desired result and allows the database engine to determine how to produce it. SQL standards are developed through international standardisation processes, but products such as PostgreSQL, MySQL, Microsoft SQL Server and Oracle Database each provide their own extensions and implementation differences. Consequently, SQL knowledge is highly transferable but is not perfectly portable between all relational database systems.

Relationships are central to the relational model. A one-to-one relationship associates one record with one record, a one-to-many relationship associates one record with multiple records, and a many-to-many relationship normally requires an intermediary or junction table. For example, students and courses have a many-to-many relationship because one student can take many courses and one course can contain many students. A junction table can store student-course associations and may contain additional attributes such as enrolment date or status.

Foreign keys can enforce referential integrity so that an order cannot refer to a nonexistent customer. Relationships can also be represented through self-referencing tables, such as an employee table in which one employee references another employee as a manager. Understanding these relationships is important because database design determines how information can be queried, updated and kept consistent.

Relational databases are particularly strong for structured information requiring transactions, constraints and complex relationships. Financial systems, inventory management, customer relationship systems, accounting applications and many enterprise applications commonly use relational databases because operations can be expressed through transactions and integrity constraints. ACID transaction properties provide a framework for reliable multi-step operations, while indexes and query optimisers support complex queries over large structured datasets. Relational systems can also provide views, stored procedures, triggers, functions, roles, replication and advanced analytical capabilities. However, relational does not mean that every database must contain perfectly static data or that relational systems cannot scale. Modern relational databases support JSON, spatial information, full-text search, partitioning, replication and other features that extend beyond simple tables.

Normalisation and denormalisation are important relational design concepts. Normalisation involves structuring tables so that facts are stored in appropriate places and dependencies are represented consistently. Common normal forms include first, second and third normal form, as well as Boyce-Codd normal form and more advanced forms. The practical purpose is to reduce anomalies such as having to update the same fact in multiple places, accidentally creating inconsistent duplicates or being unable to represent a fact without unrelated data.

Denormalisation intentionally introduces some duplication or precomputed structures when query performance or reporting requirements justify it. Modern database design therefore balances logical integrity with physical performance. A normalised transactional schema and a denormalised analytical representation can coexist in the same overall data architecture, particularly when operational and reporting workloads have different requirements.

Relational databases have limitations as well as strengths. Highly connected or rapidly changing data models can sometimes become cumbersome when represented through numerous relational joins, although relational databases can still model complex relationships effectively. Very large distributed workloads can introduce challenges involving coordination, consistency and partitioning. Schema changes also require careful management when many applications depend on the same structures.

Relational systems may be less convenient than document databases for data whose structure varies substantially between records, although many modern relational products provide semi-structured data types. It is also incorrect to assume that NoSQL databases are inherently faster or that relational databases cannot scale horizontally; actual performance depends on workload, architecture, implementation and data-access patterns. The appropriate model is determined by requirements rather than by broad claims that one database category is universally superior.

A relational database is therefore a structured database system based on the relational model, tables, attributes, keys, relationships, constraints and typically SQL. Its defining principles are more precise than simply storing data in rows and columns: the relational model provides a formal approach to representing facts and relationships, while database products implement practical storage, query, transaction and administration mechanisms around that model. Relational systems are widely used because they combine expressive querying with strong integrity and transaction capabilities.

Examples include MySQL, PostgreSQL, Microsoft SQL Server and Oracle Database, as well as many other systems. Although the basic relational model is decades old, contemporary relational databases support distributed deployments, cloud infrastructure, JSON documents, advanced indexing, analytics and other modern workloads. They remain a major foundation for application development because structured data, relationships, transactions and integrity requirements continue to be common across software systems.