|
ABSTRACT
Previous approaches to supporting hypothetical queries have been “eager”: some representation of the hypothetical state (or the corresponding delta) is materialized, and query evaluation is filtered through that representation. This paper develops a framework for evaluating hypothetical queries using a “lazy” approach, or using a hybrid of eager and lazy approaches.
We focus on queries having the form “Q when {{U}}” where Q is a relational algebra query and U is an update expression. The value assigned to this query in state DB is the value that Q would return in the state resulting from executing U on DB. Nesting of the keyword when is permitted, and U may involve a sequence of several atomic updates.
We present an equational theory for queries involving when that can be used as a basis for optimization. This theory is very different from traditional rules for the relational algebra, because the semantics of when is unlike the semantics of the algebra operators. Our theory is based on the observation that hypothetical states can be represented as substitutions, similar to those arising in functional and logic programming. Furthermore, hypothetical queries of the form Q when {{U}} can be thought of as representing the suspended application of a substitution. Using the equational theory we develop an approach to optimizing the evaluation of hypothetical queries that uses deltas in the sense of Heraclitus, and permits a range of evaluation strategies from lazy to eager.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
ACCL91
|
M. Abadi, L. Cardelli, P. Curien, and J. Levy. Explicit substitutions. Journal of Functional Programming, 1(4):375-416, 1991.
|
 |
BGL96
|
Michael Benedikt , Timothy Griffin , Leonid Libkin, Verifiable properties of database transactions, Proceedings of the fifteenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems, p.117-127, June 04-06, 1996, Montreal, Quebec, Canada
[doi> 10.1145/237661.237692]
|
| |
Bon90
|
|
| |
Bon95
|
A.J. Bonner. The logical semantics of hypothetical rulebases with deletion. Journal of Logic Programming, 1995.
|
| |
DHK95
|
|
 |
DHR96
|
Michael Doherty , Richard Hull , Mohammed Rupawalla, Structures for manipulating proposed updates in object-oriented databases, Proceedings of the 1996 ACM SIGMOD international conference on Management of data, p.306-317, June 04-06, 1996, Montreal, Quebec, Canada
|
 |
Dij75
|
|
| |
Dij76
|
|
 |
GD87
|
|
| |
GH97
|
T. Griffin and R. Hull. A framework for implementing hypothetical queries. Technical report, Bell Laboratories, Lucent Technologies, 1997. In preparation.
|
| |
GHJ+93
|
Shahram Ghandeharizadeh , Richard Hull , Dean Jacobs , Jaime Castillo , Martha Escobar-Molano , Shih-Hui Lu , Junhui Luo , Chiu Tsang , Gang Zhou, On Implementing a Language for Specifying Active Database Execution Models, Proceedings of the 19th International Conference on Very Large Data Bases, p.441-454, August 24-27, 1993
|
 |
GHJ96
|
|
| |
GR84
|
D.M. Gabbay and U. Reyle. N-Prolog: An extension of prolog with hypothetical implications. I. Journal of Logic Programming, 1(4):319-355, 1984.
|
| |
GR85
|
D.M. Gabbay and U. Reyle. N-Prolog: An extension of prolog with hypothetical implications. II: Logical foundations and negation as failure. Journal of Logic Programming, 2(4):251- 283, 1985.
|
 |
Gra93
|
|
| |
Gri81
|
|
 |
HR92
|
|
| |
HS86
|
|
 |
Les94
|
|
| |
Llo87
|
|
| |
Qia90
|
|
| |
Qia91
|
|
| |
Ull88
|
|
| |
WS83
|
|
|