Database Systems The CompleteBook 2nd Edition Suppose that
###
Database Systems The CompleteBook (2nd Edition)
Suppose that the relation StarsIn discussed in Example 8.14 required 100 pages rather than 10, but all other assumptions of that example continued to hold. Give formulas in terms of p_1 and p_2 to measure the cost of queries Q_1 and Q_2 and insertion I, under the four combinations of index/no index discussed there.Solution
Action
No Index
Star Index
Movie Index
Both Indexes
Q1
100
4
100
4
Q2
100
100
4
4
I
2
4
4
6
Average
2 + 98p1 + 98p2
4+96p2
4 + 96p1
6 – 2p1 – 2p2
Explanation:
| Action | No Index | Star Index | Movie Index | Both Indexes |
| Q1 | 100 | 4 | 100 | 4 |
| Q2 | 100 | 100 | 4 | 4 |
| I | 2 | 4 | 4 | 6 |
| Average | 2 + 98p1 + 98p2 | 4+96p2 | 4 + 96p1 | 6 – 2p1 – 2p2 |

