Question: Suppose the relation R 1 ( A , B ) and R 2 ( B , C , D ) have the following tuples: Compute

Suppose the relation R1(A,B) and R2(B,C,D) have the following tuples:
Compute the theta-join of R1 and R2 with conditions R1.B = R2.B AND R1.A < R2.C. Which of the following tuples is
in the result? Assume each tuple has schema (A, R1.B, R2.B, C, D).
a)(2, G, T,8,9) b)(4, C, C,7,8) c)(4, C, C,5,6) d)(1, A, C,4,3)
Questions (7,8,9, and 10). Give the following queries in the relational algebra using the relational schema:
student(id, name)(can be called ST)
enrolledIn(id, code)(can be called EN)
subject(code, lecturer)(can be called either SU1 or SU2)
Who teaches cs1500 or cs3020?
Who teaches at least two different subjects?
What are the names of students in cs1500 or cs3010?
What are the names of students in both cs1500 and cs1200?
Bonus question. Consider the database with the following schema:
Person(name, age, gender) name is key
Frequents(name, iceCreamShop)(name, iceCreamShop) is a key
Eats(name, flavor)(name, flavor) is a key
Sells(iceCreamShop, flavor, price)(iceCreamShop, flavor) is a key
Find an ice cream shop that is frequented by people older than 30 but younger than 40 years old.
A B
1 A
7 T
2 G
4 C
9 T
B C D
C 56
A 78
T 89

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!