The same could be said for SQL. How does CQL differ from SQL? If I squint my eyes just a tiny amount, these ideas become really difficult to separate. I was always under the impression that the relational model is based upon many concepts studied in category theory. To my mind, all of the following things are overlapping parts of the exact same monster:
Set theory
Category theory
Graph theory
Type theory
Discrete mathematics
Relational algebra
Relational calculus
Relational modeling
An actual sql schemaMost attempts to replace/improve SQL derive from the fact SQL was a poorly conceived and designed interface, that originally was meant to be a very small DSL for end users, but unfortunately, was allowed to become a poor, complicated, confusing mess for app developers:
https://cacm.acm.org/research/50-years-of-queries/
SQL is not an orthogonal language... This is because, in the early days, Ray Boyce and I did not think we were designing a language for programmers. ..
As it turned out, Ray and I were wrong about the predominant usage of SQL...
(same problem from JS, php, etc: Creators don't anticipate that developers will suffer and torture their needs with such anemic ideas!)---
So the #1 thing any actual replacement or alternative to SQL is how actually become a good language for development, so it is actually composable, can be actually be used to reason about it, has minimal foot guns, etc.
There is a lot of misunderstanding and pushback, similar to how people in the past fight improvements over JS/C/C++ until typescript, rust comes.
But, oh boy, SQL need their typescript!
Full disclosure: I am one of the co-authors of this paper and an associated patch implenting it in PostgreSQL that we have proposed.
I am happy to see more people than us think this is useful.
(edit: in retrospect, this is just the "getting started" header link, despite the URL)
Unfortunately none that I've followed seems to do much to describe much of anything except the math foundations. They might cover pieces of syntax, but not how to use or think about them, and they seem to be rather excited about the data-generating features that I can't imagine anyone using outside tech demos (unless that's the only insert method? what about update?) :/
(edit 2: you can't even rely on the manual apparently, I'm fairly confident https://categoricaldata.net/help/Demo.html (manual -> examples -> demo) won't work because it has no schema definition for `Animal`. and it like all the others I've checked are little more than syntax and output, no real explanation)
SQL is like Java, CQL is like Haskell. SQL has been around and used in production. CQL is a research language, possibly cleaner foundation but YMMV.
The math fields you list are connected, but whether they are the same monster - again it's kinda like claiming all programming languages and implementations are the same (Turing-complete?) monster.
Man, it's a rough environment right now marketing-wise. I don't know if they're contractually obligated to say the funny magic words, but the term AI is nearly entirely meaningless at this point. Akin to saying "behold my mighty calculator app: it prevents divisions by zero through artificial intelligence!"
Maybe that's my bias since that's what I'm working on, but it's a big benefit to have stronger compiler guarantees of correctness so that an LLM can't screw things up as much. No BSing that it works when the compiler requires proof.
1. Easier modelling sum types (inheritance) due to duality.
2. Better handling of null due to labelled null.
3. Better foundation of elementary types (they're just another table ids). (Column stores often do that already, if your question is about storage.)
A general relation exists only between the columns of a table that are included in a multi-column primary key.
All columns that are not part of the primary key are functions of the primary key.
Most tables used in practice use a single column as the primary key, which is frequently just a number or a UUID. Most databases contain only tables that are functions, without any table that contains general relations.
The most frequently used kinds of joins are just function compositions.
As best as I can tell (but i really dont know much about databases) it's probably a narrow advantage - storage and everyday queries still go to Codd's model - but for stitching schemas together it seems like it could work.
I'm using similar math for automated formal verification, where this approach is what makes it tractable.
The difference is more in theory than in practice.
What Category Theory Teaches Us About DataFrames https://mchav.github.io/what-category-theory-teaches-us-abou...
Discussed on HN at (67 comments)
AI agents fielded by major AI players still fail at the basic task of providing immediate and correct support for use of the current versions of their products. If a programming language is too new to have adequate representation in the training corpus, there isn't an accepted standard way to provide a reference manual targeting AI agents. Even the best way to include documentation in a large project so new AI agents can take over is controversial. A pile of linked markdown files really isn't an answer, less structured than a codebase itself, that AI is good at navigating.
Other HN posts have discussed using SQL as a backbone for the AI "mind mapping" support we need for AI more critically than for ourselves.
I was hoping that CQL could be an answer to this. Perhaps, but not its current primary goal.
That is quite a claim. I will argue that Categorical Databases most definitely haven't. Any areas where it is true?