Egor Urvanov

Datalog

Specs and architecture · a narrow Prolog for databases

A cut-down Prolog for querying data: the same facts and inference rules, but without the features that let a program run forever. So any Datalog query over finite data is guaranteed to finish and give an exact answer. It is an example of a narrow language: you can’t write any program in it, but you can answer exactly about its programs. Datalog-like languages are used in code analysis and access rules.

fact: booking b1: room 2, 10–11fact: booking b2: room 2, 10:30–12rule: overlap if same room and times overlapquestion: what overlaps b1?the engine searchesb2: always answersa narrow language: every query finishes, Rice’s theorem doesn’t get in the way● model, people, systems, data  ● agent and harnessThe same facts and rule, but the language is cut down: every query finishes and gives an exact answer

Source: Wikipedia: Datalog

Related terms

Whole glossary

© 2026 Egor Urvanov