Skip to content
GATEiit

GATE DA 2025 Q62: Relational division: customers with loans at every branch

Question

Consider the following tables, Loan and Borrower, of a bank.

Loan
loan_numbranch_nameamount
L11Banjara Hills90000
L14Kondapur50000
L15SR Nagar40000
L22SR Nagar25000
L23Balanagar80000
L25Kondapur70000
L19SR Nagar65000
Borrower
customer_nameloan_num
AnandL11
KarteekL11
KarteekL14
AnkitaL15
GopalL19
KarteekL22
KarteekL23
SunilL23
SunilL25

Query: πbranch_name, customer_name(Loan⋈Borrower)÷πbranch_name(Loan)\pi_{\textbf{branch\_name, customer\_name}}(\textbf{Loan} \bowtie \textbf{Borrower}) \div \pi_{\textbf{branch\_name}}(\textbf{Loan})

where ⋈\bowtie 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

Numerical answer. No negative marking.
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

WhatsAppDownload image

Source: official GATE 2025 DA question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key