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 is serialization and where it is used, What is serialization? Where it...

What is serialization? Where it is used and why?  Serialization is a basic term used for mechanisms which enable objects and object structures to be converted into portable for

What is rdbms, What is RDBMS? Relational Data Base Management Systems (...

What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be formed and

Normalization, a project based on normalization with first, second and thir...

a project based on normalization with first, second and third normalization. There need to be a diagram also

#cursor, #what is cursor its uses ? Explain it

#what is cursor its uses ? Explain it

Explain the functions trim-length-count in oracle, Explain the following fu...

Explain the following functions of Oracle with suitable examples: (i) To_Char( ) (ii) Count( ) (iii) Trim( ) (iv) Length( ) Ans: (i) To_char( ): The TO_CHAR function conver

Describe the statement in sql which allows to change, Describe the statemen...

Describe the statement in SQL which allows to change the definition of a table? In SQL Alter statement is used to allow the changes the definition of a table.

Transactions t1 and t2 are in a deadlock, Evaluate: a.When transactions...

Evaluate: a.When transactions T1 and T2 are in a deadlock, one of the transactions will eventually implement to completion and let the other one continue implementation. b.

Storage of database on hard disks, Storage Of Database On Hard Disks At...

Storage Of Database On Hard Disks At this point, it is worthwhile to note the difference among the terms file Organisation and the access method. A file organisation shows to t

Define the terms entity, Define the terms entity, attribute, role and relat...

Define the terms entity, attribute, role and relationship between the entities, giving examples for each of them.         Ans: Entity:   An entity is a "thing" or "object" in th

Enhanced entity relationship, what do you understand by enhanced entity-rel...

what do you understand by enhanced entity-relationship

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