Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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:
- A1.design and implement a relational database using a database management system
- A2.utilise a query language tools and techniques to obtain data and information from a database
- K5.describe relational algebra and its relationship to Structured Query Language (SQL)
- S1.interpret entity-relationship diagrams to implement a relational database
- S2.demonstrate skills in designing and building a database application using a commercially available database management system development tool
- S3.use a query language for data manipulation

Assessment Details

FHTSIncorporated 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 (wherennnnnnnn is your student number). The file should include:

a. The SQL statements to create a database called FHTSnnnnnnnn (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 requiredto 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 bytheir 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 customerswho 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 givestheir frequent flyerdiscount.i.e for each frequent flyer customer on a booking perform the multiplication between theirfrequent flyer points and their respectivefrequent flyer rate perpoints,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 staffId, 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, FlightID, 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 bookingsthat 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.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91977936
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question? 


Related Questions in DBMS

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

Select from e d pwhere edeptddept and dcitypcity and

Select * From E, D, P WHERE E.dept=D.dept AND D.city=P.city AND D.budget>1M AND P.priority=A; Assuming relations have the same size and uniform distributions, what is the best plan with Nested Loop joins only? Write it a ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

Q1 given the following file for assignment workercom

Q1. Given the following file for assignment worker.com, identify data anomalies that must be removed before data can be loaded in data warehouse. Worker_assignment ← -----------------on course web site File is available ...

In sql database questions phase-1 in 100 words what steps

In SQL Database Questions: Phase-1 In 100 words, what steps can one take to avoid losing work? Which command is used to save changes to the database? What is the syntax for this command? Phase-2 In 100 words, explain the ...

Question create the physical data model for the logical

Question: Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL. Your submission should include all DDL needed to: Create the tab ...

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

Project outline and requirements provide a brief

Project Outline and Requirements Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size, location(s), and other pertinent ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As