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

  Analyse the credit approval data set

Analyse the  Credit Approval  data set - A data set description in terms of the attributes present in the data, the number of instances,missing values, and other relevant characteristics.

  Identify five different it systems that have affected

identify five different it systems that have affected business in the past few years i.e. business software

  What is the total i/o cost for sorting this file

How many sorted subfiles will there be after the initial pass of the sort, and how long will each subfile be?

  Find out the benefits of data mining to the businesses when

the development of complex algorithms that can mine mounds of data that have been collected from people and digital

  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.

  Discuss the serious data redundancy problems

Identify and discuss the serious data redundancy problems exhibited by the file structure shown in Figure and looking at the EMP_NAME and EMP_PHONE contents in Figure, what change(s) would you recommend?

  Virtual private databasesearching web specially oracle and

virtual private databasesearching web specially oracle and microsoft websites and via talking with any database

  Explain relational database and metadata

Which is not a factor to consider in software evaluation and explain relational database and Metadata - Build an entity relationship model

  How much overhead cost would be assigned to product

How much overhead cost would be assigned to Product U94W using the activity-based costing system - How much overhead cost would be assigned to Product K91B using the activity-based costing system

  What amount would the company have to charge

what amount would the company have to charge for the Ericson wedding cake to just break even - what would be the overall margin on the order?

  Ideal choice for relational database design

The Entity-Relationship Diagram is widely used in the design of relational databases. Why do you think this is so - what is it about this model that makes it the ideal choice for relational database design?

  Data modeling and normalization

Data Modeling and Normalization

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