Definitionadvanced
Tuple-generating dependency
Also called TGD, embedded implicational dependency.
A first-order constraint that whenever some tuples are present, tuples with possibly new values must be present too.
A tuple-generating dependency (TGD) says that whenever some pattern of tuples occurs in a database, another pattern of tuples occurs too, possibly with values that are not in the first pattern. Both patterns are conjunctions of relational atoms, as in a conjunctive query. TGDs cover multivalued dependencies, join dependencies and inclusion dependencies in one form. Together with equality-generating dependencies they make up the embedded implicational dependencies of Fagin (1982), and Beeri and Vardi (1984) gave the chase as a general proof procedure for them. Today TGDs are also the language of schema mappings in data exchange and of rules with existential variables in ontologies.
Definition
We use set semantics: a relation is a set of tuples. A conjunction of atoms is a formula where each is a relational atom over variables and constants.
Definition (Beeri and Vardi 1984). A tuple-generating dependency is a first-order sentence
where , the body, and , the head, are conjunctions of atoms, is not empty, and the variables of do not occur in . In ASCII it is written phi(x) -> exists y psi(x, y). A database satisfies the TGD if every valuation of with extends to a valuation of with .
- The TGD is full if is empty: no new values are needed.
- It is embedded if is not empty.
- The variables of that occur in are the frontier. Let be the frontier. Then satisfies the TGD if and only if for the two conjunctive queries and .
A TGD with several atoms in the head that share existential variables, such as , can not be split into TGDs with one atom each, because must be the same value in both atoms.
The chase step. If and no extension maps into , the chase adds the facts , where sends each variable of to a new labeled null. For full TGDs the chase adds only tuples over the values already in , so it stops. For embedded TGDs it may run forever.
Examples and non-examples
Let have the attributes , and .
- Multivalued dependency. on is the full TGD
- Join dependency. on is the full TGD . Each body atom agrees with the head on one component of the join.
- Inclusion dependency. For and , the IND is the embedded TGD .
- Transitivity. is a full TGD. It is also a Datalog rule: a full TGD with one head atom is a Datalog rule, read as a constraint.
- Source-to-target mapping. says that each flight of the source is two legs in the target, through some stop . TGDs of this form, with the body over the source and the head over the target, are source-to-target TGDs.
- Non-example: functional dependency. asks for equal values, not for tuples: . It is an equality-generating dependency. No set of TGDs without constants is equivalent to it: the relation of all 8 tuples over satisfies every such TGD, because any head atom can be matched there, but it violates .
- Non-example: disjunction. is not a TGD. It is a disjunctive TGD, and the chase must branch.
- Non-example: negation. is not a TGD, because the body is not a conjunction of atoms.
Related definitions
- Equality-generating dependency. The other half of the embedded implicational dependencies: the head is an equality . See equality-generating dependency.
- Embedded implicational dependency. Fagin (1982) defined the class of sentences where is a conjunction of atoms or of equalities. It contains both TGDs and EGDs. The name is sometimes used for TGDs alone, but it is the larger class.
- Implication. Implication of embedded implicational dependencies is undecidable (Chandra, Lewis and Makowsky 1981). For full TGDs and EGDs the chase stops, so implication is decidable. For embedded TGDs, when the chase of the body of the goal stops, its result decides implication; when the chase does not stop, a finite part of it can still prove that the goal holds. See the dependency implication problem.
- Weak acyclicity. A set of TGDs is weakly acyclic if its dependency graph has no cycle through an edge that creates a new value. Then every chase stops after polynomially many steps in the size of the database. See weak acyclicity.
- Schema mapping and data exchange. A schema mapping is a set of source-to-target TGDs, often with target TGDs and EGDs. The chase builds a universal solution, and queries are answered by their certain answers.
- Datalog. A Datalog program is a set of full TGDs with one head atom, read as rules that compute the smallest database that satisfies them.
References
- Catriel Beeri and Moshe Y. Vardi, A proof procedure for data dependencies, Journal of the ACM 31(4), 718 to 741 (1984), tuple-generating and equality-generating dependencies, and the chase as a proof procedure for their implication
- Ronald Fagin, Horn clauses and database dependencies, Journal of the ACM 29(4), 952 to 985 (1982), embedded implicational dependencies as Horn sentences, which cover tuple-generating and equality-generating dependencies
- Ashok K. Chandra, Harry R. Lewis and Johann A. Makowsky, Embedded implicational dependencies and their inference problem, Proceedings of the 13th Annual ACM Symposium on Theory of Computing (STOC), 342 to 354 (1981), the undecidability of implication for embedded implicational dependencies
- Serge Abiteboul, Richard Hull and Victor Vianu, Foundations of Databases, Addison-Wesley (1995), Chapter 10 (a larger perspective), tuple-generating and equality-generating dependencies and the chase
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 6AV13D Edit this page History Report an error Markdown