Recent questions tagged relational-algebra

0 0 votes
1 1 answer
27
27 views
Consider the relations:$\mathrm{Users(username, name, email, password, address)}$and$\mathrm{FriendsWith(username, username2, sincewhen)}$.A friendship tuple indicates th...
0 0 votes
1 1 answer
18
18 views
Consider the relations:$\mathrm{STUDENT(name,regno,gpa,level,dept)}$$\mathrm{COURSE(cno,cname,dept)}$$\mathrm{TAKE(regno,cno)}$Using only the basic relational algebra ope...
0 0 votes
1 1 answer
18
18 views
Consider $R(a,b)$ and $S(c,d)$.Which relational algebra expression is equivalent to:SELECT a, d FROM R, S WHERE R.a 10 AND R.b = S.c;Use only the basic operators.$\pi_{a...
0 0 votes
1 1 answer
14
14 views
Let $R$ and $S$ be union-compatible relations.Which expression computes $R\cap S$ using only union and set difference?$(R\cup S)-((R-S)\cup(S-R))$ $(R\cup S)-(R-S)$ $(R-S...
0 0 votes
1 1 answer
20
20 views
Consider $\text{parts(pno, pname, price)}$.Which relational algebra expression returns exactly the names of all parts whose price is greater than $\$200$?$\pi_{\text{pnam...
2 2 votes
2 2 answers
275
275 views
Which of the following statements are correct?The HAVING CLAUSE is an optional clause which tells Oracle to group rows based on distinct values that exist for specified c...
5 5 votes
2 2 answers
704
704 views
Consider the given relations $X, Y$ and $Z$. The relation $X$ has three columns $P, Q$ and $R$. The relation $Y$ has three columns $P, Q$ and $S$. The relation $Z$ has tw...
0 0 votes
1 1 answer
400
400 views
I have a doubt in Relational algebra : Like we have the relations R(A B) and T(B C)and K(C D) here ABCD are attribute of relations then how can we perfom union operation...
2 2 votes
2 2 answers
582
582 views
Consider the following three relations:Employee (eid, eName), Comp(cid, cName), Own(eid, cid).Which of the following relational algebra expression return the set of eids ...
2 2 votes
3 3 answers
578
578 views
Consider a relation schema $\mathrm{R}=(\mathrm{U}, \mathrm{V}, \mathrm{W}, \mathrm{X}, \mathrm{Y}, \mathrm{Z})$, on which the following functional dependencies hold:$$\{...
3 3 votes
1 1 answer
340
340 views
Which of the following relations can not be decomposed in to BCNF with a lossless join and dependency-preserving decomposition?$\mathrm{R}(\mathrm{V}, \mathrm{W}, \mathrm...
0 0 votes
2 2 answers
339
339 views
Consider the following relations $\mathrm{X}(\mathrm{S}, \mathrm{Si}, \mathrm{C})$ and $\mathrm{Y}(\mathrm{S}, \mathrm{P}, \mathrm{D})$.$\mathrm{X}$ $\begin{array}{|c|c|c...
1 1 vote
0 0 answers
311
311 views
Consider the following relations $\mathrm{X}(\mathrm{S}, \mathrm{Si}, \mathrm{C})$ and $\mathrm{Y}(\mathrm{S}, \mathrm{P}, \mathrm{D})$.\[X =\begin{array}{|c|c|c|}\hlineS...
2 2 votes
2 2 answers
373
373 views
Consider the following relations $\mathrm{X}(\mathrm{S}, \mathrm{Si}, \mathrm{C})$ and $\mathrm{Y}(\mathrm{S}, \mathrm{P}, \mathrm{D})$.$\mathrm{X}$$\begin{array}{|c|c|c|...
1 1 vote
1 1 answer
189
189 views
Consider the following relations $\mathrm{X}(\mathrm{S}, \mathrm{Si}, \mathrm{C})$ and $\mathrm{Y}(\mathrm{S}, \mathrm{P}, \mathrm{D})$.$\mathrm{X}$$\begin{array}{|c|c|c|...
0 0 votes
1 1 answer
234
234 views
Consider the following relations $\mathrm{X}(\mathrm{S}, \mathrm{Si}, \mathrm{C})$ and $\mathrm{Y}(\mathrm{S}, \mathrm{P}, \mathrm{D})$.$\mathrm{X}$$\begin{array}{|c|c|c|...
1 1 vote
2 2 answers
540
540 views
0 0 votes
1 1 answer
320
320 views
1 1 vote
1 1 answer
383
383 views
C13. A directed graph can be represented by its edge-list and stored in a database table with attributes (source, target). For example, the following table stores the edg...