Production Rules on Databases

While often conflated with its syntax, Datalog is actually the system defining the set of semantics used by many database query languages, including SQL, SPARQL, and Datomic queries. However, Datalog also defines semantics for “Production Rules”, allowing logic programs to be executed similarly to Prolog.

This talk discusses “Naga” – a production rules library for databases that manage logic assertions, such as Datomic or RDF databases. Naga allows users to configure how events should be entered, and new data can be inferred from an existing corpus of data. It has been built for Cisco to identify and respond to relationships between network threat-related events.

Naga is a forward chaining rules engine built with the Rete algorithm, and able to run Datalog programs without intervention. When configured with Datomic it can also provide extra functionality, such as avoiding intermediate states.

An extended schema vocabulary is also shown, which allows the automation of some rule definitions, along with a demonstration of reducing the execution complexity.


pgearonPaula Gearon

A computer engineer, quantum physicist, and Semantic Web geek, Paula is most at home working in the lower layers of systems, building the infrastructure that lets other developers do their jobs. She was a senior developer on Tucana, the first commercial RDF database, and the lead developer on Mulgara, which was an open source version. She has built 2 commercial rules engines, one in Clojure, and is the middle of building the third. When not coding, she is busy doing Taekwondo with her daughter, cooking, and staying up late to talk to friends online.