List all details of all the records in the customer table

Assignment Help Database Management System
Reference no: EM131207003

Database Management Systems Assignment-

Overview-

For this assignment you will implement and query a database from a supplied ER Diagram and Schema.  You will be required to write the SQL statements to create the database structures, to fill the database with data and to run queries on the data.

Learning Outcomes Assessed - The following course learning outcomes are assessed by completing this assessment:

  • design and implement a relational database using a database management system
  • utilise a query language tools and techniques to obtain data and information from a database
  • describe relational algebra and its relationship to Structured Query Language (SQL)
  • interpret entity-relationship diagrams to implement a relational database
  • demonstrate skills in designing and building a database application using a commercially available database management system development tool
  • use a query language for data manipulation

Assessment Details-

FHTS Incorporated has provided you with a standard solution for the conceptual data model (the ER diagram).  You have been commissioned to continue your role (in your capacity as a Database Management System consultant) and to write the SQL statements to create the database and its tables, add data, and to provide SQL solutions to some of their everyday queries.  The database should be created based on the ER diagram provided at the end of this document.  Some sample data are also provided to be used for inserting data into tables.  However, you are also required to insert sufficient data to test the reports given below.

To implement the database-

1. Translate the ER diagram provided into a relational schema using the correct notations and standards for this course. It should include:

a. Table names

b. Attribute names and field types (as required by XAMPP)

c. Primary and foreign keys identified

2. Create a text file called nnnnnnnn-create.sql (where nnnnnnnn is your student number). The file should include:

a. The SQL statements to create a database called FHTS nnnnnnnn (where nnnnnnnn is your student ID - e.g. FHTS30011111)

b. The SQL statements to create the tables, including their primary keys, foreign keys and the relationships of the tables.

3. Create a text file called nnnnnnnn_insert.sql (where nnnnnnnn is your student number).  The file should include:

a. The SQL statements to load sufficient data into each table you have created to test the queries given below.  Sample data has been provided, but you will need to include further data to test the requirements.  You should add at least one record to the existing test data for each table.

b. You are required to include your name as one of the customers,(you can provide fake address details), but you MUST have your name and give your student id as the phone number.

4. Create a text file called nnnnnnnn_query.sql (where nnnnnnnn is your student number).  The file should include the SQL statements necessary to display the following reports:

a. List all details of all the records in the customer table, sorted by their Last name in descending order.

b. List all the customers by their first name and last name in one column,(ensuring a space between the names), with an appropriate title, followed by their phone number and then followed by the name and phone number of the company they work for. Sort this list by the company name in ascending order.

c. List the first name, last name and email address of all customers who are either/or both VIP or Frequent Flyers.(hint, check the fields with "yes" or "no"), Also list the CustVIP and CustFreqFlyer fields, changing their titles to "VIP" and "Frequent Flyer" respectively.

d. List all of the VIP customers, with their first name and last name joined in the title, as "VIP Customer", followed by their years as a customer, and the money they have spent as a customer of FHTS. Hint, look at the sub type.

e. List all frequent flyer customers who have made a booking, giving their first and last names, the number of frequent flyer points they have, followed by their frequent flyer rate points, then followed by a column that gives their frequent flyerdiscount.i.e for each frequent flyer customer on a booking perform the multiplication between their frequent flyer points and their respective frequent flyer rate per points, which is found in the FREQ_FLYER_DISCOUNT table. (This query will entail a number of joins). Also give the last column an appropriate name. Don't worry about duplicates found from the query, this is due to multiple bookings.

f. List the staff Id, first name and last name of all staff members who are supervisors, also including the ID and last name of each staff member who reports to them.

g. Delete the customer Tim Canterbury.

h. Change customer Rachael Bernard name to Rachael Jones.

i. List all bookings that have flights to the United States. Include the Booking ID, Customer ID, Flight ID, Flight Number, booking date and flight booking date,in the output. (Can you see any errors in the data for the bookings?)

j. List all the bookings that don't contain flights to the United States. This time just list the Booking ID and Customer ID. Use the previous query as a sub-query here.

k. Insert a new flight for Air France with the flight number "AF513". It will depart from the Melbourne airport with a destination to London Heathrow airport. Its departure date is set for 29th September 2016 and its arrival is set for the next day, 30th September 2016. It has a large flight capacity 520 passengers. The fixed flight fee will be $180. The distance is approximately 16,927 km.

