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

  Describe 4 software or hardware problems which will render

discuss 4 software or hardware problems that will render two hosts unable to use the tcpip protocol to communicate.

  Find the support for itemsets by treating each transaction

Find the support for itemsets {Diapers}, {Eggs, Butter}, and {Eggs, Butter, Diapers} by treating each transaction (TID) as a market basket.

  Distinguish between packet switching and circuit switching

Distinguish between packet switching and circuit switching: Give three advantages and three disadvantages of each one.

  Characteristics of database

Describe the database and describe the four characteristics of the database? Explain the Relational Database and generate a relational database for five employees.

  Describe the data warehouse application

Describe the data warehouse application you propose to work with throughout the module. Your description should be brief and relatively formal

  Design an relational model model

Design an Relational Model (RM) model of a database (DB) that will be useful for each of the chosen enterprises and Implement the 2 enterprise relational DBs using either MySQL or SQLite

  Create a new test02 class

Write a toString method that will return a String containing all the relevant data for each of your objects.

  Use the information and build context data flow diagram

The purpose of the sales and book tracking system is to provide a single central repository of all information about sales leads, books in process, and books for sale. The Sales Department will enter new authors to the system as they gather leads ..

  Assignment- database administrator for department store

Assignment: Database Administrator for Department Store, The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maint..

  An active database in pl-sql

Did the corresponding lines for invoices 1001 and 1008 in table LINE get deleted automatically? Can you explain why?

  Planning the implementation of a database application

Discuss the importance of planning the implementation of a database application. What are some of the pitfalls of not planning for the implementation of a database application

  Develop an activity diagram for the scenario

In each task, please feel free to make any assumption necessary for the readers. The explanation of your assumptions can help the readers to understand what you have considered differently but as important criteria in producing your model.

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