For questions about the algebra used for modeling the data stored in relational databases.
Questions tagged [relation-algebra]
87 questions
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
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
1
vote
1 answer
Relational Algebra : Cross Product of a Relation with Table-Dum & Table-Dee
I am wondering what would be the result of the following operation:
Let $A$ be a relation with $n$ ($n > 0$) attributes and $t$ ($t > 0$) tuples.
Let $TableDum$ be a relation with $0$ attributes and $0$ tuples.
Let $TableDee$ be a relation with $0$…
Ludovic
- 31
- 3
1
vote
1 answer
What does it mean for a relation algebra to be simple?
I am reading "Boolean Algebras with Operators part II" by Bjarni Jonsson and Alfred Tarski. On theorem 4.10 (p.132-133), they refer to a relation algebra $\mathfrak{A}$ being "simple" and proves that it is equivalent to $\mathfrak{A}$ having no…
MathTeacher
- 1,559
1
vote
1 answer
Proof - Projection distribution over set union
I've just started databases and have exercise to proof that projection$(\pi)$ is distributive over set union$(\bigcup)$. But I suck in proofs and don't really know how to proof that:
$\pi_\alpha( R \bigcup S) = \pi_\alpha(R) \bigcup \pi_\alpha(S)…
Damaon
- 287
1
vote
1 answer
Relational Algebra: Showing equality using aggregate operator
The schemas are given here for relations $R$ and $S$:
$$R(A,B)$$
$$S(C,D,E)$$
One can see that the following equality is true:
$$\gamma_{B,sum(E)}(R\Join_{A=C}S) = \gamma_{B,sum(E)}(R\Join_{A=C} ({\gamma_{C,sum(E)}}S))$$
After changing the aggregate…
modulitos
- 157
1
vote
0 answers
How can I use relational algebra to determine when changes to a relation invalidate the results of an expression?
My goal is to take a series of modifications to relations in an SQL database, and check if I need to re-run other SQL queries because their results would change. Allowing people to listen to changes to an SQL query.
I found a similar problem is "how…
vaughan
- 111
1
vote
0 answers
Relational Algebra Operator Tree
Context:
All customer pairs (C1,C2) such that C1 likes some pizza that C2 does not like.
LikeDislike(cname, cname2):
Question: Find all customer pairs (C1,C2) such that C1 < C2 and they like exactly the same pizzas.
Answer:
I'm not sure about…
user8779054
- 55
- 1
- 11
1
vote
0 answers
Equivalence between Basic Relational Algebra
The following relation schema: R(A,C), S(A,D), T(X,Y). Primary key attributes bolded
Would like to know why the following two are not equivalent queries
$Q_1 = π_A (σ_{C<10}(R))$ and $Q_2 = σ_{C<10}(π_A(R))$
The answer: $Q_2$ Invalid expression as…
user8779054
- 55
- 1
- 11
1
vote
0 answers
Must relational algebra use tuples?
Please excuse me if I make glaring mistakes below – I'm a software engineer rather than a mathematician or logician, but I'm trying!
My understanding of relational algebra is that relation headings and their body sets are defined in terms of…
Benjohn
- 137
1
vote
0 answers
Relational Database Reductions
So In the study guide for our Db Design final, the professor gave us this Information preserving logical design, Where bold is a primary key and italics are a foreign key.
L1: Donor: D_ID, D_Name, [0, L1, 1]D_Spouse[0, N, 1], [1, L5, 1]D_CI_ID[1,…
James Falter
- 11
0
votes
0 answers
Need review of Relational Algebra
These are technically homework but I'd like to have verified whether what I did is right or wrong, so I don't upright ask for a solution at least.
• Find the names, street address, and cities of residence of all employees who work for “First Bank…
OmniOwl
- 225
0
votes
1 answer
Equivalence between relational algebra statements
This is a practice question for a relational algebra question which I don't understand.
Consider two relations $R(A, B)$ and $S(B,C)$. Which of the following relational algebra expressions is not equivalent to the others?
$\pi_{R.A, R.B} (R \Join…
jaynp
- 2,151
0
votes
0 answers
Cartesian Product and division in relational algebra
I'm pretty sure this question has been asked before, I tried looking for something like it, however, I couldn't find anything.
Given two relations $R(A,B),S(B,C)$, assuming S is not empty, prove the following equality:
$$(R \times \pi_A(S)) \div…
Aa me
- 148
0
votes
1 answer
Proving that Selection Operator on Cartesian Product of Two Relations is Equivalent to Theta-Join on Those Same Realtions
As the title suggests, I am trying to prove that $\sigma_\theta(R1\times R2) =R1 \bowtie_\theta R2$.
However, as far as I know, the very definition of $\theta$-join is the LHS equation from above, so I am quite confused as to
how I should generate a…