Question: Create the following tables. The underlined bold column names are the primary keys. Make sure to specify the primary and foreign key constraints in your
Create the following tables. The underlined bold column names are the primary keys. Make sure to specify the primary and foreign key constraints in your create table statements.
customer: (cus_code:integer, cus_lname:varchar(20), cus_fname:varchar(20), cus_initial:char, cus_areacode:integer,cus_phone:integer).
invoice: (inv_number:integer, cus_code:integer, inv_date:date,
foreign key cus_code references customer(cus_code))
line: (inv_number:integer, prod_code:integer ,line_units:integer,
foreign key (inv_number) references Invoice(inv_number),
foreign key (prod_code) references Product (prod_code) )
product:(prod_code:integer, prod_desc:varchar(50), prod_price:integer, prod_quant:integer,vend_code:integer,
foreign key (vend_code) referenecs Vendor(vend_code))
vendor:(vend_code:integer,vend_name:varchar(30),vend_contact:varchar(30),vend_areacode:integer,vend_phone:integer)
Step by Step Solution
There are 3 Steps involved in it
To create the tables as specified you need to ensure that the primary keys and foreign keys are prop... View full answer
Get step-by-step solutions from verified subject matter experts
