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

  Analysis of the sales numbers to management

Create a graph or chart that compares the data in a meaningful way, i.e. compare regions by month, compare products by month, etc. Create a spreadsheet formatted to present your analysis of the sales numbers to management.

  Concept of non-deterministic finalization

From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important? What interesting things ..

  Create the database that contains each of the relations

Find all Governors General of Australia who were Barons at the time of their appointment. List them by Title and name and date that they were appointed to the position. Order the list by ascending date of appointment.

  Kudler fine foods it security report and presentation

Learning Team Instructions- Draft the security considerations for each phase of the systems development process.

  Putsp command to output the string

Using the LC-3 Assembler, how would you store user keyboard input into an array, two characters per 16 bit address, so as to utilize the PUTSP command to output the string?

  Design a data warehouse for chemist warehouse

Design a data warehouse for Chemist Warehouse using multidimensional Modelling - What particular product is most popular across nation, what is the total sales in past 3 years?

  Determine the relationship between those areas

For this question, need data mining analysis (using k-means clustering algorithm) shows the relationship between poverty area and violent crime rate (homicide) depending on any one of the datasets attached with this assignment.

  Limitations of the relational model

Identify and describe three limitations of the relational model and recommend strategies to overcome these limitations.

  When would creating an index reduce overall database perform

Indexing can affect the performance of a general-purpose database that has roughly equal numbers of fetches and changes. The decision to add an index can improve the performance of a system but can also degrade it.

  Which logical operator has the lowest precedence

What decision structure is logically equivalent to the following? What logic operator could be used to replace the nested selection structure in....? Which logical operator has the lowest precedence

  Find database management system selection

Identify and describe three criteria that should be used to evaluate the selection of a database management system.

  Describe the six default referential integrity actions.

How are N:M relationships implemented?

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