Identify the correct operation that produces the given output from the two relations R1 and R2.
R1
| Name | Class |
|---|---|
| a1 | 9 |
| b1 | 5 |
| c1 | 6 |
| d1 | 11 |
R2
| Name | Class |
|---|---|
| b1 | 5 |
| f1 | 8 |
Output
| Name | Class |
|---|---|
| b1 | 5 |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. R1 ∩ R2
Explanation
The only common tuple is (b1, 5), which is R1 ∩ R2. (R1 − (R1 − R2) is an equivalent way to write the intersection.)More Database Management Systems questions
- Match List I with List II. Choose the correct answer from the options given below:List I List II a. Apache Kafka I. Platform for constructi…
- Select the correct order of the DBSCAN algorithm. I. Recursively find all density-connected points and assign them to the same cluster as t…
- Which relational algebra query computes the sids of sailors with age over 20 who have not reserved a red boat?
- Which query/queries compute the names of sailors who have reserved a red boat? Q1: πsname((σcolor='red' Boats) ⋈ Reserves ⋈ Sailors) Q2: πs…
- Which query/queries compute the names of sailors who have reserved boat 103? Q1: πsname((σbid=103 Boats) ⋈ Sailors) Q2: πsname(σbid=103(Res…
- Which query computes the names of sailors who have reserved all boats?