Information Technology  >  STUDY GUIDE  >  The Ch08 Construct Co database stores data (All)

The Ch08 Construct Co database stores data

Document Content and Description Below

The Ch08_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 cont ... ents of the Ch08_ConstructCo database are shown in Figure P8.1. Use this database to answer the following problems. Problem 1 Write the SQL code that will create only the table structure for a table named EMP_1. This table will be a subset of the EMPLOYEE table. The basic EMP_1 table structure is summarized in the following table. Use EMP_NUM as the primary key. Note that the JOB_CODE is the FK to JOB so be certain to enforce referential integrity. Your code should also prevent null entries in EMP_LNAME and EMP_FNAME. CREATE TABLE EMP_1( EMP_NUM VARCHAR(3) PRIMARY KEY, EMP_LNAME VARCHAR(15) NOT NULL, EMP_FNAME VARCHAR(15) NOT NULL, EMP_INITIAL VARCHAR(1), EMP_HIREDATE DATE, JOB_CODE VARCHAR(3), FOREIGN KEY (JOB_CODE) REFERENCES JOB(JOB_CODE)); Problem 2 Having created the table structure in Problem 1, write the SQL code to enter the first two rows for the table shown in Figure P8.2. Each row should be inserted individually, without using a subquery. Insert the rows in the order that they are listed in the figure. INSERT INTO EMP_1 VALUES('101','News','John','G','2000-11-08','502'); INSERT INTO EMP_1 VALUES('102','Senior','David','H','1989-07-12','501'); Problem 4 Write the SQL code that will save the changes made to the EMP_1 table (if supported by your DBMS). INSERT INTO EMP_1 SELECT EMP_NUM,EMP_LNAME,EMP_FNAME,EMP_INITIAL,EMP_HIREDATE,jOB_CODE FROM EMPLOYEE WHERE EMP_NUM BETWEEN 103 AND 109; [Show More]

Last updated: 3 years ago

Preview 1 out of 4 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of The Ch08 Construct Co database stores data document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$7.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

118
0

Document information


Connected school, study & course


About the document


Uploaded On

Aug 25, 2022

Number of pages

4

Written in

All

Seller


Profile illustration for CourseWorks,Inc
CourseWorks,Inc

Member since 3 years

9 Documents Sold

Reviews Received
2
0
0
0
0
Additional information

This document has been written for:

Uploaded

Aug 25, 2022

Downloads

 0

Views

 118

Document Keyword Tags

More From CourseWorks,Inc

View all CourseWorks,Inc's documents »

Recommended For You

Get more on STUDY GUIDE »

$7.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·