# Recent questions tagged relational-algebra

1
The following relation records the age of $500$ employees of a company, where $empNo$ ( indicating the employee number) is the key: $empAge(\underline{empNo},age)$ ... one other employee Employee numbers of all employees whose age is not the minimum Employee numbers of all employees whose age is the minimum
2
Match $\text{List I}$ with $\text{List II}$ Let $R_1=\{(1,1), (2,2), (3,3)\}$ and $R_2=\{(1,1), (1,2), (1,3), (1,4)\}$ ... answer from the options given below: $A-I, B-II, C-IV, D-III$ $A-I, B-IV, C-III, D-II$ $A-I, B-III, C-II, D-IV$ $A-I, B-IV, C-II, D-III$
3
Which of the following desired features are beyond the capability of relational algebra? Aggregate Computation Multiplication Finding transitive closure All of the above
4
Which of the following is a fundamental operation in relational algebra? Set intersection Assignment Natural Join None of the above
5
Which of the following is a fundamental operation in relational algebra? Set intersection Natural join Assignment None of the above
6
Cross Product is a Unary Operator Ternary Operator Binary Operator Not an operator
7
Let $pk(R)$ denotes primary key of relation $R$. A many-to-one relationship that exists between two relation $R_1$ and $R_2$ can be expressed as follows: $pk(R_2)\rightarrow pk(R_1)$ $pk(R_1)\rightarrow pk(R_2)$ $pk(R_2)\rightarrow R_1 \cap R_2$ $pk(R_1)\rightarrow R_1 \cap R_2$
8
With respect to relational algebra, which of the following operations are included from mathematical set theory? Join Intersection Cartisian product Project a and d b and c c and d b and d
9
In a relational algebra ∩ is not a basic operator, to make it basic only relational operator we should have are X, – X, U U, –
10
Consider two $n \times 1$ vectors $u$ and $v$ , stored as table $U(\text{ind,val})$ and $V(\text{ind,val})$ with the same schema A row $(i,u_i)$ of table $U$ specifies the $i^{th}$ element of vector $u$ has value $u_i$ (similarly for $v$, ... $u + v$ of the two vectors $u$ and $v$. Explain your solution.
1 vote
11
... How this implication holds true?? Selection operation is commutative. But is two project operation can be merge in one project operation? Can project operation removes duplicates too??
12
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost) Find the pids of the most expensive parts supplied by suppliers named Yosemite Sham
13
Given relation catalog(sid, pid, cost) Find pairs of sids such that the supplier with the first sid charges more for some part than the supplier with the second sid what is the relational algebra expression for this?
14
Here why does the 5th query select * from employees natural join works_on where PID = 'X' AND PID='Y'; is not working The queries are The output are
15
Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples, and N2>N1> 0, give the minimum and maximum possible sizes (in tuples) for the result relation produced by each of the following relational algebra expressions. In each case, state any assumptions about ... difference) $R1 X R2$ (cartesian product) $σa=5(R1)$ (selection) $\pi a(R1)$ (projection) $R1/R2$ (division)
16
Consider the following relations: $\text{STD_CHOICES } (\underline{\text{Student_ID}}, \underline{\text{Course_ID}}, \text{Semester})$ and $\text{COURSE_ASSIGN} (\underline{\text{Teacher_ID}}, \underline{\text{Course_ID}}, \underline{\text{Semester}})$. The former ... output the ID for all the students who have not been taught by the same teacher in more than one course across all semesters.
17
We know that Relational Algebra is $Procedural$ whereas TRC and DRC are $Non-Procedural$ querry languages. But what exactly differentiates them? Please explain using some example. In Relational Algebra we give what to retrieve and ... https://stackoverflow.com/questions/32837278/difference-between-relational-algebra-and-relational-calculus/32841232#32841232 Please explain using some example
18
Let R = (A, B) and S = (A, C), and let r (R) and s(S) be relations. Using the special constant null, write tuple-relational-calculus expressions equivalent to each of the following: a. r $ROJ$ s b. r $FOJ$ s c. r $LOJ$ s
19
Consider two relations R1 , R2 with N1 and N2 tuples where N2 > N1 > 0, what are the minimum and maximum rows for the RA expression R2/R1 ?
1 vote