Heraclitus: elevating deltas to be first-class citizens in a database programming language
ACM Transactions on Database Systems
Traditional database systems provide a user with the ability to query and manipulate one database state, namely thecurrent database state. Howrever, in several emerging applications, the ability to analyze "what-i~scenarios in order to reason about the impact of an update (before committing that update) is of paramount importance. Example applications include hypothetical database access, active database management systems, and version management, to name a few. The central thesis of the
... tus paradigm is to provide flexible support for applications such as these by elevating deltas, which represent updates proposed against the current database state. to be first-class citizens. Heraclitusl Alg, Cl is a database programming language that extends C to incorporate the relational algebra and deltas. Operators are provided that enable the programmer to explicitly construct, combine, and access deltas. Most interesting is the when operator, that supports hypothetical access to a delta: the expression E when 8 yields the value that side effect free expression E would have if the value of delta expression 3 were applied to the current database state. This article presents a broad overview of the philosophy underlying the Heraclitus paradigm, and describes the design and prototype implementation of HeraclituslAlg, C]. A model-independent formalism for the Heraclitus paradigm is also presented. To illustrate the utility of Heraclitus, the article presents an in-depth discussion of how Heraclitus[Alg, Clean be used to specify, and thereby implement, a wide range of execution models for rule application in active databases; this includes both prominent execution models presented in the literature, and more recent "customized" execution models with novel features.