Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You work at the Amtrak HQ in Washington DC, and have been tasked to design a database for train schedules. Trains can run on various

You work at the Amtrak HQ in Washington DC, and have been tasked to design a database for train schedules. Trains can run on various tracks as the infrastructure between stations, and a daily schedule is needed to handle operations.

A Train is either a (D)iesel, (E)lectric, or (L)ocomotive, with consist specifying the number of cars. Each train configuration also has a name (for instance the Palmetto Limited, the City of New Orleans, the Sunshine Special etc.), date of last service, and whether in/active service. Trains run on tracks, which are an (acquired) infrastructure between stations, so each track specifies a departing station and arriving station. Tracks include a distance, and whether the track is in/active service. Only one train can be active on a track.

Stations have address information, and are always open and can service any number of trains. Amtrak's daily train Schedule lists the trains scheduled to run on tracks, with date, departure time, arrival time, and ticket price.

Create an amtrak.sql script to implement this railroad.

1. (10 pts) Create an AMTRAK user, with necessary privileges.

2. (32 pts) Code the TYPEs and DDL for AMTRAK user's data (eg. four tables).

3. Create an amtrak package with functions/procedures to: (28 pts) load at least five stations, seven tracks, five trains, and seven scheduled departures; and (20 pts) display report of your Amtrak RR schedule. For at most (20 pts) extra credit, simulate an interactive Amtrak RR transaction.

4. (10 pts) Use a PL/SQL block similar to the following to test.
declare
begin
amtrak.loadRR(); -- only once!
amtrak.showRR();
end;
/

ALL USING SQL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

=+What is the VIF for Age?

Answered: 1 week ago

Question

1. What is the definition of quality?

Answered: 1 week ago

Question

3. Name and describe the eight dimensions to quality.

Answered: 1 week ago