l. List all accommodation details for sites connected to locations with airports that have the last word "International" in its name.

Attachment:- Database Assignment.rar

Reference no: EM131207003

Questions Cloud

Find the rms values of the following sinusoidal waveforms : Find the rms values of the following sinusoidal waveforms:
Leaders of the organization behaves ethically : If the CEO and other top leaders of the organization behaves ethically, then so does the entire organization (and if they behave unethically so too). Support your conclusions using appropriate professional sources.
What are dr vajis ethical alternatives for resolving dilemma : What are Dr. Vaji's ethical alternatives for resolving this dilemma? Which alternative best reflects the Ethics Code aspirational principle and enforceable standard, as well as legal standards and obligations to stakeholders?
Relative to the staff assigned to the engagement : Discuss the necessary preparation and planning for the Lily Company annual audit before beginning fieldwork at the client's office. In your discussion, include the sources you should consult, the type of information you should seek, the preliminary p..
List all details of all the records in the customer table : ITECH 1006 - Database Management Systems Assignment. Create a text file called nnnnnnnn_query.sql (where nnnnnnnn is your student number).  The file should include the SQL statements necessary to display the following reports: List all details of a..
Paragraphs using a book or professional source : In THREE paragraphs using a book or professional source citation answer the following question: In what ways (be specific) has the international global business environment affected the way that American organizations behave?
Estimate standard deviation and variance in annual returns : The following table lists the stock prices for Microsoft from 1989 to 1998. The company did not pay any dividends during the period.  Estimate the average annual return you would have made on your investment. Estimate the standard deviation and varia..
Medical malpractice negligence case : In a medical malpractice negligence case, what types of information might be discoverable but not admissible?
What relevant testimony the witness can provide : Choose the role of Prosecutor of Defense Attorney. You are charged with preparing two witnesses. You must chronicle what is needed to determine what relevant testimony the witness can provide.

Reviews

len1207003

9/15/2016 2:56:52 AM

Your documentation should include: a title page clearly stating your name and student ID and your tutor’s name. A copy of the relational schema you have developed from the ER diagram provided. A copy of the three files you are required to create included in the document (iennnnnnnn_create.sql, nnnnnnnn_insert.sql and nnnnnnnn_query.sql) and Full APA referencing of any resources you have used to complete your submission. You should submit the following: The documentation file described above EITHER as a MS word file or a PDF. If you are using a mac, please submit in a PDF so I can be sure of opening it.

Write a Review

Database Management System Questions & Answers

  Explain the life cycle of an information systems

Imagine that you run a photography printing store. Your employees have been using punch cards for time entry since you started the business.

  Determine the names of all tracks from table

All primary keys are underlined. All foreign keys have same name as primary key that they are referencing. Determine the names of all Tracks which are more than 10 minutes (600,000 ms) long.

  Craete the database to be fault tolerant

Explain the thought process of DBA as they craete the database to be fault tolerant. What policies would you suggest to get this goal?

  Describe the data structure that will store all data element

Provide an Entity Relationship Model (ERM) that will describe the data structure that will store all data elements. Note: The graphically depicted solution is not included in the required page length.

  Imagine that you have been assigned as a project manager to

imagine that you have been assigned as a project manager to manage your companys e-commerce website where customers can

  The packing list describes the ideal contents

The packing list describes the ideal contents of each package, but it is not always possible to include the ideal number of each item. Therefore, the actual items included in each package should be tracked. A package can contain many different ite..

  Under which conditions would each type of loop be more

there are 3 kinds of loops-for loop while loop and do while loop. under which circumstances would each kind of loop be

  What do you find most interesting in the failure stories

What generalizations apply across the cases? ?What do you find most interesting in the failure stories? ?Do they provide any insights about how a failure might be avoided

  How to perform document classification using tools in weka

How to perform document classification using tools in WEKA

  Illustrate concurrency control method by two phase locking

For each table argue whether or not interference with another transaction is possible. Illustrate concurrency control method using two phase locking.

  Explain turing and von neumann models

Write a 2 page research paper (excluding the title page) on the Turing and von Neumann models. Compare and contrast each and discuss which model is better and why.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

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