Question: Consider the relation schema OrderContent ( orderID , product, amount ) Let s assume the relation occupies 1 2 0 pages of space. On average,

Consider the relation schema OrderContent(orderID, product, amount)
Lets assume the relation occupies 120 pages of space.
On average, each order includes 5 products and each product belongs to 30 orders. There is no clustering of any attributes.
Two kinds of queries are frequent for the table: searching for certain order ID (type Q1, fraction p1) and searching for orders with certain products (type Q2, fraction p2).
Insertions to the table take the fraction 1- p1- p2 of all operations on the table (type I).
Give formulas in terms of p1 and p2 to measure the cost of queries Q1 and Q2 and insertion I under the following four combinations.
1. No indices at all
2. Index for the attribute orderID
3. Index for the attribute product
4. Index for both attributes (orderID and product)
Remember to also explain where the numbers in your formulas come from.

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 Databases Questions!