Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q2: The following query tree is given for the bank database. Assume the Account

ID: 658508 • Letter: Q

Question

Q2: The following query tree is given for the bank database.

Assume the Account table has an index on column bname and has 3 levels. Also assume the selectivity of the SL on Bal is 10% and the of SL on Bcity is 30%. What is the CPU cost of this query tree in terms of the number of rows processed for the following two cases? Case I: the join uses the Nested-Loop approach without the use of the index Case II: the join uses the Nested-Loop approach utilizing of the index on column bname of the Branch table.

Account Branch SL ed 1200 Bal1200 JN SL PJ Cname, B

Explanation / Answer

#include #include #include using std::cout; using std::cin; using std::endl; using std::fstream; using std::ofstream; using std::ifstream; using std::ios; class account_query { private: char account_number[20]; char firstName[10]; char lastName[10]; float total_Balance; public: void read_data(); void show_data(); void write_rec(); void read_rec(); void search_rec(); void edit_rec(); void delete_rec(); };