Question: Using the ConstructCo database, you will modify the four tables with primary key and foreign key constraints. You will save your SQL code in
Using the ConstructCo database, you will modify the four tables with primary key and foreign key constraints. You will save your SQL code in a text file and submit. Write the SQL code to modify the table structure for the table named Employee using the following data dictionary. Attribute (Field) Name EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE EMP_JOB_CODE EMP YEARS EMP_PROJ_NUM Data Type and Size INT Attribute (Field) Name JOB_CODE VARCHAR(15) VARCHAR(15) VARCHAR(1) DATETIME INT INT DROP FIELD Write the SQL code to modify the table structure for the table named JOB using the following data dictionary. Data Type and Size Int JOB_DESCRIPTION JOB_CHG_HOUR Float JOB_LAST_UPDATE DATETIME VARCHAR(25) Keys Primary Foreign Keys Primary Write the SQL code to modify the table structure for the table named PROJECT using the following data dictionary. Attribute (Field) Name PROJ_NUM PROJ_NAME PROJ_VALUE PROJ_BALANCE PROJ_EMP_NUM Data Type and Size Int VARCHAR (25) Float Float Int Keys Primary Foreign Write the SQL code to modify the table structure for the table named ASSIGNMENT using the following data dictionary. Attribute (Field) Name ASSIGN_NUM ASSIGN_DATE ASSIGN_PROJ_NUM ASSIGN_EMP_NUM ASSIGN_JOB ASSIGN_CHG_HR ASSIGN HOURS ASSIGN_CHARGE EMPLOYEE Column TABLE EMPLOYEE - Solution EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE EMP_JOB_CODE EMP YEARS Type int(11) varchar(15) varchar(15) varchar(1) datetime Data Type and Size Int int(11) int(11) DATETIME Int Int Int Float Float Float Keys Primary No 0 Yes NULL Yes NULL Yes NULL Yes NULL Yes NULL Yes NULL Foreign Foreign Foreign Null Default
Step by Step Solution
3.30 Rating (150 Votes )
There are 3 Steps involved in it
Answer SQL code Add a primary key constraint to the EmployeeID column ... View full answer
Get step-by-step solutions from verified subject matter experts
