I. Datalog


Datalog is a declarative logic programming language that is a subset of Prolog.

Features

$$ \textrm{Datalog} = \textrm{\red{Data}} + \textrm{\red {Log}ic} $$

Data - Predicates

In Datalog, a predicate (relation) is a set of statements

Essentially, a predicate is a table of data

A fact asserts that a particular tuple (a row) belongs to a relation (a table), i.e., it represents a predicate being true for a particular combination of values

Atoms

Atoms are basic elements of Datalog, which represent predicates of the form

Terms:

Untitled

Examples

$P(X_1,X_2,…,X_n)$ is called relational atom