Skip to content

Datalog notes

Jacob Nelson edited this page Oct 23, 2012 · 12 revisions

Why Datalog over SPARQL?

  • Datalog allows general recursion; SPARQL only allows structural recursion in recent version
  • Lots of research on optimization in the 80's
  • Some commerical success (http://www.logicblox.com/)

use cases

  • applications that generate queries
  • alerts
  • people who write queries

example systems

  • client database
    • pull-down menu-ish thing
    • originally sgi uv, porting to xmt2
  • lexis-nexis

Other semantic databases

{{{ blue-modern alice->bob: Test bob->alice: Test response }}}

example from insurance people

  • triple: { id, name, address }
  • id is unique
  • id maps to multiple names
  • name maps to multiple addresses
  • find all ids that share two or more addresses with another id
  • or that share single address, compute distance function on name and select if close enough

relational algebra -> nested loops or whatever

  • select
  • project
  • join
  • others
    • aggregation
    • union
    • application-specific stuff

stuff

john's problem set

  • word problems

  • c loops

  • sp^2bench : a sparql benchmark suite (icde 09)

    • q7 is the one that's hard.
  • relational algebra (database textbook: )