retagged by
2,021 views
2 votes
2 votes

Consider the following two relations, $R(A, B)$ and $S(A, C)$:

$R$
$A$$B$
$10$$20$
$20$$30$
$30$$40$
$30$$50$
$50$$95$

$S$
$A$$C$
$10$$90$
$30$$45$
$40$$80$

The total number of tuples obtained by evaluating the following expression

$\sigma_{B<C}\left(R \bowtie_{R . A=S . A} S\right)$ is ___________.

retagged by

1 Answer

2 votes
2 votes

The output of $R( \bowtie_{R.A=S.A} S)$ is simply return the number of tuples where $R.A$ value is equal to $S.A$. So the output is as follow:

A

B

C

10

20

90

30

40

45

30

50

45

from the above table now we have to perform $(\sigma_{B<C}(R \bowtie_{R.A=S.A} S))$. it return the number of rows where $B's$ value is less than $C$. so the output is:

A

B

C

10

20

90

30

40

45

 

So the given expression returns $2$ tuples as output.

Answer:

Related questions

2.4k
views
2 answers
1 votes
Arjun asked Feb 16
2,380 views
Let $\mathrm{S}$ be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one...
3.0k
views
3 answers
4 votes
Arjun asked Feb 16
2,997 views
In a $\mathrm{B}+$ tree, the requirement of at least half-full $(50 \%)$ node occupancy is relaxed for which one of the following cases?Only the root nodeAll leaf nodesAl...
4.0k
views
2 answers
4 votes
Arjun asked Feb 16
4,027 views
Which of the following statements about a relation $\mathbf{R}$ in first normal form $\text{(1NF)}$ is/are TRUE?$\mathbf{R}$ can have a multi-attribute key$\mathbf{R}$ ca...
2.4k
views
3 answers
2 votes
Arjun asked Feb 16
2,445 views
​The symbol $\rightarrow$ indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?$(X, Y) \rightarrow(Z, W)$...