The Forum for Discussion about The Third Manifesto and Related Matters

Please or Register to create posts and topics.

A (not so new) query language?

Logica is a language of Datalog family that can be compiled to StandardSQL.

https://colab.research.google.com/github/EvgSkv/logica/blob/main/tutorial/Logica_tutorial.ipynb#scrollTo=6VFrsJycREkJ

From the little I could understand it looks like a bastard mix of Datalog, SQL and Python, with no obvious purpose. But I probably missed something.

Andl - A New Database Language - andl.org
Quote from dandl on May 10, 2021, 2:33 pm

Logica is a language of Datalog family that can be compiled to StandardSQL.

https://colab.research.google.com/github/EvgSkv/logica/blob/main/tutorial/Logica_tutorial.ipynb#scrollTo=6VFrsJycREkJ

From the little I could understand it looks like a bastard mix of Datalog, SQL and Python, with no obvious purpose. But I probably missed something.

Hmm seems it doesn't allow direct access to raw SQL -- which answers my first thoughts: how does it handle Nulls (forbidden, presumably) ; what about duplicate column names/anonymous columns (ditto); or duplicate rows (I guess it always issues SELECT UNIQUE ...). So I think the SQL is a behind-the-scenes storage engine only.

Has something called infinite predicates -- which look suspiciously like Hall, Hitchcock & Todd 1975 'algorithmic relations'. "can only be used as parts of other predicates and play role of filters, or auxiliary functions."

But yes, basically Datalog in drag.

Difficult to tell how 'not-so-new' or actively used it is: there's a link to post a StackOverflow q, but I couldn't find any q's (they're for other [google-colaboratory] topics).

BTW 'Logica' is/was a UK/global IT Management Consultancy.

When I implemented SQL as a backend for Andl I found it all works just fine, as long as you get to create the tables and control what goes in them. Nulls? What nulls? Dee and Dum are more of a challenge.

SQL is powerful enough to implement all the 9 operation extended SQL (SPJRUN+VAW), but not fully generalised N (new value) and A (aggregation). In my formal treatment those are addressed by relcons, which are isomorphic with functions and (parts of) HHT algorithmic relations. From what you say, I assume that's the problem they are addressing. Andl did it by callbacks, which are really hard to implement.

I haven't thought it through, but it would seem possible to pre-compute relcons by querying the database and either inserting literal computed values or constructing temporary tables. Much as you might do now if you had to implement SQL-based transactions for a pricing model or warehouse layout optimiser or roster planner that used a non-SQL API.

My impression is this is a personal project trading off the Google name. And yes, I think I have run across the company, but not recently.

Andl - A New Database Language - andl.org