Consider the bank database of Figure 16.9, where the primary keys are underlined. Construct the following SQL

Question:

Consider the bank database of Figure 16.9, where the primary keys are underlined. Construct the following SQL queries for this relational database.
a. Write a nested query on the relation account to find, for each branch with name starting with B, all accounts with the maximum balance at the branch.

b. Rewrite the preceding query without using a nested subquery; in other words, decorrelate the query, but in SQL.

c. Give a relational algebra expression using semijoin equivalent to the query.

d. Give a procedure for decorrelating such queries.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Database System Concepts

ISBN: 9780078022159

7th Edition

Authors: Abraham Silberschatz, Henry F. Korth, S. Sudarshan

Question Posted: