Datalog




CS157a

Chris Pollett

Oct 30, 2019

Outline

Introduction

Datalog

Predicates and Atoms

Arithmetic Atoms

Datalog Rules and Queries

Meaning of Datalog Rules

In-Class Exercise

  1. Give an example of a rule involving negation and an arithmetic atom which is safe.
  2. Express ordered pairs where `1 < x < y < 5` as a collection of Datalog facts.
  3. Express the query that selects pairs where `y > 3`.

Post your solutions to the Oct 30 In-Class Exercise Thread.

Extensional and Intensional Predicates

Datalog Applied to Bags

Relational Algebra and Datalog