Live data from Hacker News

Learn Datalog Today

learndatalogtoday.org

41–50 of 56 posts

Re: Learn Datalog Today

#41
post #4

It's a shame that there doesn't seem to be any decent open-source implementation of Datalog. If you go for full Prolog instead of Datalog, there are several (Scryer Prolog being my personal favourite).

1. Datomic - While not open-source, it has an open-source version called Datomic Free, which is a distributed database designed to enable scalable, flexible, and intelligent data storage and queries. Datomic's query language is closely inspired by Datalog. 2. DataScript - An open-source in-memory database and query engine for Clojure, ClojureScript, and JavaScript that is heavily influenced by Datalog and Datomic. 3.…

ErgoAI is as "an enterprise-level extension of the Flora-2 system" which was recently open-sourced: https://github.com/ErgoAI . It seems to be well documented.

Re: Learn Datalog Today

#42

For the idiot in the thread, why would I use datalog (which I've never heard of before) over SQL? Having looked quickly at it just now it seems (Wikipedia article) similar to Web Ontology Language (OWL), though I believe datalog may have been around long before owl.

Datalog can be very effective for expressing certain kinds of problems and for generating efficient solutions to those problems. Particularly anything that is even mildly recursive, and therefore especially "knowledge graphs" that rely heavily on rules to infer, model and retrieve information. However if your problem domain amounts to CRUD storage without a need for complex recursion then mature SQL systems usually have all the advantages (asides from the syntax!). For a more formal answer:

> The intersection of databases, logic, and artificial intelligence gave raise to deductive databases. Deductive database systems are database management systems built around a logical model of data, and their query languages allow expressing logical queries. A deductive database system includes procedures for defining deductive rules which can infer information (in the so-called intensional database) in addition to the facts loaded in the (so-called extensional) database. The logic model for deductive databases is closely related to the relational model and, in particular, with the domain relational calculus. Datalog is the most known deductive query language (which syntactically is a Prolog subset) where constructed terms are not allowed as other non-declarative constructs such as the cut.

> Also following the relational model, relational database systems are well-known and widespread nowadays. Their formal query languages include relational algebra and relational calculi but, in practical systems, the de-facto and ANSI/ISO standard SQL is the language of choice of every relational database vendor. Whilst SQL and relational formal languages implement a limited form of logic, deductive database languages implement advanced forms of logic.

https://www.fdi.ucm.es/profesor/fernan/des/html/manual/manua...

Re: Learn Datalog Today

#43
post #4

It's a shame that there doesn't seem to be any decent open-source implementation of Datalog. If you go for full Prolog instead of Datalog, there are several (Scryer Prolog being my personal favourite).

Mangle https://github.com/google/mangle is an open-source implementation in golang, it was an explicit goal to make it easy to learn. Meaning: it is easy to recognize the pure datalog part, the syntax is following the good old course material.

It was discussed here: https://news.ycombinator.com/item?id=33756800

Re: Learn Datalog Today

#44

I thought that syntax looked familiar! Looks like Logseq uses Datalog for advanced queries. https://hub.logseq.com/features/av5LyiLi5xS7EFQXy4h4K8/getti...

Logseq does! We at Logseq also believe in giving back so we sponsored learndatalogtoday.org when it went down - https://github.com/sponsors/jonase . I'd encourage others to do the same if they appreciate the author for making datalog more accessible

Re: Learn Datalog Today

#45

Datalog feels so much more intuitive than SQL or any other query language I've used. I'm able to write concise, complex expressions pretty easily. In a SQL-based system, there seems to be a (low) complexity metric where it's easier to write/debug/maintain what was supposed to be a 'declarative' SQL query in a functional/imperative language instead. It feels like datalog is the next evolution of a declarative query la…

I greatly respect what Stu and Rich have done to make Datomic. However, they made an explicit design decision to not include a query optimizer and execute the clauses as they were written. This is usually fine since the author has some idea of what the best order is, but there are O(2^k) different permutations of clauses so doing it by hand will fail at some point (if you want the optimal ordering).

I asked Rich about his thoughts on query optimizers last year (not in the context of Datomic specifically) and his only reservation was around the practical implications for the operational experience. Specifically, that database systems should always provide the means for developers to control exactly how/when/whether existing (cached) execution plans get re-optimized, otherwise query optimizers can actually be a source of greater problems than they solve, particularly for applications with extremely rapid changes in data.

Re: Learn Datalog Today

#46
post #35

Earlier quoted context omitted.

1. Datomic - While not open-source, it has an open-source version called Datomic Free, which is a distributed database designed to enable scalable, flexible, and intelligent data storage and queries. Datomic's query language is closely inspired by Datalog. 2. DataScript - An open-source in-memory database and query engine for Clojure, ClojureScript, and JavaScript that is heavily influenced by Datalog and Datomic. 3.…

Is LogicBlox open-source now? I encountered it on a project several years ago and at that point it was very much closed/commercial. Now the website isn't even loading... has the project been shuttered? I know LogicBlox was acquired by Predictix a long time ago, and recently Infor acquired Predictix. Hoping the project is still a going concern, there was some very cool tech in there.

LogicBlox and Predicix merged. Predictix was just a company created solely to be a customer of LogicBlox. In the end it couldn’t survive on its own. Infor acquired LogicBlox and then reneged on some agreements, leading to a mass exodus. Infor made zero effort to sell LogicBlox technology or solutions, and then essentially threw their hundreds of millions away. It may never see the light of day again.

Re: Learn Datalog Today

#47
post #13

Earlier quoted context omitted.

Are you sure that LogicBlox is open-source? I couldn't find anything confirming this. I'd be very surprised if they were, because they even patented their join algorithm.

It's definitely not open source. Not only is the join algorithm patented, but my understanding is the original authors of it can't even use it, because the LogicBlox IP was acquired but the people moved on. But some have since gone on to create new stuff @ RelationalAI

Nine more years to go. But there has been plenty of quality research on worst case optimal joins in the meantime.

Re: Learn Datalog Today

#49
post #4

It's a shame that there doesn't seem to be any decent open-source implementation of Datalog. If you go for full Prolog instead of Datalog, there are several (Scryer Prolog being my personal favourite).

1. Datomic - While not open-source, it has an open-source version called Datomic Free, which is a distributed database designed to enable scalable, flexible, and intelligent data storage and queries. Datomic's query language is closely inspired by Datalog. 2. DataScript - An open-source in-memory database and query engine for Clojure, ClojureScript, and JavaScript that is heavily influenced by Datalog and Datomic. 3.…

#1 is wrong. Datomic Free is not open source, either. The Apache License they mention applies only to the binaries, which is confusing, if not actually misleading.

Re: Learn Datalog Today

#50

Earlier quoted context omitted.

1. Datomic - While not open-source, it has an open-source version called Datomic Free, which is a distributed database designed to enable scalable, flexible, and intelligent data storage and queries. Datomic's query language is closely inspired by Datalog. 2. DataScript - An open-source in-memory database and query engine for Clojure, ClojureScript, and JavaScript that is heavily influenced by Datalog and Datomic. 3.…

Also Rego, which is Datalog with structured extensions, in use everywhere where OPA is used (as in many k8s environments)

Note: Rego targets near linear execution speed, so it can't do recursion generally, except limited tree-like cases for sat y acl checks..

That's as intended, just saying don't expect it has full datalog power.

It deals with Json data nicely though (which my favorite souffle does not).

Post reply on HN