Question
Need help building a table for each of the charts into SQL including comments. Just using SQL Express as a database hw PROBLEMS (short name)
Need help building a table for each of the charts into SQL including comments. Just using SQL Express as a database hw
PROBLEMS (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK | Code | NUMBER(2) | Integers 1-7 | Problem code |
| Description | VARCHAR(20) | NOT NULL | Short description of the problem |
SERVICES (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK | Code | CHAR(4) | PSEG, WTR, OEM, DPR, CSH | Code for service organization |
| Name | VARCHAR(30) | NOT NULL | Name of service organization to handle problem |
CALL_INFO (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK | Call_ID | NUMBER(4) | 4 digit number |
|
| Report_First | CHAR(12) |
| First name of person calling to report the problem |
| Report_last | CHAR(12) | NOT NULL | Last name of person calling to report the problem |
| Report_Date | DATE | NOT NULL | Date of call |
| Report_Time | DATE | NOT NULL | Time of call |
FK | Problem_Code | NUMBER(1) | NOT NULL | References Code in PROBLEMS |
FK | Service_Code | VARCHAR(4) |
| References Code in SERVICES |
PROBLEM_STATUS (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK/FK | Call_ID | NUMBER(4) |
| References Call_ID in CALL_INFO |
PK | Update_Date | DATE |
| Date update code is entered |
PK | Update_Time | TIME |
| Time update code is entered |
FK | Status | VARCHAR(4) | NOT NULL | References Code in CALL_STATUS |
FK | Sign-Off_ID | VARCHAR(2) | NOT NULL | References ID in PERSONNEL |
PERSONNEL (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK | ID | CHAR(2) |
| Employee code for responder handling problem |
| First_Name | VARCHAR(5) |
| First name of responder |
| Last_Name | VARCHAT(8) | NOT NULL | Last name of responder |
CALL_STATUS (short name) |
|
| ||
Key Type | Column Name | Data Type | Constraints | Comments |
PK | Code | CHAR(4) | RIP, INV, CMP |
|
| Description | VARCHAR(30) | NOT NULL | Explanation of status code |
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