The Car Maintenance team wanted to ensure that the default price of the maintenance actions should not
Question:
The Car Maintenance team wanted to ensure that the default price of the maintenance actions should not be empty and 0 instead if not specified. Alter the MAINTENANCE_TYPES table created in Chapter 8, Activity 1 to set the default MAINTENANCE_PRICE to 0.
Set the default price value of the MAINTENANCE_TYPES table.
1
Task 2:
The Driver Relationship team wants to ensure that the all driving license IDs in the active drivers table have the length of 7. Alter the ACTIVE_DRIVERS table created in Chapter 8, Activity 1 to check the length of the DRIVER_DRIVING_LICENSE_ID.
Add a CHECK to the ACTIVE_DRIVERS table to enforce a driver license length of 7.
Task 3:
The Car Maintenance team wants to insert and store the following maintenance types to the MAINTENANCE_TYPES table:
- ID: 1; Description: Tire Change; Price: 50
- ID: 2; Description; Oil Change; Price: 45
- ID: 3; Description; Full Cleaning; Price: 100
- ID: 4; Description; Gas Pump Change; Price: 145
Add the four maintenance types to the MAINTENANCE_TYPES table.
1
Task 4:
The Car Maintenance team wants to add new maintenance tasks into the system. The team has determined that there should be Tire Change (ID: 1) task for every car with the model year 2018 in InstantRide. Due date of this maintenance tasks is 31 December, 2020. Insert the rows into the MAINTENANCES table for every car built in 2018 and send the data back to the team.
Create tire maintenance tasks for each car with a model year of 2018.
Task 5:
The Driver Relationship team realized that there is no need for DRIVER_DRIVING_LICENSE_CHECKED field in the active drivers table. Since all the drivers are already active in InstantRide, their driving licenses should be checked regularly. The team wanted you to remove the field from the table.
Task
Remove the DRIVER_DRIVING_LICENSE_CHECKED field from the ACTIVE_DRIVERS table.
1
Task 6:
The Car Maintenance team wants to update the price of Oil Change to 75. In addition, they will no longer provide or require a Gas Pump Change in the future and there is no need to keep the maintenance item in the database. Update the cost of the oil change and remove the gas pump change option from the MAINTENANCE_TYPES table.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill