search
Log In

Recent questions tagged relational-calculus

0 votes
1 answer
1
The relational algebra expression equivalent to the tuple calculus expression $\{t\mid t ​ \in ​ r \land (t[A]=10 \land t[B]=20)\}$ is $\sigma_{(A=10\:\lor\:B=20)}(r)$ $\sigma_{(A=10)}(r)\cup\sigma_{(B=20)}(r)$ $\sigma_{(A=10)}(r)\cap\sigma_{(B=20)}(r)$ $\sigma_{(A=10)}(r)-\sigma_{(B=20)}(r)$
asked Mar 31, 2020 in Databases Lakshman Patel RJIT 323 views
1 vote
1 answer
2
If $R$ is a relation in Relational Data Model and $A_1,A_2,\dots A_n$ are the attributes of relation $R$, what is the cardinality of $R$ expressed in terms of domain of attributes? $\mid R\mid\leq\mid \text{ dom }(A_1) \times \text{ dom }(A_2)\dots \text{ dom }(A_n)\mid$ ...
asked Mar 30, 2020 in Databases Lakshman Patel RJIT 208 views
4 votes
5 answers
3
Which of the following has same expressive power with regard to relational query language? Rational algebra and domain relational calculus Relational algebra and tuples relational calculus Relational algebra and domain relational calculus restricted to safe expression Relational algebra and tuples relational calculus restricted to safe expression a and b only c and d only a and c only b and d only
asked Jul 2, 2019 in Databases Arjun 1.5k views
0 votes
1 answer
4
0 votes
1 answer
5
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?
asked May 7, 2019 in Databases aditi19 324 views
2 votes
3 answers
6
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)
asked Apr 11, 2019 in Databases aditi19 3.2k views
0 votes
0 answers
7
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.
asked Apr 8, 2019 in Databases akash.dinkar12 275 views
0 votes
0 answers
8
Let R = (A, B) and S = (A, C), and let r (R) and s(S) be relations. Write SQL Queries equivalent to the following domain relational- calculus expressions: a. {< a > | $\exists b (< a, b > \epsilon¸r \wedge b$ ... $\exists c (< a, c > \epsilon, s \wedge \exists b1, b2 (< a, b1 > \epsilon, r \wedge < c, b2 > \epsilon r \wedge b1 > b2$))}
asked Mar 30, 2019 in Databases ajaysoni1924 147 views
0 votes
1 answer
9
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
asked Mar 27, 2019 in Databases ajaysoni1924 174 views
0 votes
0 answers
10
1 vote
0 answers
11
Consider the employee database shown here. Give expressions in tuple relational calculus and domain relational calculus for each of the following queries: a. Find the names of all employees who work for First Bank Corporation . b. Find the names and cities of residence of ... street, city ) works (person name, company name, salary) company (company name, city) manages (person name, manager name)
asked Mar 26, 2019 in Databases ajaysoni1924 251 views
1 vote
1 answer
12
Consider the relational database given below where the primary keys are underlined. Give an expression in tuple relational calculus for each of the following queries: a. Find all employees who work directly for Jones. b. Find all cities of residence of all employees who ... street, city ) works (person name, company name, salary) company (company name, city) manages (person name, manager name)
asked Mar 26, 2019 in Databases ajaysoni1924 483 views
0 votes
0 answers
13
Let R = (A, B) and S = (A,C), and let r (R) and s(S) be relations.Write expressions in relational algebra for each of the following queries: a. {< a > | ∃ b (< a, b > ∈ r ∧ b = 7)} b. {< a, b, c > | < a, b > ∈ r ∧ < a, c > ∈ s} c. {< a > | ∃ c (< a, c > ∈ s ∧ ∃ b1, b2 (< a, b1 > ∈ r ∧ < c, b2 > ∈ r ∧ b1 > b2))}
asked Mar 26, 2019 in Databases ajaysoni1924 97 views
0 votes
0 answers
14
Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give an expression in the domain relational calculus that is equivalent to each of the following: a. $\prod _A(r1)$ b. $\sigma _{B =17} (r1)$ c. r1 ∪ r2 d. r1 ∩ r2 e. r1 − r2 f. $\prod _{A,B}(r1) \Join \prod _{B,C}(r2)$
asked Mar 26, 2019 in Databases ajaysoni1924 374 views
0 votes
1 answer
15
SQL Aggregation is possible by extended relational algebra operators? SQL grouping is possible in relational algebra. Relational algebra is equivalent to safe relational calculus expressions, then grouping and aggregation possible in tuple relational calculus and domain relational calculus? What about ordering? Please explain how will we consider these questions from GATE point of view.
asked Jan 27, 2019 in Databases Aman Janko 299 views
0 votes
0 answers
16
Given i= 0, j = 1, k = – 1 x = 0.5, y = 0.0 What is the output of given ‘C’ expression ? x * 3 & & 3 || j | k explanation please….
asked Jan 19, 2019 in Programming shiva0 206 views
0 votes
1 answer
17
relation parts(pid, pname, color) catalog(sid, pid, cost) find the sids of suppliers who supply every red part. can someone give the TRC and DRC expression for this?
asked Nov 26, 2018 in Databases aditi19 221 views
0 votes
0 answers
18
0 votes
1 answer
19
give domain relation calculus expression works(person-name, company-name, salary) find the names of all employees who earn more than every employee of Small Bank Corporation
asked Nov 4, 2018 in Databases aditi19 72 views
0 votes
0 answers
20
Online Site For practicing Relational Algebra https://dbis-uibk.github.io/relax/calc.htm
asked Oct 28, 2018 in Databases kumar.dilip 231 views
0 votes
0 answers
21
How we find the given calculus is safe or not
asked Sep 8, 2018 in Databases bhavnakumrawat5 109 views
0 votes
1 answer
22
I think it should be option a) All query $1,3,4$ are equivalent but $2$ is not equivalent. Query $2$ should be $\prod \text{Room no,hotel no,type,price}(\sigma \text{type='single' } \wedge \text{price=200 })$
asked Aug 17, 2018 in Databases Anand. 253 views
1 vote
2 answers
23
Relation Schema : Employee (Name, Ssn, Bdate, Address, Dept_number) Project (Pname, Pno, Dept_number) WorksOn (Essn, Pno, Hours) List the names of employees who work on all the projects controlled by department number 10. My Answer : ... and thus those employees name will be printed who work for some project at department no. 5 and not for the department no. 10 ?
asked Jul 2, 2018 in Databases Harsh Kumar 703 views
0 votes
1 answer
24
I am not well versed in Predicate calculus and maybe, therefore, I am having problems writing queries in Tuple Relational Calculus and sometimes also in interpreting them. I want to know if there is any specific and definite procedure of translating the Relational ... some names of good books/lectures on predicate calculus. Any guidance or reference would be highly helpful for me. Thank You.
asked Jul 1, 2018 in Databases Harsh Kumar 241 views
1 vote
2 answers
26
If there are three tables to choose from - Sailors(sid,sname); Reserves(sid,bid); Boats(bid,color) Question is to choose a sailor who reserved a red boat. My question is what is the difference between these two TRC expressions. ... Which of the above is correct? Are both correct? Are none correct?
asked Apr 15, 2018 in Databases tarunmaganti 342 views
8 votes
1 answer
27
The following relations are used to store data about students, courses, enrollment of students in courses and teachers of courses. Attributes for primary key in each relation are marked by $ \text{*'}.$ $\text{students} (\text{rollno*},\text{sname},\text{saddr})$ ... prove that it is in $\text{3NF}$. If not, normalize the relations so that they are in $\text{3NF}$ (without proving).
asked Feb 5, 2018 in Databases jothee 1.2k views
2 votes
0 answers
28
I have two doubts: 1) A natural join B What will be the result when B don't have any tuple in it. Like in B their is relational algebra expression which is selecting Cars of green color but their is no green color car in table. What will be the result in this case. 2) A / B In above divison if B is a relational algebra expression returning nothing ( like the B in case 1). What will be the result ?
asked Jan 14, 2018 in Programming ♥_Less 198 views
...