For questions about the algebra used for modeling the data stored in relational databases.
Questions tagged [relation-algebra]
87 questions
5
votes
1 answer
Does the forgetful functor $U: \mathbf{Gph} \to \mathbf{Set}$ have a left adjoint?
Often forgetful functors from a category $\mathbf{C}$ of algebraic objects to $\mathbf{Set}$ have a left adjoint, which gives a "free construction" of a $\mathbf{C}$-object on any set $X$.
What about the forgetful functor from the category of simple…
Jordan Barrett
- 1,937
5
votes
3 answers
Categories of $n$-ary relations?
Arrows in the category $\bf Rel$ are binary (2-valued) relations between set objects.
Do ternary, 4-term, $n$-term and variadic (2-valued) relations form categories? (Or perhaps one category?).
It may be convenient to study categorically how…
alancalvitti
- 3,440
5
votes
1 answer
Motivation behind Theory of Relations?
I looked through the nice paper by Tarski On the Calculus of Relations. In the beginning he touched a motivation behind Theory of Relations but this part was not clear to me (page 1, very beginning):
De Morgan clearly realized the inadequacy of…
Ayrat
- 325
4
votes
2 answers
Software for testing relational algebra
Does anyone know of any software to let you test relational algebra queries? By this I don't mean a database such as MySQL, something where the query can be input in some for of mathematical notation instead of SQL.
jamesj
- 153
4
votes
2 answers
Suggested resources for self-teaching relational algebra/calculus
I apologize if this question is on the wrong site, but hopefully I am asking this question on the correct site (and it's not, for example, for DBA professionals).
I am looking to learn a somewhat rigorous approach to relational algebra/calculus used…
David542
- 241
4
votes
2 answers
Distinguishing equality and isomorphism as relations
Is this relational characterization of equality in Wikipedia accepted?
The identity relation is the archetype of the more general concept of
an equivalence relation on a set: those binary relations which are
reflexive, symmetric, and…
alancalvitti
- 3,440
4
votes
1 answer
Associativity of natural join
A 'relation' is an object with a body that's a set of tuples, and a header that's a set of attribute identifiers. This sort of object is used in the theory of 'relational databases'. A relation is like a table in a spreadsheet, but the collection of…
Hatshepsut
- 1,364
3
votes
1 answer
Forward and backward composition in relational algebra
Forward composition: $p\,;q$
$$\forall p,q\cdot p\in S\leftrightarrow T\land q\in T\leftrightarrow U\implies\\p\,;q=\{x\mapsto y\mid(\exists z\cdot x\mapsto z\in p\land z\mapsto y\in q)\}$$
Backward composition: $p\circ q$
$$p\circ q=q\,;p$$
I…
Gabriel Sadaka
- 133
3
votes
1 answer
What is the "Boolean algebra fragment of RA"?
The Wikipedia article on Relation Algebra notes that this is a formal system which has essentially the same expressive power as the three-variable fragment of first-order logic. Peano Arithmetic can be encoded in the three-variable fragment, so…
András Salamon
- 1,237
3
votes
1 answer
Category of Pointed Relations
There are the categories $\mathbf{Set}$ and $\mathbf{pSet}$; given the category $\mathbf{Rel}$, can we define an analogous category $\mathbf{pRel}$ as well? A relation $R \subseteq A \times B$ is said to be a morphism from $(A, a)$ to $(B, b)$ if…
Herng Yi
- 3,236
3
votes
3 answers
Where can I find good information, tutorials and or examples on relational algebra queries?
Taken a break from my personal project and getting some work done. I would like to find some examples, tutorials on relation algebra.
Anything with good examples will be very useful
Psychonetics
2
votes
1 answer
Help solving a challenge - relational algebra or second order logic
I am a self-taught man and I'm posting my first question here.
I'm facing a challenge I'd like to solve. Based on what I know it fits propositional calculus (hope it is).
Suppose 3 people: a captain, a helmsman, a cook. They all come from
…
roland
- 137
2
votes
1 answer
How Does the Concept of "Structure" Apply to the Relational Model?
This phrase from Wikipedia left me confused:
The relational model (RM) is an approach to managing data using a structure and language consistent with first-order predicate logic.
The concept of structure is new to me, as I don’t have a formal math…
toniozr
- 21
2
votes
0 answers
EER model or relational model for second order logic statements
Question.
I know that EER model and relational model (database schemas where tables are connected with arrows) can be used to express first order predicate logic statements for case when variables are discrete.
Can they be modified to express second…
Alex Alex
- 333
2
votes
1 answer
Is there way to rewrite natural join of two matrices filled with numbers in terms of ordinary calculus and linear algebra notation
Is there way to rewrite natural join of two matrices filled with numbers in terms of ordinary calculus and linear algebra notation (in terms of things like vector products or matrix products, vector addition or matrix addition or something else…
Alex Alex
- 333