encyclopegia.org

Relation (database)

In database theory, a relation, as originally defined by E. F. Codd, is a set of tuples (d 1 ,d 2 ,...,d n ), where each element d j is a member of D j , a data domain. Codd's original definition notwithstanding, and contrary to the usual definition in mathematics, there is no ordering to the elements of the tuples of a relation. Instead, each element is termed an attribute value. An attribute is a name paired with a domain (nowadays more commonly referred to as a type or data type). An attribute value is an attribute name paired with an element of that attribute's domain, and a tuple is a set of attribute values in which no two distinct elements have the same name. Thus, in some accounts, a tuple is described as a function, mapping names to values. A set of attributes in which no two distinct elements have the same name is called a heading. It follows from the above definitions that to every tuple there corresponds a unique heading, being the set of names from the tuple, paired with the domains from which the tuple elements' domains are taken. A set of tuples that all correspond to the same heading is called a body. A relation is thus a heading paired with a body, the heading of the relation being also the heading of each tuple in its body. The number of attributes constituting a heading is called the degree, which term also applies to tuples and relations.…

In database theory, a relation, as originally defined by E. F. Codd, is a set of tuples (d 1 ,d 2 ,...,d n ), where each element d j is a member of D j , a data domain. Codd's original definition notwithstanding, and contrary to the usual definition in mathematics, there is no ordering to the elements of the tuples of a relation. Instead, each element is termed an attribute value. An attribute is a name paired with a domain (nowadays more commonly referred to as a type or data type). An attribute value is an attribute name paired with an element of that attribute's domain, and a tuple is a set of attribute values in which no two distinct elements have the same name. Thus, in some accounts, a tuple is described as a function, mapping names to values. A set of attributes in which no two distinct elements have the same name is called a heading. It follows from the above definitions that to every tuple there corresponds a unique heading, being the set of names from the tuple, paired with the domains from which the tuple elements' domains are taken. A set of tuples that all correspond to the same heading is called a body. A relation is thus a heading paired with a body, the heading of the relation being also the heading of each tuple in its body. The number of attributes constituting a heading is called the degree, which term also applies to tuples and relations. The term n-tuple refers to a tuple of degree n (n ≥ 0). E. F. Codd used the term "relation" in its mathematical sense of a finitary relation, a set of tuples on some set of n sets S 1 ,S 2 ,....,S n . Thus, an n-ary relation is interpreted, under the Closed-World Assumption, as the extension of some n-adic predicate: all and only those n-tuples whose values, substituted for corresponding free variables in the predicate, yield propositions that hold true, appear in the relation. A heading paired with a set of constraints defined in terms of that heading is called a relation schema. A relation can thus be seen as an instantiation of a relation schema if it has the heading of that schema and it satisfies the applicable constraints. Sometimes a relation schema is taken to include a name. A relational database definition (database schema, sometimes referred to as a relational schema) can thus be thought of as a collection of named relation schemas. In implementations, the domain of each attribute is effectively a data type and a named relation schema is effectively a relation variable (relvar for short). In SQL, a database language for relational databases, relations are represented by tables, where each row of a table represents a single tuple, and where the values of each attribute form a column. CREATE TABLE List_of_people ( ID INTEGER, Name CHAR(40), Address CHAR(200), PRIMARY KEY (ID) ) The Data Definition Language (DDL) is also used to define derived relation variables. In SQL, CREATE VIEW syntax is used to define a derived relation variable. The following is an example. CREATE VIEW List_of_Okinawa_people AS ( SELECT ID, Name, Address FROM List_of_people WHERE Address LIKE '%, Okinawa' )

References

No reference rows published for this article.

Cite this article

MLA

"Relation (database)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/relation-database. Accessed 24 November 2026.

Chicago

"Relation (database)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/relation-database.

APA

encyclopegia.org. (2026). Relation (database). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/relation-database

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Metadatabase

enwiki · references available

Little Rock, Mississippi

enwiki · references available

Miatsum

enwiki · references available

Amazin' (Trina album)

enwiki · references available

Roger Paris

enwiki · references available

Carex williamsii

enwiki · references available

C20H30O

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1374381035 · 0.5 · snapshot enwiki-001374381035

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.