1D0-541 practice question 15 of 25

A theta-join can be viewed as:

Full set: 128 questions
Answer options
A: the intersection of two relations.
B: a Cartesian product of two relations.
C: a restricted Cartesian product of two relations. Correct answer
D: the Cartesian product of two union-compatible relations.
Correct Answer:
C. a restricted Cartesian product of two relations.
Explanation

In relational algebra, a theta-join (R ⋈θ S) is formally defined as a selection operation (σ) applied to the Cartesian product (×) of two relations. The process first generates all possible pairings of tuples from the two relations (the Cartesian product) and then filters, or "restricts," this result set, keeping only the pairs that satisfy the join condition θ. Therefore, a theta-join is equivalent to a restricted Cartesian product, represented as σθ(R × S).

Why Incorrect

A. The intersection of two relations is a set operation that returns only the tuples that exist in both relations; it does not combine tuples from different relations.
B. A Cartesian product combines every tuple from the first relation with every tuple from the second, without applying any filtering condition, resulting in a much larger, unrestricted set.
D. Union-compatibility (having the same number and type of attributes) is a requirement for set operations like union and intersection, not for joins or Cartesian products.

References

1. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2010). Database System Concepts (6th ed.). McGraw-Hill. In Chapter 2, "Introduction to the Relational Model," Section 2.4 "Relational Algebra," the theta-join is defined as: "The theta join operation, denoted by R ⋈θ S, is defined as R ⋈θ S = σθ(R × S)." This explicitly shows the join as a selection (restriction) on a Cartesian product.

2. Elmasri, R., & Navathe, S. B. (2016). Fundamentals of Database Systems (7th ed.). Pearson. In Chapter 5, "The Relational Algebra and Relational Calculus," Section 5.2.3 "The JOIN Operation," it states: "The general join operation, called a theta join... is defined as: R ⋈ S = σ(R × S)." This confirms the definition as a selection over a Cartesian product.

3. Ullman, J. D., & Widom, J. (2008). A First Course in Database Systems (3rd ed.). Pearson Prentice Hall. In Chapter 2, "The Relational Model," Section 2.4.5 "Products and Joins," the text explains that a theta-join is a specific case of a product followed by a selection. It describes the operation as "take the product of R and S. Then, apply a selection with condition C." This directly supports the concept of a restricted Cartesian product.

Scroll to Top