Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

1. What do you mean by the term query processing? What are its objectives?

2. What are the typical phases of query processing? With a neat sketch discuss these phases in high-level query processing.

3. Discuss the reasons for converting SQL queries into relational algebra queries before query optimization is done.

4. What is syntax analyser? Explain with an example.

5. What is the objective of query decomposer? What are the typical phases of query decomposition? Describe these phases with a neat sketch.

6. What is a query execution plan?

7. What is query optimization? Why is it needed?

8. With a detailed block diagram, explain the function of query optimization.

9. What is meant by the term heuristic optimization? Discuss the main heuristics that are applied during query optimization to improve the processing of query.

10. Explain how heuristic query optimization is performed with an example.

11. How does a query tree represent a relational algebra expression?

12. Write and justify an efficient relational algebra expression that is equivalent to the following given query:

SELECT

B1.BANK-NAME

FROM

BANK1 AS B1, BANK2 AS B2

WHERE

B1.ASSETS > B2.ASSETS AND
B2.BANK-LOCATION = 'Jamshedpur'

13. What is query tree? What is meant by an execution of a query tree? Explain with an example.

14. What is relational algebra query tree?

15. What is the objective of query normalization. What are its equivalence rules?

16. What is the purpose of syntax analyser? Explain with an example.

17. What is the objective of a query simplifier? What are the idempotence rules used by query simplifier? Give an example to explain the concept.

18. What are query transformation rules?

19. Discuss the rules for transformation of query trees and identify when each rule should be applied during optimization.

20. Discuss the main cost components for a cost function that is used to estimate query execution cost.

21. What cost components are used most often as the basis for cost functions?

22. List the cost functions for the SELECT and JOIN operations.

23. What are the cost functions of the SELECT operation for a linear search and a binary search?

24. Consider the relations R(A, B, C), S(C, D, E) and T(E, F), with primary keys A, C and E, respectively. Assume that R has 2000 tuples, S has 3000 tuples, and T has 1000 tuples. Estimate the size of R ? S ? T and give an efficient strategy for computing the join.

25. What is meant by semantic query optimization?

26. What are heuristic optimization algorithms? Discuss various steps in heuristic optimization algorithm.

27. What is a query evaluation plan? What are its advantages and disadvantages?

28. Discuss the different types of query evaluation trees with the help of a neat sketch.

29. What is materialization?

30. What is pipelining? What are its advantages?

31. Let us consider the following relations (tables) that form part of a database of a relational DBMS:

HOTEL

(HOTEL-NO, HOTEL-NAME, CITY)

ROOM

(ROOM-NO, HOTEL-NO, TYPE, PRICE)

BOOKING

(HOTEL-NO, GUEST-NO, DATE-FROM, DATE-TO, ROOM-NO)

GUEST

(GUEST-NO, GUEST-NAME, GUEST-ADDRESS)

Using the above HOTEL schema, determine whether the following queries are semantically correct:

SELECT

R.TYPE, R.PRICE

FROM

ROOM AS R, HOTEL AS H

WHERE

R.HOTEL-NUM = H.HOTEL-NUM AND
H.HOTEL-NAME = 'Taj Residency' AND
R.TYPE > 100;


SELECT

G.GUEST-NO, G.GUEST-NAME

FROM

GUEST AS G, BOOKING AS B, HOTEL AS H

WHERE

R.HOTEL-NO = B.HOTEL-NO AND
H.HOTEL-NAME = 'Taj Residency';


SELECT

R.ROOM-NO, H.HOTEL-NO

FROM

ROOM AS R, HOTEL AS H, BOOKING AS H

WHERE

H.HOTEL-NO = B.HOTEL-NO AND
H.HOTEL-NO = 'H40' AND
B.ROOM-NO = R.ROOM-NO AND
R.TYPE > 'S' AND B.HOTEL-NO = 'H50';

32. Using the hotel schema of exercise 31, draw a relational algebra tree for each of the following queries. Use the heuristic rules to transform the queries into a more efficient form.

SELECT

R.ROOM-NO, R.TYPE, R.PRICE

FROM

ROOM AS R, HOTEL AS H, BOOKING AS H

WHERE

