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

  Create an entity-relationship diagram and design

create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices

  Database planner should spend a considerable amount of time

Provide what reports may be produced as a result of your database design.Based on the information you have researched, create a 2-3 page design document that includes a description of the database you would like to create as well as sample tables ..

  Consider the following database that contains information

consider the following database that contains information about people vacation locations and when those people visited

  Show the count of the class after deleting

Will insert any first name, last name, ID, GPA, and phone number, in the proper location in the list sorted alphabetically by last name.  After insertion, you should show the count of the class.  Then print the list after you insert.

  Find name and membership number of members

Find the name and membership number of members who have borrowed more than five different books of that publisher.

  To write required sql statements to query the database

You may need to rerun the schema, especially when you have been experimenting with your solutions and may have corrupted the database unintentionally. If you suspect that there might be such problems, rerun the schema.

  Stack and queue data structure

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

  Traditional file systems and modern database environment

Write down the difference between traditional file systems Vs modern database environment. Describe the following: Physical data independence Vs logical data independence

  Convert er diagram into relational schema

Suppose we are to design a registrar's database to store information about students, courses, the courses students have taken. Convert the E/R diagram into a relational schema.

  What is meant by data independence

What is meant by data independence? Explain your answer and identify two benefits of separating application software from the database management system.

  Need a system that networks its 3 campuses in the us and

need a system that networks its 3 campuses in the us and one campus in singapore. transaction data for all campuses

  1 not having an appropriate index can cause a full table

1. not having an appropriate index can cause a full table scan while performing the select statement by using a

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