What kind of a design would you try in this case

Assignment Help Database Management System
Reference no: EM13509238

(1).For each of the following queries, identify one possible reason why an optimizer might not ?nd a good plan. Rewrite the query so that a good plan is likely to be found. Any available indexes or known constraints are listed before each query; assume that the relation schemas are consistent with the attributes referred to in the query.

1. An index is available on the age attribute:

SELECT E.dno

FROM Employee E

WHERE E.age=20 OR E.age=10

2. A B+ tree index is available on the age attribute:

SELECT E.dno

FROM Employee E

WHERE E.age<20 AND E.age>10

3. An index is available on the age attribute:

SELECT E.dno

FROM Employee E WHERE 2*E.age<20

4. No index is available:

SELECT DISTINCT * FROM Employee E

5. No index is available:

SELECT AVG (E.sal) FROM Employee E GROUP BY E.dno HAVING E.dno=22

6. The sid in Reserves is a foreign key that refers to Sailors:

SELECT S.sid

FROM Sailors S, Reserves R WHERE S.sid=R.sid

(2).Consider the following BCNF relations, which describe employees and the departments they work in:

Emp (eid, sal, did)

Dept (did, location, budget)

You are told that the following queries are extremely important:

Find the location where a user-speci?ed employee works.

Check whether the budget of a department is greater than the salary of each employee in that department.

1. Describe the physical design you would choose for this relation. That is, what kind of a ?le structure would you choose for these relations, and what indexes would you create?

2. Suppose that your customers subsequently complain that performance is still not satisfactory (given the indexes and ?le organization that you chose for the rela-tions in response to the previous question). Since you cannot a?ord to buy new hardware or software, you have to consider a schema redesign. Explain how you would try to obtain better performance by describing the schema for the rela-tion(s) that you would use and your choice of ?le organizations and indexes on these relations.

3. Suppose that your database system has very ine?cient implementations of index structures. What kind of a design would you try in this case?

Reference no: EM13509238

Questions Cloud

How would your answers to the two questions change : How would your answers to the two questions change, if at all, if your system did not support indexes with multiple-attribute search keys?
What will be the total manufacturing cost for this line : Presley Products Inc. is a manufacturer of limited edition dolls. They use operations costing to measure and track the costs incurred for specific product lines.
Determine how fast is it moving just before it lands : A solid, uniform ball rolls without slipping up a hill, as shown in the figure . At the top of the hill, it is moving horizontally; then it goes over the vertical cliff. How fast is it moving just before it lands
How many units would have to be sold each month : How many units would have to be sold each month to earn a target profit of $30,000? Use the formula method.
What kind of a design would you try in this case : Suppose that your database system has very ine?cient implementations of index structures. What kind of a design would you try in this case?
How long does it take to stop after the power is turned off : When the power is turned off on a turntable spinning at 78.0 rpm , you find that it takes 10.5 revolutions for it to stop while slowing down at a uniform rate. How long does it take to stop after the power is turned off
Prepare journal entries to record the admission of carmen : Prepare journal entries to record the admission of Carmen for a 40 percent interest in the capital and rights to future profits under the following independent assumptions.
How much work is done by the torque : A constant retarding torque of 15 m·N stops a rolling wheel of diameter 0.50 m in a distance of 21 m. How much work is done by the torque
Compute the acceleration of the center of mass of cylinder : A uniform 1.0 kg cylinder of radius 0.10 m is suspended by two strings wrapped around it. What is the acceleration of the center of mass of the cylinder

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd