Question: 2 . ( 6 0 ' ) Consider a database with a single table T ( song id , song name,artist id , duration number

2.(60') Consider a database with a single table T(song id,song name,artist id,duration number of streams), where song id is the primary key, and all attributes are the same fixed width. Suppose T has 10,000 tuples that fit into 500 pages, Ignore any additional storage overhead for the table (e.g., page headers, tuple headers). Additionally, you should make the following assumptions:
- The DBMS does not have any additional meta-data (e.g., sort order, zone maps).
- T does not have any indexes (including for primary key song id).
- None of T's pages are already in the buffer pool. The DMBS has an infinite buffer pool.
- Content-wise, 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 100 pages per attribute.
Part a.
SELECT MAX(number_of_streams) FROM T
WHERE duration >100 AND artist_id ==123321 ;
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 N-ary 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 song_name, artist_id FROM T
WHERE song_id =15445 OR song_id =15645 OR song_id =15721;
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 N-ary 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 song_id, number_of_streams FROM T
WHERE duration =(SELECT MIN(duration) 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 N-ary 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?
2 . ( 6 0 ' ) Consider a database with a single

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!