Using the ConstructCo database, you will modify the four tables with primary key and foreign key...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
Answer SQL code Add a primary key constraint to the EmployeeID column ... View the full answer
Related Book For
Using Microsoft Excel and Access 2016 for Accounting
ISBN: 978-1337109048
5th edition
Authors: Glenn Owen
Posted Date:
Students also viewed these databases questions
-
Dave's Deli puts 1/4 pound of turkey in each turkey sandwich. How many sandwiches can be made from 16 pounds of turkey?
-
Create data types for attributes. Remember that your COURSE_ID should be alphanumeric or VARCHAR (not numeric). You must use primary and foreign keys in your Data Definition Language (DDL) to create...
-
Create an imaginary business around your business theme. Your scenario should satisfy the following conditions: a. Include at least one one-to-one binary relationships. b. Include at least one...
-
After examining all the potential projects, you discover that there are many more projects this year with positive NPVs than in a normal year. What two problems might this extra large capital budget...
-
Find in the network shown using PSPICE 4KA 12V
-
Macee Department Store has three departments, and it conducts advertising campaigns that benefit all departments. Advertising costs are $100,000 this year, and departmental sales for this year...
-
What is the critical speed map good for?
-
Mike purchases a heavy-duty truck (5-year class recovery property) for his delivery service on April 30, 2014. The truck is not considered a passenger automobile for purposes of the listed property...
-
A passenger is on an airplane that is traveling 30 south of due west at 130m/s with respect to the air. The air is moving with a speed of36.0m/s with respect to the ground duenorth. Macmillan...
-
The probability that a student receives an A in a course is 0.1. The probability that a student studies less than 30 hours per week is 0.503. The probability that a student studies less than 30 hours...
-
A project is going to cost $2.5 million for an initial investment in a machine. The machine will depreciate straight line to zero within the five-year project life with no salvage value. It is...
-
The torque applied to a door is 5.75 gcm and a force of 4.6 g is applied by a child. The distance from the knob to the axis of the door is?
-
What is the amount of any available - for - sale investment securities reported in the balance sheet? c . Is there an amount you can't find in the balance sheet but that you know must be there? 2 . a...
-
Gentex Unlimited, a new company, completed these transactions. 1. Stockholders invested $48,000 cash and inventory with a fair value of $33,000. 2. Sales on account, $24,000. What will Gentex's total...
-
A uniform electric field of magnitude 0 . 6 \ times 1 0 4 N / C is at an angle of 6 0 \ deg to a square sheet with sides 2 . 0 m long. What is the electric flux through the sheet? ( 2 0 7 8 4 . 6 N m...
-
How many electrons make up a charge of -50.0 C ? Express your answer using three significant figures.
-
12. Calculate: (i) Trade Payable Turnover Ratio (ii) Average Payment Period Annual Purchases Opening trade payable Closing trade payable 2010 25,840 3,040 2,680 2011 28,500 2,800 4,200
-
MgO prevents premature evaporation of Al in a furnace by maintaining the aluminum as Al2O3. Another type of matrix modifier prevents loss of signal from the atom X that readily forms the molecular...
-
Kellys Boutique, located in Pewaukee, Wisconsin, sells a unique combination of books and womens shoes. Customers love to peruse her book inventory while trying on the latest in shoe fashions, often...
-
What information is provided in the operating cash receipts portion of the cash budget?
-
In Chapter 9, you created a database for Roseys Roses consisting of a Product table, a Type table, and a Grower table. You also created an initial query, form, and report. You have now been asked to...
-
December 2007. When she joined, she signed a membership agreement that had a release of liability that stated: 24 Hour. will not be liable for any injury, including, without limitation, personal,...
-
Recall the facts in Leonard v. Pepsico Had this been a contract, would it have been subject to the Statute of Frauds?
-
John J. Williams began working at Delaware Elevator as a branch sales manager in late 2004. The company manufactures components for elevators and installs and repairs elevators. It employs 175 people...
Study smarter with the SolutionInn App