Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Selection algorithms. For each of the selection algorithms in the textbook (A1 to A10) (Database System Concepts), provide a sample scenario using table(s) in Banking

Selection algorithms. For each of the selection algorithms in the textbook (A1 to A10) (Database System Concepts), provide a sample scenario using table(s) in Banking database. For each scenario, describe which table(s) is/are used, how the file(s) is/are organized (along with index information, if applicable) and a specific query for which the algorithm is applicable. (At least one table should be used in each example.)

For your convenience, again here is the Banking database schema:branch (branch-name, branch-city, assets)customer (customer-name, customer-street, customer-city)account (account-number, branch-name, balance)loan (loan-number, branch-name, amount)depositor (customer-name, account-number)borrower (customer-name, loan-number)

image text in transcribed

Algorithm Cost ts +b * Reason ear Searc One initial seek plus b, trans where b, denotes the number of blocks in the file at most one record satisties con- Equality on case ts dition, scan can be terminated as soon as the required record is found. In the worst case, b, blocks transfers are still ar erage Key (b,/2) uired ere imry es in- B+-tree Index, (trts) dex.) Index lookup traverses the height of the tree plus one I/O to fetch the record; each of these I/O operations re- Equality or uires a seek and a block transfer A3 Primary (tT One seek for each level of the tree, one B+-tree Index, ts) +b t seek for the first block. Here b is the number of blocks containing records with the specified search key, all of which are read. These blocks are leaf blocks assumed to be stored sequen- tially (since it is a primary index) and Equality on Nonkey uire additional seeks don't *This case is similar to primary index. A4 Secondary (hi + I) B+-tree Index, (t ts) Equality or Ke ary n 1s nu er of recor B+-tree Index, (tr+ts)fetched.) Here, cost of index traversal Equality on Nonkey is the same as for A3, but each record may be on a different block, requiring a seek per record. Cost is potentially very high if n is large Primary +Identical to the case o equality or B+-tree Index, | ts) + b * nonkey Comprison ary tidentical to the case equality on B+-tree Index, (t+ts) nonkey. Comprison Algorithm Cost ts +b * Reason ear Searc One initial seek plus b, trans where b, denotes the number of blocks in the file at most one record satisties con- Equality on case ts dition, scan can be terminated as soon as the required record is found. In the worst case, b, blocks transfers are still ar erage Key (b,/2) uired ere imry es in- B+-tree Index, (trts) dex.) Index lookup traverses the height of the tree plus one I/O to fetch the record; each of these I/O operations re- Equality or uires a seek and a block transfer A3 Primary (tT One seek for each level of the tree, one B+-tree Index, ts) +b t seek for the first block. Here b is the number of blocks containing records with the specified search key, all of which are read. These blocks are leaf blocks assumed to be stored sequen- tially (since it is a primary index) and Equality on Nonkey uire additional seeks don't *This case is similar to primary index. A4 Secondary (hi + I) B+-tree Index, (t ts) Equality or Ke ary n 1s nu er of recor B+-tree Index, (tr+ts)fetched.) Here, cost of index traversal Equality on Nonkey is the same as for A3, but each record may be on a different block, requiring a seek per record. Cost is potentially very high if n is large Primary +Identical to the case o equality or B+-tree Index, | ts) + b * nonkey Comprison ary tidentical to the case equality on B+-tree Index, (t+ts) nonkey. Comprison

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_2

Step: 3

blur-text-image_3

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

C) and for AF? Pg45

Answered: 1 week ago

Question

5. Identify three characteristics of the dialectical approach.

Answered: 1 week ago