Practice mode DBMS and SQL

Relation R has 4 tuples and 3 attributes, and S has 5 tuples and 2 attributes, with no attribute names in common. How large is the Cartesian product R x S?

Correct answer D. 20 tuples, 5 attributes

Explanation

The Cartesian product pairs every tuple of R with every tuple of S, so the cardinality is 4 x 5 = 20. Each result tuple concatenates the attributes of both, so the degree is 3 + 2 = 5. A common mistake is to multiply the attribute counts too: tuples multiply, attributes add. Adding the tuple counts to get 9 describes a union of compatible relations instead.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.