Improve efficiency in query evaluation, Database Management System

Assignment Help:

Question:

AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations:

PASSENGER(p_no, p_name, p_address, p_phone)
FLIGHT(flight_code, airline_name, from_airport, to_airport, depart_time, arrive_time)
BOOKING(booking_no, p_no, invoice_total, payment_made)
FLIGHT_BOOKING(booking_no, flight_code, flight_date, price)

The following assumptions are made:

  • The flight code is unique, which includes information on an airline and its flight number, for example „BA300?
  • For each flight code, there is only one associated flight on any particular day
  • A passenger may purchase tickets for several different flights under one booking number
  • However, a passenger may not purchase more than one ticket for the same flight under the same booking number
  • The PASSENGER relation contains 2000 records
  • The FLIGHT relation contains 500 records
  • The BOOKING relation contains 5000 records
  • The FLIGHT-BOOKING relation contains 10000 records
  • Each flight has a maximum of 200 bookable tickets (seats)

(a) Query optimization in database system aims to improve efficiency in query evaluation. One of the stages involved in the query optimization is to convert some internal form of the query representation into its equivalent but more efficient canonical form using the transformation rules.

Demonstrate, by using two query examples based on the given relations, how appropriate transformation rules can be applied to carry out such a conversion.

(b) Consider the following query based on the above relations and formulate it using correct SQL syntax:

"Find the names and numbers of all passenger who have booked the Air Mauritius flight MK356 for 2nd December 2010".

(c) Specify two possible options to evaluate the query in (b)above. Express each of these options firstly in relational algebra and secondly in a query tree. Clearly show all the steps required in the evaluation of the query.

(d) For each option identified above, calculate the size (number of records) for each of the immediate relations to be produced at each steps. Recommend the best option based on the results of your calculations.


Related Discussions:- Improve efficiency in query evaluation

What are advantages of using an index and disadvantages, What are the advan...

What are the advantages of by using an index and what are its disadvantages ? In difference, if the search key of a secondary index is not a candidate key, it is not sufficient

Increased overheads on update-data replication, Increased overheads on upda...

Increased overheads on update : On the drawbacks side, it will need the system to ensure that all replicas of a relation are consistent. This shows that all the replicas of the rel

Hashing.., various techniques of hashing?

various techniques of hashing?

Relational database implementation, You must implement the entity relations...

You must implement the entity relationship model provided in the model solution to Assignment 1. The model solution will be released on the course website approximately TWO (2) we

Database Management System, Assume that you are responsible for selecting a...

Assume that you are responsible for selecting a new DBMS product for Sohar Hospital

Write short notes on schema diagram, Write short notes on Schema diagram.  ...

Write short notes on Schema diagram.  A database schema along with primary key and foreign key dependencies can be depicted pictorially by schema  diagram. Every relation appea

HIT, Meaningful use refers to the use of certified EHR technology to "enhan...

Meaningful use refers to the use of certified EHR technology to "enhance quality, efficiency, and reduce health disparities

Define catalog and meta data, Define Catalog and meta data ? A catalog ...

Define Catalog and meta data ? A catalog is a compilation of records elaborating the contents of a particular collection or group of collections. Metadata (Meta data, or someti

Define single valued and multivalued attributes, Define single valued and m...

Define single valued and multivalued attributes.  Single valued attributes: attributes with a single value for a particular entity are known as single valued attributes.   M

Determine the three views of data, Determine the Three Views of Data We...

Determine the Three Views of Data We know that the similar thing, if viewed from dissimilar angles produces difference sights. Similarly, the database that we have formed alrea

Write Your Message!

Captcha
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