0% found this document useful (0 votes)
98 views3 pages

CIS-182 Homework #3 - Editing Data: Name

This document provides instructions for a homework assignment involving inserting, updating, and deleting records in multiple database tables using SQL statements. Students are asked to insert initial records into Operators, Vehicles, Runs, Schedule, and Trips tables; update the destination in certain records in the Trips table and the model year in the Vehicles table; delete a specific trip record; and delete an operator record while maintaining referential integrity. Screenshots must be provided showing the successful execution of each SQL statement.

Uploaded by

rriness
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views3 pages

CIS-182 Homework #3 - Editing Data: Name

This document provides instructions for a homework assignment involving inserting, updating, and deleting records in multiple database tables using SQL statements. Students are asked to insert initial records into Operators, Vehicles, Runs, Schedule, and Trips tables; update the destination in certain records in the Trips table and the model year in the Vehicles table; delete a specific trip record; and delete an operator record while maintaining referential integrity. Screenshots must be provided showing the successful execution of each SQL statement.

Uploaded by

rriness
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name:___________________________

CIS-182
Homework #3 – Editing Data
Turn in this sheet, printed copies of your SQL statements, and screen shots showing the
successful completion of each statement.
1. Use insert statements to add the following records to each table. You'll need to find the
identity value created for new records in tables on the one-side of relationships (for
example, Operator ID #1 in the entries for Runs refers to the first operator in the list,
not a particular identity value). (8 points)

Operators

Seniority First Name Last Name Hire Date


1 David Letterman 1/1/01
2 Tony Bennet 1/10/01
3 Shirley Temple 2/15/02
4 John Adams 6/15/02
5 Tanya Tucker 8/19/03
6 Peter Parker 5/5/04

Vehicles

Manufacturer Model Year Purchase Date


Gillig 40 foot 1998 3/20/98
Gillig 40 foot 1998 3/20/98
Gillig 40 foot 1998 3/20/98
Gillig 40 foot 1998 3/20/98
Gillig Phantom 1992 11/15/02
Gillig Phantom 1992 11/15/02

Runs

Operator ID Bid Date


1 9/1/04
2 9/1/04
3 9/1/04
4 9/1/04
5 9/1/04
1 1/1/05
2 1/1/05

3/26/10
CIS-182 Homework #3
Page 2

3 1/1/05
4 1/1/05
5 1/1/05
6 1/1/05

Schedule

Run ID Vehicle ID
1 6
2 5
3 2
4 3
5 4
6 1
7 2
8 3
9 4
10 5
11 6

Trips

Schedule Route Starts At Start Time Ends At End Time Effective


1 15 Olympia 8:00 AM L&I 8:52 AM 9/1/04
1 15 L&I 9:00 AM Olympia 9:49 AM 9/1/04
2 15 Olympia 8:30 AM L&I 9:22 AM 9/1/04
2 15 L&I 9:30 AM Olympia 10:29 AM 9/1/04
3 94 Lacey 7:00 AM Yelm 8:11 AM 9/1/04
4 94 Lacey 8:00 AM Yelm 9:11 AM 9/1/04
3 94 Yelm 8:15 AM Lacey 9:26 AM 9/1/04
4 94 Yelm 9:15 AM Lacey 10:26 AM 9/1/04
5 44 Olympia 7:30 AM Capital Mall 8:19 AM 9/1/04
6 44 Olympia 8:00 AM Capital Mall 8:49 AM 9/1/04
5 44 Capital Mall 8:30 AM Olympia 9:21 AM 9/1/04
6 44 Capital Mall 9:00 AM Capital Mall 9:51 AM 9/1/04
1 15 Olympia 8:00 AM L&I 8:52 AM 1/1/05
CIS-182 Homework #3
Page 3

1 15 L&I 9:00 AM Olympia 9:49 AM 1/1/05


2 15 Olympia 8:30 AM L&I 9:22 AM 1/1/05
2 15 L&I 9:30 AM Olympia 10:29 AM 1/1/05
3 94 Lacey 7:00 AM Yelm 8:11 AM 1/1/05
4 94 Lacey 8:00 AM Yelm 9:11 AM 1/1/05
3 94 Yelm 8:15 AM Lacey 9:26 AM 1/1/05
4 94 Yelm 9:15 AM Lacey 10:26 AM 1/1/05
5 44 Olympia 7:30 AM Capital Mall 8:19 AM 1/1/05
6 44 Olympia 8:00 AM Capital Mall 8:49 AM 1/1/05
5 44 Capital Mall 8:30 AM Olympia 9:21 AM 1/1/05
6 44 Capital Mall 9:00 AM Capital Mall 9:51 AM 1/1/05

After completing the above entries:


2. In the Trips table, change Capital Mall to Westfield Shopping Mall using an Update
command for all trips with an effective date after 10/1/04. (4 points)
3. Change the model year for all phantoms to 1994 using an Update command. (4 points)
4. Delete the 9/1/04 9:15am departure from Yelm using a Delete command. (4 points)
5. Delete operator 4. Don't forget referential integrity, but do not delete any trips or
vehicles. (5 points)

You might also like