Produce a set of relations

Assignment Help Database Management System
Reference no: EM13687755

Part -1:

Prepare the following:

a) An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.

b) A list of relations (equivalent to Finkelstein entity list). Produce complete relations for all entities and attributes. Show all primary and foreign keys. Include all attributes that are specifically mentioned and all key attributes. You may need to create primary and foreign keys that are not specifically mentioned. You must use the Finkelstein methodology as per the study book and tutorials.

c) A SQL CREATE TABLE statement for the ITEM relation along with the creation of primary and foreign key constraints as required.

Part -2:

Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation for a flight reservation system. You must use the Finkelstein methodology as used in the study book and tutorials.

FLIGHT (departure airport code, departure airport name, departure time, departure date, arrival airport code, arrival airport name, arrival time, arrival date,  aircraft name, manufacture date, first class seats, business class seats, economy class seats, ((flight crew member, date joined, hours worked, crew member position, ((crew member role)) )), (( booking number, booking type, booking date, ((passenger surname, passenger first name, passenger dob, passenger contact number, seat number, special requests)), ticket price, booking fee))

Notes:

  1. Name of an aircraft can uniquely identify any aircraft.
  2. The number of seats in the economy, business and first class can be different for each aircraft.
  3. Each flight has a service of several crew members. Each crew member has one position but can have multiple roles such as cabin service and supervisor that must be recorded.
  4. The number of hours that each crew member worked in a particular flight regardless of their role is stored in the "hours worked" attribute.
  5. A departure airport for one flight can be an arrival airport for another flight and vice versa. Hence, it is important to uniquely identify an airport.
  6. A particular booking can be of two types: direct or through agent.
  7. Ticket price can be different for every flight under different bookings.
  8. Seat number and special requests by a passenger are associated with the corresponding flight and booking reference along with the passenger.

Part -3:

For each question, four marks will be awarded for the query and one mark for the screen capture of the results obtained after executing the query. Please copy the screenshot and paste it in your assignment solution document for every question.

The following E-R diagram represents a Car Hire database.

1383_ER diagram for the system.png

In this question, you will use the CAR HIRE database. The CAR HIRE database including appropriate data will be made available on the USQ Oracle server. You may query any of these tables but may not make changes.

Write SQL queries to solve the following specifications. Provide the queries and the output.

1. Display full details of all car bookings where (a) the odometer reading of cars is greater than 30,000 miles at the start of their rental and the reservation was done by a staff called REDMOND, OR (b) the car has not been returned and the car model name ends with 'TR'. Order the output by the date on which the booking was made, showing the most recent date first.

2. Using a set operator, find out all names of the customers that have not had any bookings.

3. Display the booking number, rental rate per day, rental period and the current status of the car for all car bookings. Filter your results to show only the records where the car is on hire and the rental rate per day is greater than $35.

4. Display the car registration number and the average miles travelled in all booking by each car where the average miles travelled is less than 1,000 miles and registration number begins with H.

5. Display the total rental income to date from the least expensive car available for rental. Format the output as a currency value (i.e. formatted as $9,999.99).

6. Display the car registration, rental cost, mileage of the car when it was last serviced and current mileage of the car for all completed bookings where the car is rented more than 30 months after it was bought.

7. Display booking number, date on which the booking was made and the cost of the rental for all the bookings made in the year 2012 and the car is already returned. Also include the name and full description of the corresponding model of the car used in the rental.

8. Display the customer number and the average rental income from that customer from all bookings where the average rental income is greater than the highest rental income in all bookings reserved by a staff named REDMOND. Exclude all bookings where the rental period is less than 10 days.

Reference no: EM13687755

Questions Cloud

Find how many lines per centimeter does the grating have : The light shining on a diffraction grating has a wavelength of 495 nm (in vacuum). How many lines per centimeter does the grating have
Find the force on the particle : A particle with charge -1.00 C initially moves at v = 1.00i +7.00j m/s. If it encounters a magnetic field B = 60.0 k T, find the force on the particle
Give three advantages of sampling over a census : Give three advantages of sampling over a census
What is the rate with which the current is changing : A 2.0-cm-diameter solenoid is wrapped with 1000 turns per meter. 0.60cm from the axis, What is the rate dI/dt with which the current through the solenoid is changing
Produce a set of relations : An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials.
How fast is it moving vertically when it hits the ground : If a car , moving at 15 m/s , drives over a 30m cliff. How fast is it moving vertically when it hits the ground
What is the terminal velocity of the bar : Two resistance less rails rest 22cm apart on a 5.0?ramp. They are joined at the bottom by a 0.75 ohm resistor. What is the terminal (steady) velocity of the bar as it slides frictionless down the rails
How fast will the car be moving at the end : Consider a car weighing 1500 kg containing three people weighing a total of 240kg. How fast will the car be moving at the end of 50 m
What is the angle between the transmission axes : Unpolarized light is passes through two polarizers in succession. The output intensity is 12.5% of the input intensity. What is the angle between the transmission axes of the 2 polarizer's

Reviews

Write a Review

Database Management System Questions & Answers

  Draw the e/r diagrams for the business rules

Draw the E/R diagrams for the business rules

  To what extent should end users be involved in the

q1. to what extent should end users be involved in the selection of a database management system and database

  Draw the er diagram using industral-style notations

Each department is described by a name, department code, office number, office phone, and college. Both name and code have unique values for each department.

  List the price of the item called back scratcher

List the first and last names of any customers who have bought all of the items. (This does not need to be as part of a single purchase).

  The instructor reserves the right to use the resources of

the instructor reserves the right to use the resources of turnitin.com to check for plagiarism in your writing

  Various kinds of keys to form or define relationships

Relational database is based on fact that data in one table can be tied, or related to data in another table. To do this, database utilizes various types of keys to form or define these relationships.

  Q1 explain what a relational database is and explain why

you are the trainer for a major technology firm. one of the problems your firm has is hiring new technologists who have

  1kate and leopold are thinking about-buying the rockwood

1.kate and leopold are thinking about-buying the rockwood motellocated on interstate 70. before they make up their mind

  Selecting opies of book titled the big magic

How many copies of the book titled „The big magic? are owned by the local library whose name is "Newtown" library?

  Justification for utalizing database management system

What is the justification for utalizing database management system approach

  Relations of airline flight information

The relations given below keep track of airline flight information:Flights(flno: integer, from: string, to: string, distance:integer, departs: time, arrives: time, price: real)Aircraft(aid: integer, aflame: string, cruisingrange: integer)

  What is the goal of computer forensics

From your knowledge and experience how are computer forensic investigators, in today's world of complex technology, are able to retrieve and analyze data that can be used in computer forensic investigations.

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