Question: 2 . ( 6 0 ' ) Consider a database with a single table T ( song id , song name,artist id , duration number
Consider a database with a single table Tsong idsong name,artist idduration number of streams where song id is the primary key, and all attributes are the same fixed width. Suppose T has tuples that fit into pages, Ignore any additional storage overhead for the table eg page headers, tuple headers Additionally, you should make the following assumptions:
The DBMS does not have any additional metadata eg sort order, zone maps
T does not have any indexes including for primary key song id
None of Ts pages are already in the buffer pool. The DMBS has an infinite buffer pool.
Contentwise, the tuples of T will always make each query run the longest possible and do the most page accesses.
The tuples of T can be in any order keep this in mind when computing minimum versus maximum number of pages that the DBMS will potentially have to read and think of all possible orderings
There are pages per attribute.
Part a
SELECT MAXnumberofstreams FROM T
WHERE duration AND artistid ;
i Suppose the DBMS uses the decomposition storage model DSM with implicit offsets. How many pages will the DBMS potentially have to read from disk to answer this query? should be a range between the best case and the worst case, and why
ii Suppose the DBMS uses the Nary storage model NSM How many pages will the DBMS potentially have to read from disk to answer this query? should be a range between the best case and the worst case, and why
Part b
SELECT songname, artistid FROM T
WHERE songid OR songid OR songid ;
i Suppose the DBMS uses the decomposition storage model DSM with implicit offsets. What is the minimum and maximum number of pages that the DBMS will potentially have to read from disk to answer this query?
ii Suppose the DBMS uses the Nary storage model NSM What is the minimum and maximum number of pages that the DBMS will potentially have to read from disk to answer this query?
Part c
SELECT songid numberofstreams FROM T
WHERE duration SELECT MINduration FROM T;
i Suppose the DBMS uses the decomposition storage model DSM with implicit offsets. What is the minimum and maximum number of pages that the DBMS will potentially have to read from disk to answer this query?
ii Suppose the DBMS uses the Nary storage model NSM What is the minimum and maximum number of pages that the DBMS will potentially have to read from disk to answer this query?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
