Consider the following schemas: (NET-DEC-2013) Branch = (Branch-name, Assets,…

2013

Consider the following schemas: (NET-DEC-2013)

Branch = (Branch-name, Assets, Branch-city)
Customer = (Customer-name, Bank name, Customer-city)
Borrow = (Branch-name, loan number, customer account-number)
Deposit = (Branch-name, Account-number, Customer-name, Balance)

Using relational Algebra, the Query that finds customers who have balance more than 10,000 is ________

  1. A.

    π customer-name (σ balance > 10000 (Deposit))

  2. B.

    σ customer-name (σ balance > 10000 (Deposit))

  3. C.

    π customer-name (σ balance > 10000 (Borrow))

  4. D.

    σ customer-name (π balance > 10000 (Borrow))

Attempted by 170 students.

Show answer & explanation

Correct answer: A

To find customers with a balance greater than 10,000 using Relational Algebra:

1. Identify the relation containing the Balance attribute, which is Deposit.

2. Use the Selection operator (σ) to filter rows where Balance > 10,000: σ_{Balance > 10000}(Deposit).

3. Use the Projection operator (π) to select only the Customer-name column: π_{Customer-name}(σ_{Balance > 10000}(Deposit)).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor