Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 Consider the following relation and query: B(bid, accNo), accNo is a key. A(accNo, code, balance), accNo is a key. Select B.bid, Sum(A.balance) From

image text in transcribed

Question 4 Consider the following relation and query: B(bid, accNo), accNo is a key. A(accNo, code, balance), accNo is a key. Select B.bid, Sum(A.balance) From B, A Where B.accNo=A.accNo Group by B.bid This query computes the sum of the balances at each branch. Assume that there a clustered B+ tree index on B.bid and a hash index on A.acc No. Discuss the plans of evaluating the query with lowest 1/0 cost. If A and B have |A| and |B| pages, and each page has 100 records, what is the 170 cost? (Hint: use index to reduce the cost of join and sorting cost for aggregation). Explain steps and show you work. Providing just the calculation with no explanation is not suffice. Question 4 Consider the following relation and query: B(bid, accNo), accNo is a key. A(accNo, code, balance), accNo is a key. Select B.bid, Sum(A.balance) From B, A Where B.accNo=A.accNo Group by B.bid This query computes the sum of the balances at each branch. Assume that there a clustered B+ tree index on B.bid and a hash index on A.acc No. Discuss the plans of evaluating the query with lowest 1/0 cost. If A and B have |A| and |B| pages, and each page has 100 records, what is the 170 cost? (Hint: use index to reduce the cost of join and sorting cost for aggregation). Explain steps and show you work. Providing just the calculation with no explanation is not suffice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

=+25-3 Identify the depressants, and describe their effects.

Answered: 1 week ago