Relational database
From Free net encyclopedia
- This article presents an overview of the topics associated with relational databases. For more detailed presentations on specific topics, follow the Main article links under each major heading, or refer to the See also section at the end of the article.
A relational database is a database structured in accordance with the relational model. Strictly speaking the term refers to a specific collection of data but it is invariably employed together with the software used to manage that collection of data. That software is more correctly called a relational database management system (RDBMS).
All data that is stored in and retrieved from a relational database is cast in the form of relations. A k-adic relation is a set of k-tuples that constitutes the extension of a k-adic predicate. However, these tuples differ from the more abstract tuples of mathematics by having more concrete qualities associated with the places of the relation. In this setting, the components of the tuples, called attribute values or feature values, are identified by means of attribute names or feature names. Queries and integrity constraints are expressed declaratively, without the use of iterative loops or pointers, using operators based on the relational algebra and relation comparisons. The relational algebra is complete with respect to first-order predicate calculus except that restrictions are imposed on the use of the logical operations of negation and disjunction in order to guarantee that database computations will be feasible in practice.
Contents |
Schematic example of a relational database
A concept of relation that suffices to begin can be set out as follows.
- Defined in extension, a k-adic relation <math>L\!</math> is a set of k-tuples.
- A k-tuple <math>\mathbf{x}</math> is a sequence of k elements, <math>x_1, \ldots, x_k</math>, called the components of the k-tuple. The components of the k-tuple <math>\mathbf{x}</math> are commonly indicated by writing either one of the following two forms:
- <math>\mathbf{x} = (x_1, \ldots, x_k)</math>
- <math>\mathbf{x} = x_1 : \ldots : x_k</math>
It is critically important to understand that a relation, considered, as one says, in extension, is a set, in other words, an aggregate entity or a collection of things. Thus a k-tuple is not a relation, it is only an element of a relation, what is naturally enough called an elementary relation.
Table 1 shows how the k-tuples of a k-adic relation might be conceived in tabular form, with the k-tuple <math>\mathbf{x}_i = (x_{ij})_{j=1}^k = (x_{i1}, \ldots, x_{ik}) = x_{i1} : \ldots : x_{ik}</math> supplying the entries for the <math>i^{\mbox{ th}}</math> row of the Table.
Domain 1 | Domain 2 | ... | Domain j | ... | Domain k |
---|---|---|---|---|---|
x11 | x12 | ... | x1j | ... | x1k |
x21 | x22 | ... | x2j | ... | x2k |
... | ... | ... | ... | ... | ... |
xi1 | xi2 | ... | xij | ... | xik |
... | ... | ... | ... | ... | ... |
xm1 | xm2 | ... | xmj | ... | xmk |
Relational algebra
The relational algebra is a set of operations that manipulate relations as they are defined in the relational model and as such describes part of the data manipulation aspect of this data model. Because of their algebraic properties these operations are often used in database query optimization as an intermediate representation of a query to which certain rewrite rules can be applied to obtain a more efficient version of the query.
The exact set of operations may differ per definition and also depends on whether the unlabeled relational model (that uses mathematical relations) or the labeled relational model (that uses the labeled specialization of mathematical relations) is used. We will assume the labeled case here as this is the most common way the relational model is defined. That means that we assume that tuples are partial functions from attribute names to values. The value of the tuple t on the attribute a is denoted in this article as t(a).
Relational model
Database normalization
See also
Application
- Database
- Database table
- Database tuple
- Database normalization
- Dimensional database
- Flat file database
- Temporal database
Implementation
Theory
Template:Col-begin Template:Col-break
History
Template:Col-begin Template:Col-break
- De Morgan, Augustus (1806–1871)
- Boole, George (1815–1864)
- Peirce, Charles Sanders (1839–1914)
- Codd, Edgar Frank (1923–2003)
- Ullman, Jeffrey D. (1942– )
External links
- A Relational Model of Data for Large Shared Data Banks: By Edgar F. Codd
- Relational Database Principles by Colin Ritchie. ISBN 0826457134
- Database in Depth by Chris Date. ISBN 0596100124. A new book (2005) by perhaps the best-known author in this field.
- Limitations of the relational model
- This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.
de:Relationale Datenbank es:Base de datos relacional fr:Base de données relationnelle he:בסיס נתונים טבלאי hu:Relációs adatbázis nl:Relationele database ja:リレーショナルデータベース pl:Model relacyjny pt:Banco de dados relacional ru:Реляционные базы данных sv:Relationsdatabas zh:关系数据库