Question: Consider the database model below: The database model FIGURE 7.1 CUSTOMER INVOICE LINE PK CUS.CODErales generatesINV NUMBER CUS LNAME CUS_FNAME CUS INITIAL CUS AREACODE CUS
Consider the database model below: The database model FIGURE 7.1 CUSTOMER INVOICE LINE PK CUS.CODErales generatesINV NUMBER CUS LNAME CUS_FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE NV DATE LINE UNITS LINE PRICE is found in VENDOR PRODUCT PK P CODE V NAME VCONTACT supplies P DESCRIPT P INDATE - AREACODE V PHONE V STATE V ORDER P.MIN P PRICE P DISCOUNT FK1 V CODE Write the SQl code for creating the database and all the above tables. State all primary keys and foreign keys constraints. 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-QOH, P.MIN, P-PRICE, DiscouNT(numeric. INVOICE: INV_NUMBER (numeric), INV_DATE (date) LINE: LINE NUMBER, LINE UNITS, LINE PRICE (numeric), P_CODE(string) Write the SQL queries to retrieve the following: 1) The description, quantity on hold(P QOH), the minimum quantity and the price for each product whose price is below $10.00 2) The description, quantity on hold[P_Q0H), the minimum quantity, the price and the date for each product whose inventory date (P INDATE) is on or after January 20, 2012
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
