Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

job table jobnum-number without decimal places up to 65000 PK custid-number with

ID: 3647108 • Letter: J

Question

job table
jobnum-number without decimal places up to 65000 PK
custid-number without decimal places up to 9999 FK
jobdate-date
descr-string 2000 characters
amobilled-number with 2 decimal places up to 99999.99
amopaid-number with 2 decimal places up to 99999.99

employee table
ssn-fixed length string (no dashes) PK
elname-string 35, do not allow null values
efname-string 15, do not allow null values
ephone-string 12 aaa xxx-nnnn
hrrate- number with 2 decimal places at most $100.00, default $5.15

this is what I have so far.

create table job;
(
jobnum smallint unsigned primary key,
custid smallint foreign key,
jobdate date,
descr text,
amobilled double(9,2)
amopaid double(9,2));

create table employee;
(
ssn char(11) primary key unique,
elname varchar(35) not null,
efname varchar(15) not null,
ephone varchar(12) not null,
unique(ephone),
hrrate double(3,2)

does this look right so far? I know I am missing a few things. but not sure how to do it since i keep getting errors.

Explanation / Answer

Try this one you have put semiccolon after table name create table job( jobnum smallint unsigned primary key, custid smallint foreign key, jobdate date, descr text, amobilled double(9,2) amopaid double(9,2) ); create table employee( ssn char(11) primary key unique, elname varchar(35) not null, efname varchar(15) not null, ephone varchar(12) not null, unique(ephone), hrrate double(3,2) );