title: Turning Datalog queries in to SQL(ite) queries
body: <p><a href="https://en.wikipedia.org/wiki/Datalog" rel="nofollow noreferrer">Datalog</a> is a lovely language for querying relational data. It is simple, clear, composes well, and supports recursive queries without additional syntax.</p>
  
  <p><a href="https://www.sqlite.org" rel="nofollow noreferrer">SQLite</a> is a fantastic embedded database with what seems to be a <a href="https://www.sqlite.org/lang_with.html" rel="nofollow noreferrer">powerful query engine</a> able to handle recursive queries – see the examples at the bottom of that page for generating Mandelbrot sets and finding all possible solutions to Sudoko puzzles!</p>
  
  <p>I'm interested to know if there is a fairly standard way to translate from a datalog query in to recursive SQL as supported by SQLite, or if there are libraries that provide this facility.</p>