Take the following relational schemes:
R(A, B, C)S(D, E, F)
where the attributes A and D are the primary keys, respectively.
Assume to have an instance r of R with n tuples and an instance s of S with m tuples.
Moreover, assume to have a referential integrity constraint between C and the primary key of S.
Now, I was asked the following questions:
How many tuples does the θ-join between
sandrcontain if the join predicate isC = D?How many tuples does the θ-join between
sandrcontain if the join predicate isB = E?
My answers:
n tuplessince it all depends on the number of tuples belonging to the second relation that match the tuples which are part of the first onezerosince there's no common attributes
Is my reasoning correct?