#RelationalAlgebra

2026-02-14

Query about keys in relational algebra.

Does relational algebra actually talk about keys (especially "candidate keys")? I think it just describes relations as sets of tuples?

> A search for "key" in the wikipedia relation algebra page only has it as part of "keyword" – en.wikipedia.org/wiki/Relation

But relation elements typically aren't _just_ set members. Keys on a relation typically provide much stronger constraints than that.

The "candidate keys" at least, often seem like the really interesting part:

* Keys provide identity for relation elements.
* In a relation with several candidate keys, the keys are isomorphic identifiers for elements.

Is there a theory and account of keys in (or outside of) relational algebra?

Are there search terms I can use to jump in to this?

#RelationalAlgebra

Hacker Newsh4ckernews
2025-08-31
2024-06-26
I have so many mixed feelings about point-free styles of programming or reasoning that I keep returning to. On the one hand, point-free style can be an extremely concise, elegant, and at times incisive way to write down an idea. On the other hand, if you've ever tried to write APL for instance, it can be challenging to get right; and if you've ever tried to read someone else's APL, it can be mind-breaking. It's a serious question whether one should bother expressing things in this style and take the risk that it won't be read or received by many other people.

I have my own offering in this area: S↾⋄∂/∂ . This is a relation between candidate solutions of a coevolutionary algorithm where ∂ is the solution concept ( https://bucci.onl/notes/solution-concepts ) and S is a set candidate solutions. Given a candidate solution s, this relation indicates all the actual solutions that lie "above" it according to the solution concept. ↾ is the shrink operator, and / is right residual. I've written a paper spelling out the ⋄∂/∂ part of that expression, though I didn't use these terms or symbols at the time, that weighed in around 6 pages. In https://bucci.onl/notes/monotonic-solution-concepts , I touch on this paper and subject; the weak preference order described there is captured by ⋄∂/∂ .

A concise description of what shrink and right residual do, and why this expression is doing what I claim it does, would require roughly the same amount of space, maybe a bit less. Mu and Oliveira have written a few papers on the shrink operator; right residual is textbook relational algebra.

So the six symbols in S↾⋄∂/∂ are condensing many tens of pages of natural language + math. In principle, once you knew ∂, ⋄,↾, and /, you should be able to deduce what that full expression does. Following Mu and Oliveira, you should also be able to deduce an algorithmic implementation! But who the heck would put themselves through all that besides me? Who knows! 🤷

#APL #PointFree #programming #CoevolutionaryAlgorithm #RelationalAlgebra
Khoury Vis Lab @ NortheasternKhouryVis@vis.social
2024-05-17

Congrats to @codydunne & Wolfgang Gatterbauer for their #SIGMOD 2024 best paper honorable mention (one of 3 for the conference)!

Check out "On the reasonable effectiveness of Relational Diagrams: explaining relational query patterns and the pattern expressiveness of relational languages" here:

vis.khoury.northeastern.edu/pu

#SQL #RDBMS #RelationalDatabases #RelationalAlgebra #RelationalCalculus #Logic #Visualization #HCI

Diagram of a SQL queryDiagram of a SQL query
2024-05-02

arxiv.org/pdf/2404.18795

When Lawvere meets Peirce: an equational
presentation of boolean hyperdoctrines

by Filippo Bonchi, Alessandro Di Giorgio, Davide Trotta

Pushing algebraization of logic another step forward.

With this approach logical deductions can be made using straightforward equation manipulations.

This kind of bridge will eventually become very useful for knowledge representation!
As knowledge representation is mostly built on description logics, the community so far doesn’t appreciate the potential to enrich its toolset with algebraic methods and other existing mathematical machinery.

#categorytheory #logic #knowledgeRepresentation #cartesianBicategories #relationalAlgebra #Lawvere #Peirce #hyperdoctrines

2024-03-05

@hn50 this blog post on Datalog and graph algorithms is nicely mindblowing to me.

It's so cool that there's a programming language that abstracts away the impending details of #graphs and graph #algorithms.

Not only that, but it's based on #RelationalAlgebra and is somewhat reminiscent of #SQL 🤯

Yes, I Know IT ! 🎓YesIKnowIT
2017-08-18

I'm not only a Bash guy: I really like databases too!

If you need a formal introduction to relational algebra here is a presentation on the topic by the great Pr. Jeffrey D. Ullman:

infolab.stanford.edu/~ullman/f

Pay special attention to:
- pp11-14 describing the product ("CROSS JOIN" in SQL) theta-join ("JOIN ... USING" or "JOIN ... ON" in SQL)
- pp29-31 explaining the core difference between genuine relational algebra and SQL (set vs. bag algebra)


Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst