Non-Deterministic Choice in Datalog

Abstract Logic programming languages for database applications, such as LDL, and NAIL! [5] generate all solutions for a given query and fail to recognize multiple equivalent, i.e., redundant, solutions. The Prolog solution is to use the cut operator. Ideally, one would like to syntactically identify programs in which redundant solutions may be pruned but one faces undecidability results in this direction. In order to circumvent the recognition problem we provide an explicit construct, called choice, to choose subsets of relations. We show that choice has clean bottom-up semantics and subsumes the Prolog cut and existential queries.