Write the sql statements to create the database structures

Assignment Help Database Management System
Reference no: EM131214953

ITECH 1006 - 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 - 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 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 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 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 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: EM131214953

Questions Cloud

Write a program to plot the cdf of a rician random variable : Use the MATLAB function marcumq to write a program to plot the CDF of a Rician random variable. - Your program should take as inputs the two parameters a and σ of the Rician random variable.
How effective think viagra will for improving james sex life : What part of this dilemma should a counselor point out is Yelena's responsibility to acknowledge and address? Additionally, what special issues regarding her perimenopause will need to be addressed?
Characters into corresponding numerical values : Does the hexadecimal representation show you simple method for converting individual numeric characters into corresponding numerical values?
Examine the costs of production for your firm : Examine the costs of production for your firm. Describe the market structure for this firm and analyze how this affects the firm's ability to influence the market.
Write the sql statements to create the database structures : ITECH 1006 - Database Management Systems Assignment. 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 ..
Why determining abnormal behavior disorder so difficult : To develop your essay, keep in mind issues such as the role of social norms in defining the abnormal, the multiplicity of indicators of what is abnormal, the stigma suffered by those identified as abnormal, and finally the need for objectivity in ..
Controversies associated with changing diagnostic criteria : What are three controversies discussed in the Halter, Rolin-Kenny, &Dzurec (2013) article? Give your opinions about these controversies. From your point view, are these legitimate concerns?
Example of a network protocol : File and printer sharing for microsoft's network is an example of a network protocol?
How can you work to avoid such things in counseling others : What have you found to be most useful to you (from others) in your own times of pain? In what ways might counseling emulate those things that have benefited you personally?

Reviews

len1214953

9/21/2016 3:56:38 AM

This is a DBMS assignment, please go through the below attached file to know the content of this assignment as it is required to follow many criteria. Please note that you need to include the student ID in many require fields while doing this assignment. Please make sure the assignments are good and accurate, I want above 15 out of 20 please. In the Presentation Cover page indicating student name and number and tutor name. Page numbers included in report, Index giving page numbers of various sections and Overall presentation of the report and Full APA referencing of all materials used and full disclosure of assistance from all sources including tutors and other students.

Write a Review

Database Management System Questions & Answers

  What is estimation of the potential business

Which products and what brands are most frequently purchased by customers in recentmonth? How many vendorssupply these products?

  What type of databases and database servers myspace use

What kind of databases and database servers does MySpace use? Why is database technology so important for a business such as MySpace?

  Database design implementation

Database design implementation Project Description The project report must contain the the points given below to comlete the assignment Table of contents

  A county wishes to create a database

A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..

  Calculate the total cost for each event

Find all maincourses that have not been served at wedding receptions. List out the description - Calculate the total cost for each event - Find all maincourses that have not been served at wedding receptions. List out the description.

  Create a conceptual model of a database

create a conceptual database model using MS Visio Database Model Diagram Template. The purpose of this lab is to have you gain experience with the various modeling tools needed to create a conceptual model of a database

  Perform data mining steps on the given dataset

You will perform data mining steps (data preprocesing, classification) on this dataset and write your results in a project report in the form of a IEEE conference paper.

  Ray henry is considering expanding the inventory at his

ray henry is considering expanding the inventory at his book stores to include movies. he has some special ideas for

  Erp software and service industryoriginally the sap erp

erp software and service industryoriginally the sap erp software was developed for and implemented by mostly

  Define basic entity relationship diagram colleges

E-R diagram - Basic Entity Relationship Diagram Colleges and universities must draw a clear connection between the requirements of the field for which the student is being prepared and the things required of the student as part of that preparation pr..

  Build an uml model in microsoft visio

Neatness of your diagram, please use the concepts of model, package, and sub-system well in the Visio model. Create both your diagrams under the static model from the model explorer in Visio.

  Describe how you created the conceptual and process

Describe how you created the conceptual and process view for all four (4) diagrams. In the description, be sure to provide a justification for each key decision in the design.

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