Assignment 3: Inserts and Updates

Description

Having created the database and inserted some basic data, we will now use a pre-made SQL script to populate the rest of the data into the database. Then we will update a few records.

To Do

The Insert script

Open the AptManagerInsers.sql and load it into the query analyser. Make sure your current database is AptManager and run the script.

If you have made any mistakes in the structure of your database, and if you have not fully completed assignment 2, the inserts will throw errors. Trouble shoot and correct the errors until you successfully load all the data.

Updates

Update

Change the lastname of the tenant Tom Johnson to "Johnston"

Change the first name of Larry Carrols to "Lawrence"

For the maintanence task "Electrical" add the description "basic wiring of outlets and switches. All else outsourced"

For the maintanence task "Waterdamage" add the description "note the cause and extent of the damage

To turn in

Turn in the code

Trouble shooting tips

The inserts into tables that have an int for a primary key assume that it is an identity. The inserts will fail if the key is not an identity

Inserts into the Maintence detail table, and some other tables assume nulls. If you made the field required it will case errors