Question: Answer all questions on paper: Consider the database model below: The database model FIGURE 7.1 CUSTOMER NVOICE LINE PK CUS CODE containsPK,FK1 INV NUMBER LINE
Answer all questions on paper: Consider the database model below: The database model FIGURE 7.1 CUSTOMER NVOICE LINE PK CUS CODE containsPK,FK1 INV NUMBER LINE NUMBER + generates PKV NUMBERcotainsPKK1 NVE UNNM PK INV NUMB CUS LNAME CUS FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE FK1 CUS CODE INV DATE FK2 P_CODE LINE UNITS LINE PRICE is found in VENDOR PRODUCT PK V CODE PK P CODE P DESCRIPT P INDATE P QOH P MIN P PRICE P DISCOUNT V NAME TACT HE-Supplies-? V AREACODE V PHONE V STATE V ORDER Write the sQL code for creating the database and all the above tables. State all primary keys and foreign keys constraints. CUSTOMER: CUS CODE(Numeric), CUS-FNAME, CUS LNAME, CUS-INITIAL, AREACODE, CUS PHONE(strings), CUSR_BALANCE (numeric) VENDOR: V-CODE (integer), V_NAME, VCONTACT, V_AREACODE, V_PHONE, V_STATE, V ORDER(string) PRODUCT: P DESCRIPT (String), P_INDATE (date), P.Q0H, P MIN, P-PRICE, P.DISCOUNT(numeric), INVOICE: INV NUMBER (numeric), INV DATE (date) LINE: LINE NUMBER, LINE _UNITS, LINE PRICE (numeric), P_CODE(string)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
