Skip to content
Q59Section DA (Data Science and Artificial Intelligence (Q11–Q65))59 of 65

Counting tuples satisfying a tuple relational calculus formula

Let there be two relations XX and YY as shown. XX has three columns PP, QQ and RR. YY has two columns PP and SS.

| X.PX.P | X.QX.Q | X.RX.R | |—|—|—| | P1 | Q1 | R1 | | P2 | Q2 | R2 | | P3 | Q3 | R2 |

| Y.PY.P | Y.SY.S | |—|—| | P1 | 10 | | P1 | 15 | | P2 | 20 | | P3 | 1 |

Consider that the following tuple relational calculus expression is evaluated. {t∣t∈X∧∃z∈X(t[P]=z[P])∧∃m∈Y (m[P]=t[P]∧m[S]>1)}\{t \mid t \in X \wedge \exists z \in X(t[P] = z[P]) \wedge \exists m \in Y \, (m[P] = t[P] \wedge m[S] > 1)\} The number of tuples that will be returned is __________ . (Answer in integer)

Numerical answer: type the number (no options).

Type your answer and check it.