Building upon your project 1, the park will be a Star Wars themed park. You must design additional parts of the database and create the following SQL Script.
You must create additional tables to hold Project and Activity Data.
IMPORTANT: For Project 2, DO NOT CREATE ANY FOREIGN KEYS FOR ANY OF THE TABLES
A project represents the construction of a facility with a limited scope of work and financial funding. A Project can be composed of many activities which indicate the different phases in the construction cycle.
Example Project Name: Bobba Fett's Bounty Chase Ride
An activity represents the work that must be done to complete the project.
Example Activity Name:
For Example activity name could be "Phase 1 Design of Bounty Chase ride" Or name could be Final construction of Bounty Chase ride Etc
You must normalize the project table to come up with a new set of tables. You will then write the create script for these tables.
Project (projectId, projectName, firmFedID, firmName, firmAddress, fundedbudget, projectStartDate, projectStatus , projectTypeCode, projectTypeDesc, projectedEndDate, projectManager, (activityId, activityName, costToDate, activityStatus, startDate,endDate) )
To normalize the tables, you must use the following function dependencies:
ProjectId,ActivityId -> projectName, firmFedID, firmName, firmAddress, fundedbudget, startDate, projectStatus, projectTypeCode, projectTypeDesc, projectedEndDate, projectManager, activityName, costToDate, activityStatus, startDate, endDate.
projectId -> projectName, firmFedID, fundedbudget, startDate, projectStatus , projectTypeCode, projectedEndDate, projectManager.
projectTypeCode -> projectTypeDesc
firmFedID -> firmName, firmAddress
When creating the tables, use the following column names and data types (important) for columns:
You will write the script to create the tables which resulted from your normalization. Each table should have a primary key defined. You should have more than one table after you normalize.
NOTE IMPORTANT!
You should end up with at least:
- a table that will hold the man project data and will have projectId and projectName, along with other related fields based on your normalization process. Please name this table, ProjectMain.
- a table that will hold the main activity data and will have activityId and activityName, along with other related fields based on your normalization process. Please name this table, ActivityMain.
After correct normalization you will end up with more tables.
You will create the SQL Scripts to create procedures to insert/ update data. The following definitions specify the parameters that can be passed in. The underlined parameters are required.
Make sure that your procedure inserts records if the required parameters do not exist, but they update records if the required parameters do exist.
For example:
If SP_AddUpdateProject: passes in projectID "AA01" and it DOESN'T exists in the project table(s) , it will insert the values passed in.
If SP_AddUpdateProject: passes in projectID "AA01" and it DOES exists in the project table(s) , it will UPDATE the values passed in for the AA01 record.
Procedures Needed:
You will create the SQL Script to create procedures to insert/ update data and process a project delay
Example:
The Falcon Coaster has a ProjectId "AA01" has a projected end date of 6/30/2017. It has 2 activities:
ActivityId: AA90 ActivityName: Build Coaster EndDate: 6/01/2017
ActivityId: AA91 ActivityName: Inspect Coster EndDate: 7/30/2017
Since Activity AA91 ends 30 days after the projected end date of the project, the project will have an additional $3,000 (30 X $100) added to the fundedbudget column's original value. Also, the projects new projected end date will be "7/30/17"
Verify Object names
Once you have completed your work and created the required objects in your database, you will need to run the Project2Verifier to assure that:
Run the Project2Verifier.sql script on the database where you created your objects. If any errors appear, you need to review them before proceeding.