4 ms·
> In Datalog databases, there are no tables. Or really everything is just stored in one table, the triple table The author conflates Datomic family databases w
by j-pb 5y ago
> In Datalog databases, there are no tables. Or really everything is just stored in one table, the triple table
The author conflates Datomic family databases which use triples as their data model and datalog as their query engine, with datalog the pure prolog subset / conjunctive query + recursion fragment.
Not a great start for a novel DB product...
- turminal 5y agoHow does datalog the pure prolog subset store its data?
- maweki 5y agoUsually you'd have a set-like storage of n-tuples/structs per relation, as a row/tuple of a relation has fixed arity. Tree-sets of rows, for example. But you could just use SQL tables as a storage engine with one table per datalog relation.
- emmanueloga_ 5y agoSWI Prolog's RDF store is implemented as a C extension. There's a description of the details here [1]. Apparently, it uses skip-lists for indexes. As a curiosity... I implemented a very simple toy triplestore in Kotlin that used AVL TreeSets. [2] (only the storage layer, it has no other querying than a simple for-loop like mechanism :-) ). 1: https://github.com/SWI-Prolog/packages-semweb/blob/master/doc/rdfdb.md https://github.com/SWI-Prolog/packages-semweb/blob/master/do... 2: https://gist.github.com/EmmanuelOga/1d52adb79bdb6092fb698ed5b31fa377 https://gist.github.com/EmmanuelOga/1d52adb79bdb6092fb698ed5...
- stonemetal12 5y agoDatalog is a query language similar to SQL. It doesn't store data. Some database would store data however it likes then provide a datalog query interface.
- triska 5y agoDatalog also lets you define facts and rules, in addition to posting queries. A key attraction of Datalog is that the same simple and very uniform syntax is used in all cases. All these cases are special cases of a single unifying language element called Horn clauses, which are clauses with at most one positive literal: Queries have no positive literal, rules have exactly one positive literal and at least one negative literal, and facts consist of a single positive literal.
- deleted 5y ago[deleted]