Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem: The Ch07_ConstructCo database stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each employee
Problem: The Ch07_ConstructCo database stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each employee works on each project. The structure and contents of the Ch07_ConstructCo database are shown in Figure P7.1. Figure P7.1 Structure and contents of the Ch07_ConstructCo database Relational Diagram Database name: Ch07 ConstructCo Table name: EMPLOYEE TE Avbough June 01-Dec-96 503 15 Now87 50 01-Feb-93 502 2Jun-04 500 0-Oet-93 500 Smithield Wliam ashngton Ralph 501 110 11-Dec-95 505 04 Ape 91 50 3-Oet-94 50 Smithson Joenbrood Darlene Delbert Table name: JOB 20-Aug 93 508 25Jan-92 501 05-Mar 9 510 9-Jun-96 509 04 Jan-05 510 115 Bawangi Travis Systems Analyst Dstabase Designer Electrical Engineer Mechanical Engineer Oivl Engineer Clerical Support DSS Analyst 5.75 675 125.00 4.50 67 90 55 78 20-Nov-15 20-Noy-15 24 Mar-16 20-Nov-15 20-Nov-15Table name: ASSIGNMENT 502 TE 00322Mar-16 18 4 55 69 10 Genera Support 18.36 21285 100 22Mar-16 22 007 22-Mar-16 25 100822Mar-16 18 96 75 4 50 4 55 Table name: PROJECT 1002350 00 103 2110346 00 108 500345 20 102 2309880 00 107 8 500500 00 805000 00 2650500 00 01023Mar-16 15 Roling Tide 01223-Mar-16 18 4 50 51545 3.8 31 29 01723-Mar-16 18 01823M-16 25 019 24 Mar-16 25 03024Mar-16 15 34 55 125.00 102224Mar-16 22 278 85 024 24 -Mar-16 15 102524Mar-1618 4.55 Note that the ASSIGNMENT table in Figure P7.1 stores the JOB_CHG_HOUR values as an attribute (ASSIGN CHG_HR) to maintain historical accuracy of the data. The OB_CHG_HOUR values are likely to change over time. In fact, a JOB_CHG_HOUR change will be reflected in the ASSIGNMENT table. And, naturally, the employee primary job assignment might change, so the ASSIGN JOB is also stored. Because those attributes are required to maintain the historical accuracy of the data, they are not redundant. Given the structure and contents of the Ch07_ConstructCo database shown in Figure P7., use SQL commands to answer Problems 1-10. Type SQL commands and also save snapshot of created tables into a file named ???Assign4.doc. 1. (2 points) Write the SQL code that will create the table structure of JOB table (Determine the data type, define PK)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started