Recursion and Datalog Flashcards
_______ languages extend query languages with recursion
datalog
The _______ in a datalog rule contains predicates over variables and constants
head
The _______ in a datalog rule contains conjunctions of possibly negated items
body
Head variables are implicitly _________ quantified
universally
Body variables are implicitly _________ quantified
existentially
In datalog rules, if the _______ is true, the ______ is true
body, head
Translate the datalog rule Lucky(x) :- Customer(x, y, z), Account(u, z, x, w), w > 10000 to RC
Lucky = { x | 9y, z, u, w Customer(x, y, z)^ Account(u, z, x, w) ^ w > 10000}
When converting from datalog to RC, for safety’s sake, every variable in the _____ or ______ needs to appear in one non-negated ___________ atom
Head, body, relational
A datalog program is a _____ of datalog rules
set
Extensional DB relations are __________ in the database
stored
Intensional DB relations are __________ relations
derived
EDB relations appear in the _____ of rules
body
IDB relations appear in the ____ or _____ of rules
head, body
Translate projection_(#2)(R) to datalog
E(x) :- R(y, x)
Translate selection_(#1 op c)(R) to datalog
E(x, y) :- R(x, y), x op c