Tuple-generating dependency

From Wikipedia, the free encyclopedia

In relational database theory, a tuple-generating dependency (TGD) is a certain kind of constraint on a relational database. It is a subclass of the class of embedded dependencies (EDs).

An algorithm known as the chase takes as input an instance that may or may not satisfy a set of TGDs (or more generally EDs) and, if it terminates (which is a priori undecidable), outputs an instance that does satisfy the TGDs.

Definition

Summarize
Perspective

A tuple-generating dependency is a sentence in first-order logic of the form:[1]

where is a possibly empty and is a non-empty conjunction of relational atoms. A relational atom has the form , where each of the terms are variables or constants.

Fragments

Summarize
Perspective

Several fragments of TGDs have been defined. For instance, full TGDs are TGDs which do not use the existential quantifier. Full TGDs can equivalently be seen as programs in the Datalog query language.

There are also some fragments of TGDs that can be expressed in guarded logic, in particular:[2][3][4]

  • in frontier-guarded TGDs (FGTGD), all the variables shared by the body and the head of a rule (called frontier variables) must occur together in some atom;
  • guarded TGDs (GTGD) are particular FGTGDs where all variables used in the body of a rule must occur together in some atom;
  • linear TGDs (LTGD) are particular GTGDs where whose body consists of a single atom;
  • inclusion dependencies (IND) are particular LTGDs where in both the sides of the rule there is only one relational atom.[5]

The expressive power of these fragments and TGDs has been studied in depth. For example, Heng Zhang et al.[3], as well as Marco Console and Phokion G. Kolaitis,[4] have developed a series of model-theoretic characterizations for these languages. In addition, Heng Zhang and Guifei Jiang have provided characterizations of the program expressive power of TGDs, several of their extensions, and Linear TGDs, specifically in the context of query answering.[6]

In SQL, inclusion dependencies are typically expressed by means of a stronger constraint called foreign key, which forces the frontier variables to be a candidate key in the table corresponding to the relational atom of .

References

Further reading

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.