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

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  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

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of 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