The relational model (RM) is an approach to managing
data using a
structure
A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
and language consistent with
first-order predicate logic, first described in 1969 by English computer scientist
Edgar F. Codd
Edgar Frank "Ted" Codd (19 August 1923 – 18 April 2003) was an English computer scientist who, while working for IBM, invented the relational model for database management, the theoretical basis for relational databases and relational databa ...
,
where all data is represented in terms of
tuples, grouped into
relation
Relation or relations may refer to:
General uses
*International relations, the study of interconnection of politics, economics, and law on a global level
*Interpersonal relationship, association or acquaintance between two or more people
*Public ...
s. A database organized in terms of the relational model is a
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
.
The purpose of the relational model is to provide a
declarative method for specifying data and queries: users directly state what information the database contains and what information they want from it, and let the database management system software take care of describing data structures for storing the data and retrieval procedures for answering queries.
Most relational databases use the
SQL data definition and query language; these systems implement what can be regarded as an engineering approximation to the relational model. A ''table'' in a SQL
database schema
The database schema is the structure of a database described in a formal language supported by the database management system (DBMS). The term "schema" refers to the organization of data as a blueprint of how the database is constructed (divide ...
corresponds to a predicate variable; the contents of a table to a relation; key constraints, other constraints, and SQL queries correspond to predicates. However, SQL databases
deviate from the relational model in many details, and Codd fiercely argued against deviations that compromise the original principles.
Overview
The central idea of a relational model is to describe a database as a collection of
predicates over a finite set of predicate variables, describing
constraints on the possible values and combinations of values. The content of the database at any given time is a finite (logical)
model of the database, i.e. a set of
relation
Relation or relations may refer to:
General uses
*International relations, the study of interconnection of politics, economics, and law on a global level
*Interpersonal relationship, association or acquaintance between two or more people
*Public ...
s, one per predicate variable, such that all predicates are satisfied. A request for information from the database (a
database query) is also a predicate.
Alternatives
Other
models
A model is an informative representation of an object, person or system. The term originally denoted the plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin ''modulus'', a measure.
Models c ...
include the
hierarchical model
A hierarchical database model is a data model in which the data are organized into a tree-like structure. The data are stored as records which are connected to one another through links. A record is a collection of fields, with each field containin ...
and
network model. Some
system
A system is a group of Interaction, interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its environment (systems), environment, is described by its boundaries, ...
s using these older architectures are still in use today in
data center
A data center (American English) or data centre (British English)See spelling differences. is a building, a dedicated space within a building, or a group of buildings used to house computer systems and associated components, such as telecommunic ...
s with high data volume needs, or where existing systems are so complex and abstract that it would be cost-prohibitive to migrate to systems employing the relational model. Also of note are newer
object-oriented databases.
Implementation
Several attempts have been made to produce a true implementation of the relational database model as originally defined by
Codd and explained by
Date,
Darwen and others, but none have popular successes so far. ,
Rel is one of the more recent attempts to do this.
The relational model was the first database model to be described in formal mathematical terms. Hierarchical and network databases existed before relational databases, but their specifications were relatively informal. After the relational model was defined, there were many attempts to compare and contrast the different models, and this led to the emergence of more rigorous descriptions of the earlier models; though the procedural nature of the data manipulation interfaces for hierarchical and network databases limited the scope for formalization.
Structural database analytics employing relational modality protocols frequently employ data sequence differentials to maintain hierarchical architecture designations with incorporation of new input. These systems are functionally similar in concept to alternative relay algorithms, which form the foundation of
cloud database infrastructure.
History
The relational model was developed by
Edgar F. Codd
Edgar Frank "Ted" Codd (19 August 1923 – 18 April 2003) was an English computer scientist who, while working for IBM, invented the relational model for database management, the theoretical basis for relational databases and relational databa ...
as a general model of data, and subsequently promoted by
Chris Date
Chris Date (born 1941) is an independent author, lecturer, researcher, and consultant, specializing in relational database theory.
Biography
Chris Date attended High Wycombe Royal Grammar School (U.K.) from 1951 to 1958 and received his BA i ...
and
Hugh Darwen among others. In their 1995 ''The Third Manifesto'', Date and Darwen try to demonstrate how the relational model can accommodate certain "desired"
object-oriented features.
Extensions
Some years after publication of his 1970 model, Codd proposed a
three-valued logic (True, False, Missing/
NULL) version of it to deal with missing information, and in his ''The Relational Model for Database Management Version 2'' (1990) he went a step further with a four-valued logic (True, False, Missing but Applicable, Missing but Inapplicable) version. These have never been implemented, presumably because of their inherent complexity. SQL's NULL construct was intended to be part of a three-valued logic system, but fell short of that due to logical errors in the standard and in its implementations.
Topics
The fundamental assumption behind a relational model is that all
data is represented as mathematical ''n''-
ary ARY may stand for:
* Abdul Razzak Yaqoob, a Pakistani expatriate businessman
* Andre Romelle Young, real name of Dr. Dre
* Ary and the Secret of Seasons, an action adventure video game
* ARY Digital, a Pakistani television network
* ARY Digital Net ...
relation
Relation or relations may refer to:
General uses
*International relations, the study of interconnection of politics, economics, and law on a global level
*Interpersonal relationship, association or acquaintance between two or more people
*Public ...
s, an ''n''-ary relation being a
subset
In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
of the
Cartesian product
In mathematics, specifically set theory, the Cartesian product of two sets ''A'' and ''B'', denoted ''A''×''B'', is the set of all ordered pairs where ''a'' is in ''A'' and ''b'' is in ''B''. In terms of set-builder notation, that is
: A\ti ...
of ''n'' domains. In the mathematical model,
reasoning
Reason is the capacity of consciously applying logic by drawing conclusions from new or existing information, with the aim of seeking the truth. It is closely associated with such characteristically human activities as philosophy, science, lang ...
about such data is done in two-valued
predicate logic, meaning there are two possible
evaluations for each
proposition: either ''true'' or ''false'' (and in particular no third value such as ''unknown'', or ''not applicable'', either of which are often associated with the concept of
NULL). Data are operated upon by means of a
relational calculus
The relational calculus consists of two calculi, the tuple relational calculus and the domain relational calculus, that are part of the relational model for databases and provide a declarative way to specify database queries. The raison d'être ...
or
relational algebra, these being equivalent in
expressive power.
The relational model of data permits the database designer to create a consistent, logical representation of
information. Consistency is achieved by including declared ''
constraints'' in the database design, which is usually referred to as the ''logical schema''. The theory includes a process of
database normalization whereby a design with certain desirable properties can be selected from a set of
logically equivalent alternatives. The
access plan
Access may refer to:
Companies and organizations
* ACCESS (Australia), an Australian youth network
* Access (credit card), a former credit card in the United Kingdom
* Access Co., a Japanese software company
* Access Healthcare, an Indian BPO se ...
s and other implementation and operation details are handled by the
DBMS
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
engine, and are not reflected in the logical model. This contrasts with common practice for SQL DBMSs in which
performance tuning often requires changes to the logical model.
The basic relational building block is the
domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
**Domain of definition of a partial function
**Natural domain of a partial function
**Domain of holomorphy of a function
* Do ...
or
data type
In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most progra ...
, usually abbreviated nowadays to ''type''. A ''
tuple'' is an unordered
set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...
of ''attribute values''. An
attribute is an unordered pair of ''attribute name'' and ''type name''. An attribute value is a specific valid value for the type of the attribute. This can be either a scalar value or a more complex type.
A relation consists of a ''heading'' and a ''body''. A heading is a set of attributes. A body (of an ''n''-ary relation) is a set of ''n''-tuples. The heading of the relation is also the heading of each of its tuples.
A relation is defined as a