retagged by
2,942 views
2 votes
2 votes

Suppose database table $T1(P, R)$ currently has tuples ${(10, 5), (15, 8), (25, 6)}$ and table $T2 (A, C)$ currently has ${(10, 6), (25, 3), (10, 5)}$. Consider the following three relational algebra queries $RA1, RA2$ and $RA3$:

$RA1$ :$T1 \Join _{T1.P = T2.A}$ $T2$ where $\Join$ is natural join symbol

$RA2$ :$T1 =\Join _{T1.P = T2.A}$ $T2$ where $=\Join$ is left outer join symbol

$RA3$ :$T1 \Join_{T1.P = T2.A}$ and $_{T1.R = T2.C} T2$

The number of tuples in the resulting table of RA1, RA2 and RA3 are given by :

  1. $2, 4, 2$ respectively
  2. $2, 3, 2$ respectively
  3. $3, 3, 1$ respectively
  4. $3, 4, 1$ respectively
retagged by

2 Answers

0 votes
0 votes

Ra1 says natural join ... With condition T1.R =T2.A which will give 3 rows  

RA2 says left outer join which will give 4 rows 

Ra3 says natural join with two conditions matching T1.p=T2.A

I am attaching an image by that you can understand better.Image attached in response to above questions explanation

Related questions