Bottom-up evaluation of deductive database programs has the advantage that it avoids repeated computation by storing all intermediate results and replacing recomputation by table lookup. However, in general, storing all intermediate results for the duration of a computation wastes space. In this paper we propose an evaluation scheme that avoids recomputation, yet under fairly general conditions at any given time stores only a small subset of the facts generated. The results constitute a significant first step in compile-time garbage collection for bottom-up evaluation of deductive database programs.
Jeffrey F. Naughton, Raghu Ramakrishnan