|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IQueryContainment
This interface defines a query containment check, i.e. a check for whether one query is contained within another query. The query containment is checked using the 'Frozen Facts' algorithm (This algorithm is presented in Ramakrishnan, R., Y. Sagiv, J. D. Ullman and M. Y. Vardi (1989). Proof-Tree Transformation Theorems and their Applications. 8th ACM Symposium on Principles of Database Systems, pp. 172 - 181, Philadelphia).
The query containment check can only be performed over positive queries that do not contain built-ins and disjunctions.
Example:
In the following Query1 is contained within Query2:
Program: vehicle(?x) :- car(?x).
Query1: car(?x).
Query2: vehicle(?x).
An implementation of this interface is supposed to get an implementation of the IProgram as input parameter and to produce a boolean value as output of the query containment check.
| Method Summary | |
|---|---|
boolean |
checkQueryContainment(IQuery query1,
IQuery query2)
Checks whether query1 is contained within query2. |
IRelation |
getContainmentMappings()
Return the containment mappings that result from the containment check. |
List<IVariable> |
getVariableBindings()
Return the variables from the query in 'execution' order. |
| Method Detail |
|---|
boolean checkQueryContainment(IQuery query1,
IQuery query2)
throws Exception
Checks whether query1 is contained within query2.
query1 - The query for which to check whether it is contained
within query2.query2 - The query for which to check whether it contains query1.
ExceptionIRelation getContainmentMappings()
Return the containment mappings that result from the containment check.
List<IVariable> getVariableBindings()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||