GATE DA 2025 Q62: Relational division: customers with loans at every branch
- Database Management and Warehousing
- 2 marks
- NAT
- No negative marking
Question
Consider the following tables, Loan and Borrower, of a bank.
| loan_num | branch_name | amount |
|---|---|---|
| L11 | Banjara Hills | 90000 |
| L14 | Kondapur | 50000 |
| L15 | SR Nagar | 40000 |
| L22 | SR Nagar | 25000 |
| L23 | Balanagar | 80000 |
| L25 | Kondapur | 70000 |
| L19 | SR Nagar | 65000 |
| customer_name | loan_num |
|---|---|
| Anand | L11 |
| Karteek | L11 |
| Karteek | L14 |
| Ankita | L15 |
| Gopal | L19 |
| Karteek | L22 |
| Karteek | L23 |
| Sunil | L23 |
| Sunil | L25 |
Query:
where denotes natural join.
The number of tuples returned by the above relational algebra query is ____ (Answer in integer)
Try it: numerical answer: type the value
Show answer and explanation
Answer: 1 (official GATE 2025 final answer key)
Concept used: Relational division returns the values related to every tuple of the divisor.
First step: The divisor is the set of branches: Banjara Hills, Kondapur, SR Nagar and Balanagar. Find which customers have at least one loan at each of these four branches.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2025 DA question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key
More Database Management and Warehousing PYQs
- 2025 · Q16Non-dependency-preserving decomposition: which operator runs more?
- 2025 · Q17Relational algebra on Car, Make and Own
- 2025 · Q33SQL: loans larger than every SR Nagar loan
- 2025 · Q46OLAP: rows returned by GROUP BY CUBE(D1, D2)
- 2025 · Q56Keys and NULLs in Person and Customer tables
- 2025 · Q57Candidate keys and BCNF for R(ABCDEFG)