Question:

The relation schema, \( \text{Person(pid, city) \), describes the city of residence for every person uniquely identified by \( \text{pid} \). The following relational algebra operators are available: \texttt{selection}, \texttt{projection}, \texttt{cross product}, and \texttt{rename}.} To find the list of cities where at least 3 persons reside, using the above operators, the minimum number of \texttt{cross product operations that must be used is ...........\_.}

Show Hint

Cross product is used in relational algebra to combine rows from two tables. Use it judiciously for solving cardinality constraints.
Updated On: Jan 23, 2025
  • 1
  • 2
  • 3
  • 4
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

The problem requires finding cities where at least 3 people reside. This can be accomplished as follows:
1. Use \texttt{selection} and \texttt{projection} to create a list of \( \text{city} \) values.
2. Perform \texttt{cross product} operations to create all combinations of rows for a given city, ensuring at least 3 unique entries for each city.
The minimum number of \texttt{cross product} operations required to verify at least 3 people in each city is 2. Final Answer: \[ \boxed{\text{(B)}} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions