Prolog For Massive Data

I think a PrologForMassiveData as described below would be the language of choice for TopMind (collected together from RelationalAlgebra, RelationalProgrammingLanguage and TableOrientedProgramming).

-- GunnarZarncke

'PrologLanguage is an in-memory database of "facts".'

PrologLanguage has tuples, but you examine them using pattern matching instead of using labels. Prolog is based on predicate logic rather than relational calculus. RelationalCalculus is, I think, a restricted form of predicate logic. The truth statements of prologs are similar to the rows of a relational table:
 employee ('Joe Doe', 1979, 'Department of Defense').
 employee_managed_by ('Joe Doe', 'Mister X'). 

The thing that RelationalCalculus is missing are the rules of Prolog. It is straightforward to have a "directReports" relationship in a relational table - associating each employee with his/her boss - but deriving the "indirectReports" relationship (the transitive closure of the directReports relationship) is trickier. You can do it with RelationalJoin?s, but that's ugly. Or with actual SQL you might use views or 'cursors'. A rule in PrologLanguage expresses this relationship much more succinctly.

In any case, can an SqlQuery? be mapped to a PrologRule??

Of course - see http://www.sikorskiy.net/prj/PrologSQL/index.html

A PrologForMassiveData could extend PrologLanguage with the following features:

A variant of this approach has been taken for HaskellLanguage. See HaskellDb.

See RelationalLanguage, RelationalAlgebra, RelationalProgrammingLanguage and TableOrientedProgramming SetOrientedProgramming, PrologLanguage


EditText of this page (last edited May 22, 2013) or FindPage with title or text search