R.ROOM-NO = B.ROOM-NO AND
B.HOTEL-NO = H.HOTEL-NO AND
H.HOTEL-NAME = 'Taj Residency' AND
R.PRICE > 1000;


SELECT

G.GUEST-NO, G.GUEST-NAME

FROM

GUEST AS G, BOOKING AS B, HOTEL AS H, ROOM AS R

WHERE

H.HOTEL-NO = B.HOTEL-NO AND
G.GUEST-NO = B.GUEST-NO AND
H.HOTEL-NO = R.HOTEL-NO AND
H.HOTEL-NAME = 'TajResidnecy' AND
B.DATE-FROM >= '1-Jan-05' AND
B.DATE-TO <= '31-Dec-05';

33. Using the hotel schema of exercise 31, let us consider the following assumptions:

• There is a hash index with no overflow on the primary key attributes ROOM-NO, HOTEL-NO in the relation ROOM.
• There is a clustering index on the foreign key attribute HOTEL-NO in the relation ROOM.
• There is B+-tree index on the PRICE attribute in the relation ROOM.
• There is a secondary index on the attribute type in the relation ROOM.

Let us also assume that the schema has the following statistics stored in the system catalogue:

nTuples(ROOM) = 10,000
nTuples(HOTEL) = 50
nTuples(BOOKING) = 100000
nDistinctHOTEL-NO (ROOM) = 50
nDistinctTYPE (ROOM) = 10
nDistinctPRICE (ROOM) = 500
minPRICE (ROOM) = 200
maxPRICE (ROOM) = 50
nLevelsHOTEL-NO (I) = 2
nLevelPRICE (I) = 2
nLfBlocksPRICE(I) = 50
bFactor(ROOM) = 200
bFactor(HOTEL) = 40
bFactor(BOOKING) = 60

a. Calculate the cardinality and minimum cost for each of the following Selection operations:

Selection 1: σROOM-NO = 1 ∧HOTEL-NO = ‘H040' (ROOM)
Selection 2: σTYPE-‘D' (ROOM)
Selection 3: σHOME-NO = ‘H050' (ROOM)
Selection 4: σPRICE>100' (ROOM)
Selection 5: σTYPE = ‘S' ∧ HOTEL-NO = ‘H060' (ROOM)
Selection 6: σTYPE = ‘S' v PRICE < 100' (ROOM)
 
b. Calculate the cardinality and minimum cost for each of the following Join operations:

Selection 1: HOTEL?HOTEL-NO ROOM
Selection 2: HOTEL?HOTEL-NO BOOKING
Selection 3: ROOM?ROOM-NO BOOKING
Selection 4: ROOM?HOTEL-NO HOTEL
Selection 5: BOOKING?HOTEL-NO HOTEL
Selection 6: BOOKING?ROOM-NO ROOM.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91376481
  • Price:- $80

Guranteed 48 Hours Delivery, In Price:- $80

Have any Question?


Related Questions in DBMS

Question we can sort a given set of n numbers by first

Question : We can sort a given set of n numbers by first building a binary search tree containing these numbers (using TREE-INSERT repeatedly to insert the numbers one by one) and then printing the numbers by an inorder ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Question team project submission - submit to the unit 4

Question: Team Project Submission - Submit to the Unit 4 Group Project Area This version of the capstone project assignment is FOR GRADING this week. Submit to the group area the document containing completed Sections On ...

Instructionsfor decades relational databases remained

Instructions For decades, relational databases remained essentially unchanged; data was segmented into specific chunks for columns, slots, and repositories, also called structured data. However, in this Internet of Thing ...

Tableau is business intelligence software that helps people

Tableau is business intelligence software that helps people see and understand their data. Fast Analytics Connect and visualize your data in minutes. Tableau is 10 to 100x faster than existing solutions. Ease of Use Anyo ...

Assignmentqueries functions and triggersdatabase

Assignment Queries, Functions and Triggers Database Systems Aims The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL qu ...

Your taskyou have been commissioned to develop a database

Your task You have been commissioned to develop a database system that is capable of keeping records for FU's table tennis matches from now on. The database needs to keep a record of: - All team information, including pl ...

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As