TY - GEN
T1 - Safety of datalog queries over infinite databases
AU - Sagiv, Yehoshua
AU - Vardi, Moshe Y.
PY - 1989
Y1 - 1989
N2 - A query is safe with respect to a set of constraints if for every database that satisfies the constraints the query is guaranteed to yield a finite set of answers. We study here the safety problem for Datalog programs with respect to finiteness constraints. We show that safety can be viewed as a combination of two properties: weak safety, which guarantees the finiteness of intermediate answers, and termination, which guarantees the finteness of the evaluation. We prove that while weak safety is decidable, termination is not. We then consider monadic programs, i.e. programs in which all intentional predicates, i.e, programs in which all intensional predicates are monadic, and show that safety is decidable in polynomial time for monadic programs. While we do not settle the safety problem, we show that a closely related problem, the decision problem for safety with respect to functional dependencies, is undecidable even for monadic programs.
AB - A query is safe with respect to a set of constraints if for every database that satisfies the constraints the query is guaranteed to yield a finite set of answers. We study here the safety problem for Datalog programs with respect to finiteness constraints. We show that safety can be viewed as a combination of two properties: weak safety, which guarantees the finiteness of intermediate answers, and termination, which guarantees the finteness of the evaluation. We prove that while weak safety is decidable, termination is not. We then consider monadic programs, i.e. programs in which all intentional predicates, i.e, programs in which all intensional predicates are monadic, and show that safety is decidable in polynomial time for monadic programs. While we do not settle the safety problem, we show that a closely related problem, the decision problem for safety with respect to functional dependencies, is undecidable even for monadic programs.
UR - http://www.scopus.com/inward/record.url?scp=0024865468&partnerID=8YFLogxK
U2 - 10.1145/73721.73738
DO - 10.1145/73721.73738
M3 - ???researchoutput.researchoutputtypes.contributiontobookanthology.conference???
AN - SCOPUS:0024865468
SN - 0897913086
SN - 9780897913089
T3 - Proc Eighth ACM SIGACT-SIGMOD-SIGART Symp Princ Database Syst
SP - 160
EP - 171
BT - Proc Eighth ACM SIGACT-SIGMOD-SIGART Symp Princ Database Syst
PB - Publ by ACM
T2 - Proceedings of the Eight ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems
Y2 - 29 March 1989 through 31 March 1989
ER -