Relational database

From Wikinfo

Revision as of 20:10, 8 September 2006 by Jon Awbrey (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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 that is 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.

Table 1. Relational Database
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

Main article: 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

Main article: Relational model

Database normalization

See also

Application

Implementation

Theory

History

External links

This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.[[cs:Relačn� datab�ze]][[fr:Base de donn�es relationnelle]][[hu:Rel�ci�s adatb�zis]]


This article contains material from relational database at FOLDOC; used with permission.


References