Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 2 (2 pts) Count the costs of operations and find an optimal selection of indexes for the Product table (Hardware Database) under the following
Exercise 2 (2 pts) Count the costs of operations and find an optimal selection of indexes for the Product table (Hardware Database) under the following assumptions: Operations Query Q1 (20%): SELECT * FROM Product WHERE maker-X AND type-Y query Q2 (10%): SELECT * FROM Product WHERE model-Z Insertion 1 (70%): INSERT INTO Product VALUES (A,B,C) Assumption about data (the same as on the slides) Data for the Product table is stored in 10 blocks. . The Model attribute is a key for Product. On the average, a maker produces 3 models of each type Records are spread uniformly over the 10 blocks: On the average, 3 records with the same maker are stored in 3 blocks. Any index for Product is stored in 1 block. Four cases to analyze (the same as on the slides) 1. 2. 3. 4. No indexes for Product. [2 pts] Index on Model only. [2 pts] Index on (Maker,Type) only. [2 pts] Index on Model and index on (Maker,Type). [2 pts] Exercise 2 (2 pts) Count the costs of operations and find an optimal selection of indexes for the Product table (Hardware Database) under the following assumptions: Operations Query Q1 (20%): SELECT * FROM Product WHERE maker-X AND type-Y query Q2 (10%): SELECT * FROM Product WHERE model-Z Insertion 1 (70%): INSERT INTO Product VALUES (A,B,C) Assumption about data (the same as on the slides) Data for the Product table is stored in 10 blocks. . The Model attribute is a key for Product. On the average, a maker produces 3 models of each type Records are spread uniformly over the 10 blocks: On the average, 3 records with the same maker are stored in 3 blocks. Any index for Product is stored in 1 block. Four cases to analyze (the same as on the slides) 1. 2. 3. 4. No indexes for Product. [2 pts] Index on Model only. [2 pts] Index on (Maker,Type) only. [2 pts] Index on Model and index on (Maker,Type). [2 pts]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started