Relations c, u and t are instances of relations. Their schemas are Customer(Account, Cname, Province, Cbalance,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Relations c, u and t are instances of relations. Their schemas are Customer(Account, Cname, Province, Cbalance, Crlimit) Vendor (Vno, Vname, City, Vbalance) Transaction(Tno, Vno, Account, T.Date, Amount) where e has a primary index on Account, v has a primary index on Vno, t has a secondary index on Vno. t has a secondary index on Account. The following are statistical data of the relations, which may be used in the following questions. n = 40,000, n = 5,000,000, n = 1,000,000 b = 10,000, b = 500,000, b = 200,000 dist (City) = 20 The height of the index of c on Account is 5, the height of the index of t on Vno is 6. the height of the index of t on Account is 7. One index node is stored in a block in an index file on disk. Answer the following questions: 1. The following is a user query select Tno, Amount, Province from c, t, v where t.Vno v.Vno and t.Account = c.Account and City = 'Guelph'; Using the heuristic rules, which of the following strategy should we choose as the more efficient? Which rules should we use in this case? IITno, Amount, Province (ct City='Guelph'()) (1) IITno, Amount, Province (City='Guelph' (u) tc) (2) 2. Estimate the number of disk reads required for executing strategy (1) using indexed nested loop join when possible. Also estimate the number of tuples in the result of the strategy. It is assumed that the RAM space available for running the strategy can contain all the intermediate results. Please give intermediate and final results. 3. Estimate the number of disk reads required for executing strategy (2) using indexed nested loop join when possible. Also estimate the number of tuples in the result of the strategy. It is assumed that the RAM space available for running the strategy can contain all the intermediate results. Please give intermediate and final results. 4. Compare the numbers of disk reads of the two strategies, and very briefly explain the main reason. Relations c, u and t are instances of relations. Their schemas are Customer(Account, Cname, Province, Cbalance, Crlimit) Vendor (Vno, Vname, City, Vbalance) Transaction(Tno, Vno, Account, T.Date, Amount) where e has a primary index on Account, v has a primary index on Vno, t has a secondary index on Vno. t has a secondary index on Account. The following are statistical data of the relations, which may be used in the following questions. n = 40,000, n = 5,000,000, n = 1,000,000 b = 10,000, b = 500,000, b = 200,000 dist (City) = 20 The height of the index of c on Account is 5, the height of the index of t on Vno is 6. the height of the index of t on Account is 7. One index node is stored in a block in an index file on disk. Answer the following questions: 1. The following is a user query select Tno, Amount, Province from c, t, v where t.Vno v.Vno and t.Account = c.Account and City = 'Guelph'; Using the heuristic rules, which of the following strategy should we choose as the more efficient? Which rules should we use in this case? IITno, Amount, Province (ct City='Guelph'()) (1) IITno, Amount, Province (City='Guelph' (u) tc) (2) 2. Estimate the number of disk reads required for executing strategy (1) using indexed nested loop join when possible. Also estimate the number of tuples in the result of the strategy. It is assumed that the RAM space available for running the strategy can contain all the intermediate results. Please give intermediate and final results. 3. Estimate the number of disk reads required for executing strategy (2) using indexed nested loop join when possible. Also estimate the number of tuples in the result of the strategy. It is assumed that the RAM space available for running the strategy can contain all the intermediate results. Please give intermediate and final results. 4. Compare the numbers of disk reads of the two strategies, and very briefly explain the main reason.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
On July 1, 2017, Brent purchases a new automobile for $35,500. He uses the car 86% for business and drives the car as follows: 6,000 miles in 2017, 15,000 miles in 2018, 16,800 miles in 2019, and...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Local 54 has retained James Love to represent it in a grievance against Dilated Peoples Optical Inc. The union is grieving the employers decision to exclude from the bargaining unit the position of...
-
To examine the effect of sleep deprivation on motorskills performance, a sample of n = 10 participants was tested on a motor-skills task after 24 hours of sleep deprivation, tested again after 36...
-
Vector A has x and y components of 8.70 cm and 15.0 cm, respectively; vector B has x and y components of 13.2 cm and 6.60 cm, respectively. If A B + 3C = 0, what are the components of C?
-
How helpful is it that jurisdiction of the International Court of Justice is voluntary? Does this completely undermine the credibility or usefulness of the court? What are the advantages and...
-
On January 1, Pan Corporation pays $400,000 cash and also issues 36,000 shares of $10 par common stock with a market value of $660,000 for all the outstanding common shares of Sis Corporation. In...
-
A ( n ) _ _ _ _ _ _ _ _ _ _ contains information about a given person, product, or event. Attribute Column Field Record
-
AA Manufacturing Sdn. Bhd. involves in the business of selling Comel product in Alor Setar, Kedah. Below is the information regarding the selling price and product costs per unit of Comel as well as...
-
Use a calculator to evaluate an ordinary annuity formula \[A=m\left[\frac{\left(1+\frac{r}{n}ight)^{n t}-1}{\frac{r}{n}}ight]\] for \(m, r\), and \(t\) (respectively) given in Problems 7-22. Assume...
-
Evaluate each expression in Problems 3-32. \(\left(\begin{array}{c}25 \\ 1\end{array}ight)\)
-
For each of the car loans described in Problems 51-54, give the following information. a. Amount to be paid b. Amount of interest c. Interest rate d. APR (rounded to the nearest tenth of a percent) A...
-
My favorite Moroccan restaurant offers the following menu: Cold appetizer (no choice): spicy carrots, khobiza, and zalouk Appetizer (select one): spicy chicken wings, charmoula chicken drumsticks,...
-
How many blocks would be needed to build a stack like the one shown in Figure 11.7 if the bottom row has 28 blocks? FIGURE 11.7 How many blocks?
-
The program is divided into 3 blocks that are being compiled on 1 computer. Each block takes an exponential amount of time, 5 minutes on average, independently of other blocks. The program is...
-
Huntingdon Capital Corp. is a competitor of Plazacorp and First Capital Realty. Huntingdon reported the following selected information (in millions):...
-
How are qualified dividends taxed in 2012? Please give the two rates of tax which apply to qualified dividends, and specify when each of these rates applies._________________________...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
Ken paid the following amounts for interest during 2012: Qualified interest on home mortgage...........................................$4,700 Auto loan...
-
Visit the Consumer Financial Protection Bureau Web site (www.consumerfinance.gov). Based on the public information available, describe what role the bureau plays in providing consumer education,...
-
According to the debt resolution rule, what is the time frame for repayment of short-term debt? What types of borrowing are not considered in the debt resolution rule?
-
Visit a bank, a credit union, and a retail outlet that offer credit. Ask for a copy of the contract for a consumer installment loan or purchase. Compare the contracts for an explanation of the credit...
Study smarter with the SolutionInn App