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
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