Question: SECTION D - Answer TWO questions from this section. Question 8 (13 points) What is the minimum cost calculated as the number of row reads


SECTION D - Answer TWO questions from this section. Question 8 (13 points) What is the minimum cost calculated as the number of row reads for the following query? The cost should be based on the operation costs for a join (of two tables), a select (of rows) and a project (of columns). The query uses the tables defined in Section A (i.e. Car, Employee, TravelCost). Assume all rows are not stored sequentially and there are no column has an index. SELECT employeeld, regno, distance SinceService FROM Car, TravelCost WHERE regno - carRegno AND distance Since Service > 1000; Assume 500 cars and 10,000 travel costs, a car registration number (regNo) appears on average 10 times in table TravelCost, and 20 cars have distanceSinceService > 1,000 (13 marks) Car regNo distance Since Service kmPerLitre FF06DDS 122 10 EEO7SSA 110 8 FGOZBAK 165 7 HHOSBBWO 12 Employee id name 1 Smith 2 Patel 6 Bennett 7 Booch TravelCost journeyId carRegno employeeID occurred distanceInkm 4 FF06DDS 1 11-JUL-07 11/08/2003 6 FGOZBAK 2 11 EE07SSA 6 21-JUL-07 11/08/2003 21-JUL-07 11/08/2003 05-SEP- 14/08/2003 07 12 FF06DDS 1 21 FGOBAK 7 05-SEP- 07 14/08/2003 SECTION D - Answer TWO questions from this section. Question 8 (13 points) What is the minimum cost calculated as the number of row reads for the following query? The cost should be based on the operation costs for a join (of two tables), a select (of rows) and a project (of columns). The query uses the tables defined in Section A (ie. Car, Emplovee, TravelCost). Assume all rows are not stored sequentially and there are no column has an index, SELECT employeelb, regNo, distanceSinceService FROM Car, TravelCost WHERE regno - carRegno AND distance SinceService > 1000 Assume 500 cars and 10,000 travel costs, a car registration number (reglyo) appears on average 10 times in table TravelCost, and 20 cars have distanceSince Service > 1,000 (13 marks) SECTION D - Answer TWO questions from this section. Question 8 (13 points) What is the minimum cost calculated as the number of row reads for the following query? The cost should be based on the operation costs for a join (of two tables), a select (of rows) and a project (of columns). The query uses the tables defined in Section A (i.e. Car, Employee, TravelCost). Assume all rows are not stored sequentially and there are no column has an index. SELECT employeeld, regno, distance SinceService FROM Car, TravelCost WHERE regno - carRegno AND distance Since Service > 1000; Assume 500 cars and 10,000 travel costs, a car registration number (regNo) appears on average 10 times in table TravelCost, and 20 cars have distanceSinceService > 1,000 (13 marks) Car regNo distance Since Service kmPerLitre FF06DDS 122 10 EEO7SSA 110 8 FGOZBAK 165 7 HHOSBBWO 12 Employee id name 1 Smith 2 Patel 6 Bennett 7 Booch TravelCost journeyId carRegno employeeID occurred distanceInkm 4 FF06DDS 1 11-JUL-07 11/08/2003 6 FGOZBAK 2 11 EE07SSA 6 21-JUL-07 11/08/2003 21-JUL-07 11/08/2003 05-SEP- 14/08/2003 07 12 FF06DDS 1 21 FGOBAK 7 05-SEP- 07 14/08/2003 SECTION D - Answer TWO questions from this section. Question 8 (13 points) What is the minimum cost calculated as the number of row reads for the following query? The cost should be based on the operation costs for a join (of two tables), a select (of rows) and a project (of columns). The query uses the tables defined in Section A (ie. Car, Emplovee, TravelCost). Assume all rows are not stored sequentially and there are no column has an index, SELECT employeelb, regNo, distanceSinceService FROM Car, TravelCost WHERE regno - carRegno AND distance SinceService > 1000 Assume 500 cars and 10,000 travel costs, a car registration number (reglyo) appears on average 10 times in table TravelCost, and 20 cars have distanceSince Service > 1,000 (13 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
