For questions about the algebra used for modeling the data stored in relational databases.
Questions tagged [relation-algebra]
87 questions
0
votes
1 answer
Are relations with different attribute names union-compatible?
If I have two relations:
$$\begin{align}
R_1(Name: string, Address: string)\\
R_2(Title: string, Location: string)
\end{align}$$
They are of the same arity, and their corresponding attributes belong to the same domain. However, their attribute names…
Mubaraq Wahab
- 166
0
votes
1 answer
Selection operator in relational algebra.
Does Selection algebra operator in Relational algebra removes duplicates from the tuples.
Because when I am studying the definition of projection operator then there it's explicitly given that it removes duplicates.
Consider for example if in my…
Piyush Sawarkar
- 379
0
votes
1 answer
Relational Algebra, find every author who co-authored with every other?
So in a DB course I am taking there is a practice problem, which states "Which authors co-authored at least 1 paper with every other author (without using aggregate functions)?"
The relations given are Author(authorid, name), Authoring(articleid,…
Nelson
- 111
0
votes
0 answers
What is the cartesian product of two relations with a common attribute
What I know about the Cartesian Product
I just learned about the cartesian product in my introduction to Databases. The example that was provided was pretty clear. For a relation A with n tuples and relation B with m tuples, I need to create a…
nid
- 113
0
votes
1 answer
Why are quantifiers needed in Tuple Relational Calculus?
Why are quantifiers needed in Tuple Relational Calculus?
Lets say I have this statement:
{S.sname | S in Student and (exists G in Grade )(S.s# = G.s#)};
Why can't I just use this instead?
{S.sname | S in Student and G in Grade and S.s# =…
user1766555
- 553
0
votes
2 answers
How to find the maximum in relational algebra?
This is my database course's homework.
We have this relation.
Trained(A, B) A trained B
How can I figure out who has trained the most people by using relational algebra or it cannot be expressed in relational algebra?
for example,
(John,…
John
- 107
0
votes
1 answer
Relational algebra and union
Consider a database consisting of the relations, where the primary key of each relation is bolded.
sailors (sid, sname, rating, age)
boats (bid, bname, color)
reserved (sid, bid, date)
Find all sailor id's of sailors who have a rating of at least 8…
falafel
- 3
0
votes
1 answer
Relational Aglebra, dont know what to do!
The following relational tables/schemes are given:
In bold is the primary key, in Italics is foreign…
Jerry West
- 575
-1
votes
1 answer
In relational algebra, what would be the result of $(R-S)\cup (S-R)?$
Suppose relation $R(A,B,C)$ has the following tuples:
$X\;\;\;\; Y\;\;\;Z$
$1\;\;\;\;\; 2\;\;\;\;\; 3$
$4\;\;\;\;\; 2\;\;\;\;\; 3$
$4\;\;\;\;\; 5\;\;\;\;\; 6$
$2\;\;\;\;\; 5\;\;\;\;\; 3$
$1\;\;\;\;\; 2\;\;\;\;\; 6$
and relation $S(A,B,C)$ has the…
Zignd
- 127
-4
votes
1 answer
Relational calculus question, universal quantifier
I'm reading the book "Fundamental of Database Systems" for a Database course and I'd need some directions.
I've tried hard to understand this from the book, but I can't wrap my mind around it, as I think it doesn't make sense from anything in logic…
Caj
- 55