Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Question. Please create an ER Diagram for the following: Create Table Employee ( empNumber CHAR (8) PRIMARY KEY NOT NULL, SSN CHAR (9) NULL,

SQL Question. Please create an ER Diagram for the following:

Create Table Employee

(

empNumber CHAR (8) PRIMARY KEY NOT NULL,

SSN CHAR (9) NULL,

firstName VARCHAR (25) NOT NULL,

lastName VARCHAR (25) NOT NULL,

address VARCHAR (50) NULL,

state CHAR (2) NULL,

zip CHAR (5) NULL,

job VARCHAR (50) NOT NULL,

CONSTRAINT checkJob CHECK (Job IN ('Cast Member', 'Engineer', 'Inspector', 'Project Manager'))

)

Create Table Project

(

projectID char(4) PRIMARY KEY NOT NULL,

projectName VARCHAR (50) NOT NULL,

fundedBudget DECIMAL(16,2) NULL,

firmFedID CHAR(9) NOT NULL,

startDate DATE NULL,

projectTypeCode CHAR(5) NOT NULL,

projectTypeDesc VARCHAR (50) NULL,

projectStatus VARCHAR(25) NULL,

CONSTRAINT checkProjStat CHECK (projectStatus IN ('Active', 'Inactive', 'Cancelled', 'On-Hold', 'Completed')),

projectEndDate DATE NULL,

projectManager CHAR(8) FOREIGN KEY REFERENCES employee(empNumber)

)

Create Table Activity

(

activityID CHAR (4) NOT NULL PRIMARY KEY,

activityName VARCHAR (50) NOT NULL,

activityTypeCode char (2) NOT NULL,

activityStatus VARCHAR (25) NULL,

CONSTRAINT checkActStat CHECK (activityStatus IN ('Active', 'Inactive', 'Cancelled', 'On-Hold', 'Completed')),

activityTypeDesc VARCHAR (50) NULL,

costToDate DECIMAL (16,2) NULL,

startDate DATE NULL,

endDate DATE NULL,

projectID char(4) FOREIGN KEY REFERENCES Project(projectID)

)

Create Table Firm

(

firmFedID char (9) NOT NULL PRIMARY KEY,

image text in transcribed

firmName varchar (50) NOT NULL,

firmAddress varchar (50) NULL

)

Create Table Job

(

projectID char (4) NOT NULL,

activityID char (4) NOT NULL,

)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

How does the Title VI Civil rights Act impact families?

Answered: 1 week ago

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago