Codd's theorem

Codd's theorem

Codd's theorem states that relational algebra and the domain-independent relational calculus queries, two well-known foundational query languages for the relational model, are precisely equivalent in expressive power. That is, a database query can be formulated in one language if and only if it can be expressed in the other.

The theorem is named after Edgar F. Codd, the father of the relational model for database management.

The domain independent relational calculus queries are precisely those relational calculus queries that are invariant under choosing domains of values beyond those appearing in the database itself. That is, queries that may return different results for different domains are excluded. An example of such a forbidden query is the query "select all tuples other than those occurring in relation R", where R is a relation in the database. Assuming different domains, i.e., sets of atomic data items from which tuples can be constructed, this query returns different results and thus is clearly not domain independent.

Codd's Theorem is notable since it establishes the equivalence of two syntactically quite dissimilar languages: relational algebra is an imperative, variable-free language, while relational calculus is a logical language with variables and quantification.

Relational calculus is essentially equivalent to first-order logic, and indeed, Codd's Theorem was previously known to logicians since the late 1940s.[1][2]

Query languages that are equivalent in expressive power to relational algebra were called relationally complete by Codd. By Codd's Theorem, this includes relational calculus. Relational completeness clearly does not imply that any interesting database query can be expressed in relationally complete languages. Well-known examples of inexpressible queries include simple aggregations (counting tuples, or summing up values occurring in tuples, which are operations expressible in SQL but not in relational algebra) and computing the transitive closure of a graph given by its binary edge relation (see also expressive power). Nevertheless, relational completeness constitutes an important yardstick by which the expressive power of query languages can be compared.

Notes

  1. ^ L.H. Chin and A. Tarski. Remarks on Projective Algebras. Bulletin of the AMS, 54:80-81, 1948.
  2. ^ A. Tarski and F.B. Thompson. Some general properties of cylindric algebras. Bulletin of the AMS, 58:65, 1952.

References

  • Serge Abiteboul, Richard B. Hull, and Victor Vianu: Foundations of Databases. Addison-Wesley, 1995.

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Edgar F. Codd — Infobox Scientist name = Edgar Frank Ted Codd image width = 150px caption = birth date = birth date|1923|8|23|mf=y birth place = Isle of Portland, England death date = death date and age|2003|4|18|1923|8|23|mf=y death place = Williams Island,… …   Wikipedia

  • List of mathematics articles (C) — NOTOC C C closed subgroup C minimal theory C normal subgroup C number C semiring C space C symmetry C* algebra C0 semigroup CA group Cabal (set theory) Cabibbo Kobayashi Maskawa matrix Cabinet projection Cable knot Cabri Geometry Cabtaxi number… …   Wikipedia

  • List of theorems — This is a list of theorems, by Wikipedia page. See also *list of fundamental theorems *list of lemmas *list of conjectures *list of inequalities *list of mathematical proofs *list of misnamed theorems *Existence theorem *Classification of finite… …   Wikipedia

  • Relational algebra — Not to be confused with Relation algebra. Relational algebra, an offshoot of first order logic (and of algebra of sets), deals with a set of finitary relations (see also relation (database)) that is closed under certain operators. These operators …   Wikipedia

  • Relational calculus — consist 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. This in contrast to the relational algebra… …   Wikipedia

  • Database theory — encapsulates a broad range of topics related to the study and research of the theoretical realm of databases and database management systems. Theoretical aspects of data management include, among other areas, the foundations of query languages,… …   Wikipedia

  • Conjunctive query — In database theory, a conjunctive query is a restricted form of first order queries. A large part of queries issued on relational databases can be written as conjunctive queries, and large parts of other first order queries can be written as… …   Wikipedia

  • Relational model — The relational model for database management is a database model based on first order predicate logic, first formulated and proposed in 1969 by Edgar Codd. [ Derivability, Redundancy, and Consistency of Relations Stored in Large Data Banks , E.F …   Wikipedia

  • Database management system — A database management system (DBMS) is a software package with computer programs that control the creation, maintenance, and the use of a database. It allows organizations to conveniently develop databases for various applications by database… …   Wikipedia

  • List of University of Michigan alumni — There are more than 425,000 living alumni of the University of Michigan. Famous alumni include the father of the iPod, the founders of Sun Microsystems and Google, the father of information theory, the voice of Darth Vader, the first doctor… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”