Write required sql statements query the database

Assignment Help Database Management System
Reference no: EM13844523

Aims

• To analyse and comprehend a given ER diagram and Database schema

• To implement a database based on the given ER diagram and Database scheme

• To write required SQL statements query the database

• Write SQL statements to manipulate the data in the database

Learning Objectives

In the process of this assessment task you will:

• plan, schedule and execute project tasks with a view to improving your personal productivity;

• gain awareness of the typical challenges related to the practical implementation of databases;

• learn how to used Data Definition statements to implement a database from a given ER diagram and the corresponding Database schema

• learn how to use Data Manipulation statements to query a database, and insert and update data in the tables

Assignment Specification

Commonwealth Transport Services (CTS) now require a partial implementation of the design made in Assignment 1. In order to keep consistency  between the assignments, database specification containing the ER diagram and the corresponding schema are provided in this document. You   should create your database according to this documentation. Make sure that your implementation is consistent with this design, i. e., your table   names, field names, and data types are according to the specifications provided in this document. The implementation phase includes writing SQL statements to create a database and its tables, populating the tables with appropriate test data, and writing a number of queries to create reports that can be used by the management team. You need to insert at least five records in each of the tables and ensure that each of the query returns at least one record.

Implementation of the Database and Manipulation of the Data

You are required to perform the followings tasks:

1. Create a text file named Create_<StudentID>.sql (for example, Create_3087654.sql) that will contain SQL statements to:

I. Create a database named CTSDB<StudentID>

II. Create all of the tables for the database according to the Database schema given at the end of this document

2. Create a text file named Insert_<StudentID>.sql that will contain SQL statements to:

I. Insert at least five records in each of the tables. The test data inserted into the table must ensure that each of the queries, specified in Task 3, outputs at least one record

3. Create a text file named Query_<StudentId>.sql that will contain all the queries to display the following

I. A list of available Vehicles sorted according to seating capacity. Display the Model, Registration number, and the Seating capacity.

II. A list of Official sorted according to their First name followed by Last name. Display their country name as well as the languages they speak.

III. List the drivers who speak French. Display their First name and Last name.

IV. List the drivers having first aid training. Display their First name, Last name, First aid level, and the Date the training was completed

V. List the drivers having special security training. Display their First name, Last name, First aid level, the Date the training was completed, and the Name of the certifying body.

VI. Find the vehicles which went for repair and/or maintenance in March 2015. Show their Registration number, Model, and the date of maintenance group by maintenance type.

VII. Find the total cost incurred for maintenance and repair. Display type of maintenance and the total cost.

Assignment 2

School of Engineering and Information Technology

ITECH1006/5006: Database Management Systems

VIII. Find the vehicles whose repair cost was more than the average repair cost.

IX. Find the locations whose street name starts with ‘B'.

X. List the names of the drivers who has Security clearance level above T and who speak English. Display their First name, Last name, and the Security clearance level.

4. Create a text file named Transaction_<StudentId>.sql that will perform the followings. Make appropriate assumption if needed.

I. An Official named Daniel Ortega from UK, having OfficialID AUS997, wants to make a
booking. He speaks English and he will play role of a ‘Judge' in the games. He wants to travel from 10 Elizabeth St, Brisbane to 117 Kings Road, Gold Coast on April 9, 2015. His expected start time is 10:00 am and end time is 1:15 pm.

II. The above trip was performed using the vehicle having VIN number SANFDAE11U1286116. The starting odometer reading for the vehicle was 26982 KM. The trip started at 10:15 and ended at 1:30 pm. At the end of the trip the odometer reading was 27190 KM. The driver for the trip was John Arnold having Driver licence number 098674432. John Arnold, although has a First Aid training (level D), completed on August 17, 2013, he does not have a special security clearance. John Arnold also speaks English.

 


Attachmen:- 1283054_1_dbms2.pdf

Reference no: EM13844523

Questions Cloud

Determine the true status of jennifer portion of the project : Using earned value measurements along with the other information and metrics available, determine the true status of Jennifer's portion of the project
What amount should captain cook report as a liability : Captain Cook sold 6 million boxes of Granola and 900,000 of the coupons were redeemed. What amount should Captain Cook report as a liability for coupons on its December 31, 2013, balance sheet?
Explain the concept of opportunity cost : As a student, you are currently, paying $5,000 in tuition annually. You work and decide you want to devote more time to your studies to increase your grade point average (GPA); therefore, you give up your job earning $25,000 annually. Explain the ..
Show an unearned revenue account for the gift cards : Peterson views the probability of redemption of a gift card as remote if the card has not been redeemed within two months. At 12/31/2013, Peterson would show an unearned revenue account for the gift cards with a balance of:
Write required sql statements query the database : To analyse and comprehend a given ER diagram and Database schema.  To implement a database based on the given ER diagram and Database scheme. To write required SQL statements query the database
Should report interest payable at december : In connection with this note, Universal Travel Inc. should report interest payable at December 31, 2013, in the amount of?
Determine hikers effective interest rate on the loan : On September 1, 2013, Hiker Shoes issued a $100,000, 8-month, noninterest-bearing note. The loan was made by Second Commercial Bank where the stated discount rate is 9%. Hiker's effective interest rate on this loan (rounded) is?
What is the half life of beryllium-11 : Create a table in a blank Excel file to show that amount you have each day of the month with each option. Fill in appropriate formulas for each column and extend the table for all 31 days
Bonds with semi-annual coupon frequency : Consider the following three bonds with semi-annual coupon frequency and $1000 face value.

Reviews

Write a Review

Database Management System Questions & Answers

  Using join sort results alphabetically by customer name

Using Join, list the items each customer ordered where the billing_price was lower than the item price (item, billing_price, and price). Sort the results alphabetically by customer name.

  Define the minimum and maximum cardinality

Don't worry about going through the normalization process at this point. Identify the appropriate relationships among the entities, and define the minimum and maximum cardinality of each relationship. Make some additional assumptions about the bus..

  Write a paper on data gathering instruments

Write a paper on Data Gathering Instruments. Submit at least one of the data gathering instruments you have selected or at least one of the instruments you have constructed along with an explanation.

  Simple mobile database-replication and mobile database strat

For this assignment, you will create a simple mobile database application using any mobile database of your choice consisting of one or two tables. You may use the database you created in another unit or you may choose to create a new database to ..

  Sketch object-oriented model for private airport database

Sketch an object-oriented model for a small private airport database that is used to keep track of airplanes, their owners, airport employees, and pilots.

  Give an example of an update that is definitely slowed

The title of the ?rst record in the previous set, and the primary key of the ?rst record in the previous set.

  Identify the primary decisions a database administrator make

With the obvious pace of current technology development, data continues to grow daily. Imagine that you are a Database Administrator for a large organization. Identify the primary decisions a Database Administrator must make in order to manage such d..

  Database implementation and queries please tell me howmuch

please tell me howmuch it costs and please give me some discount as this is the second time i am

  What is the time required to read a ?le containing 100000

What is the time required to read a ?le containing 100,000 records of 100 bytes each in a random order? To read a record, the block containing the record has to be fetched from disk. Assume that each block request incurs the average seek time and rot..

  Draw the e/r diagrams for the business rules

Draw the E/R diagrams for the business rules

  Objectives of file management principle

What are the requirements to ensure the objectives of file management principle is realized?

  Integrity constraint prevent-data inserted in table

Integrity constraint prevent from happening when data is inserted in table which contains this constraint? Let INSERT, UPDATE, and DELETE actions on both child and the parent.

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