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

edit

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

edit

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

edit
  1. ^ Fagin, Ronald (2009). "Tuple-Generating Dependencies". In LIU, LING; ÖZSU, M. TAMER (eds.). Encyclopedia of Database Systems. Springer US. pp. 3201–3202. doi:10.1007/978-0-387-39940-9_1274. ISBN 9780387355443.
  2. ^ Benedikt, Michael; Bourhis, Pierre; Jachiet, Louis; Thomazo, Michaël (Aug 2019). Reasoning about Disclosure in Data Integration in the Presence of Source Constraints. IJCAI 2019 - 28th International Joint Conference on Artificial Intelligence. Macao, China. pp. 1551–1557. arXiv:1906.00624. doi:10.24963/ijcai.2019/215.
  3. ^ a b Zhang, Heng; Zhang, Yan; Jiang, Guifei (2020-07-09). "Model-theoretic Characterizations of Existential Rule Languages". Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence. 2: 1940–1946. arXiv:2001.08688. doi:10.24963/ijcai.2020/269.
  4. ^ a b Console, Marco; Kolaitis, Phokion G.; Pieris, Andreas (June 2021). Model-theoretic Characterizations of Rule-based Ontologies. Symposium on Principles of Database Systems. PODS'21: Proceedings of the 40th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems. Virtual Event, China. pp. 416–428. doi:10.1145/3452021.3458310. hdl:11573/1568516.
  5. ^ Kolaitis, Phokion G. "A Tutorial on Database Dependencies" (PDF). University of California Santa Cruz & IBM Research - Almaden. Archived from the original (PDF) on February 20, 2015. Retrieved 2021-12-10.
  6. ^ Zhang, Heng; Jiang, Guifei (2022-06-28). "Characterizing the Program Expressive Power of Existential Rule Languages". Proceedings of the AAAI Conference on Artificial Intelligence. 36 (5): 5950–5957. arXiv:2112.08136. doi:10.1609/aaai.v36i5.20540. ISSN 2374-3468.

Further reading

edit

📚 Artikel Terkait di Wikipedia

Multivalued dependency

certain tuples be present in a relation. Therefore, a multivalued dependency is a special case of tuple-generating dependency. The multivalued dependency plays

Referential integrity

{\displaystyle S} . Such constraint is a particular form of tuple-generating dependency (TGD) where in both the sides of the rule there is only one relational

Functional dependency

classification of dependencies: functional dependencies are equality-generating dependencies whereas inclusion dependencies are tuple-generating dependencies. Enforcing

Embedded dependency

both tuple-generating dependencies and equality-generating dependencies. Embedded dependencies can express functional dependencies, join dependencies, multivalued

Datalog

programming Conjunctive query DatalogZ Disjunctive Datalog Flix SWRL Tuple-generating dependency (TGD), a language for integrity constraints on relational databases

TGD

TGD or tgd may refer to: Tuple-generating dependency, a certain kind of constraint on a relational database TGD, the IATA code for Podgorica Airport,

Dependency theory (database theory)

recognized dependency types are: Functional dependency Join dependency Multivalued dependency Tuple-generating dependency Transitive dependency Equality-generating

Relational database

operators. New tuples can supply explicit values or be derived from a query. Similarly, queries identify tuples for updating or deleting. Tuples by definition