Pacific Northwest Software Symposium

September 6 - 8, 2013

Get Logical with Datalog

Sunday - Sep 8 4:00 PM - Studio 1/2

Stuart Halloway

Stuart Halloway

President of Cognitect

Logic programming delivers great expressive power: you work in domain abstractions, and your program figures out execution details. And it has never been easier. With the Datalog engine in Datomic Free, you can work both with databases and with your own data in plain Java collections.

Datalog queries have the expressive power of SQL + recursion, so is a good fit for systems that want “the power of SQL” but e.g. more flexibility. When combined with a universal schema, Datalog is particularly easy to learn and to read.

Datomic's datalog implementation works with immutable database values, providing additional benefits:

  • decompose a query into multiple steps without compromising performance or correctness
  • perform logic and navigation as separate steps, using the entity API
  • join across 2 or more databases
  • query past values of the database
  • perform cross-temporal queries of different versions of your data

In this talk you will learn

  • the basics of writing datalog programs
  • the difference between datalog and prolog
  • how to create reusable abstractions with datalog rules
  • how to extend datalog with your own functions and predicates
  • querying databases
  • joining across multiple databases
  • using datalog with your own data
  • decomposing queries into logic and navigation
  • time travel

On the Web

Video Preview

About Stuart Halloway

Stuart Halloway is a founder and President of Cognitect, Inc. (www.cognitect.com). He is a Clojure committer, and a developer of the Datomic database.

Stuart has spoken at a variety of industry events, including StrangeLoop, Clojure/conj, EuroClojure, ClojureWest, SpeakerConf, QCon, GOTO, OSCON, RailsConf, RubyConf, JavaOne, and NFJS.

Stuart has written a number of books and technical articles. Of these, he is most proud of Programming Clojure.

Learn more about Stu's presentations on his wiki.