edited by
13,156 views
40 40 votes

Given two union compatible relations $R_1(A, B)$ and $R_2 (C, D)$, what is the result of the operation $R_1 \Join_{ A = C \wedge B = D} R_2$?

  1. $R_1 \cup R_2$

  2. $R_1 \times R_2$

  3. $R_1 – R_2$

  4. $R_1 \cap R_2$

2 Answers

Best answer
60 60 votes

This question is an example of Theta Join,

$r \bowtie_\theta s= \sigma_\theta(r \times s)$

The join here will be selecting only those tuples where $A = C$ and $B = D,$ meaning it is the intersection. D option.

edited
1 1 vote

✍️ Example:

Let’s say:

R₁(A, B):

AB
12
34
56

R₂(C, D):

CD
34
56
78

🔗 Operation: R₁ ⋈A₌C ∧ B₌D R₂

We match rows where:

  • A = C

  • B = D

So we look for tuples that are identical in both tables.

✅ Matching tuples:

  • ⟨3, 4⟩

  • ⟨5, 6⟩

🎯 Result:

ABCD
3434
5656

This is just the intersection of R₁ and R₂.

Answer:
Position:
Show:

Related questions

40 40 votes
10 answers 10 answers
16.2k
16.2k views
Kathleen asked Sep 26, 2014
16,187 views
Consider the following relational database schemes:COURSES (Cno, Name)PRE_REQ(Cno, Pre_Cno)COMPLETED (Student_no, Cno)COURSES gives the number and name of all the availab...
75 75 votes
3 answers 3 answers
15.2k
15.2k views
Kathleen asked Sep 25, 2014
15,202 views
There are five records in a database.$$\begin{array}{|c|c|c|c|} \hline \textbf {Name} & \textbf {Age} & \textbf {Occupation} & \textbf{Category } \\\hline \text{Rama} & ...
67 67 votes
6 answers 6 answers
30.1k
30.1k views
Kathleen asked Sep 26, 2014
30,091 views
Consider the following database relations containing the attributesBook_idSubject_Category_of_bookName_of_AuthorNationality_of_AuthorWith Book_id as the primary key.What ...
106 106 votes
8 answers 8 answers
27.2k
27.2k views
Kathleen asked Sep 25, 2014
27,244 views
Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s expression) is incorrect? R1 and R2 are relations, C1 and C2 are selectio...