Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer all questions on paper: Consider the database model below The database model FIGURE 7.1 CUSTOMER INVOICE LINE PK CUS CODE INV NUMBER FK1 CUS_COOE
Answer all questions on paper: Consider the database model below The database model FIGURE 7.1 CUSTOMER INVOICE LINE PK CUS CODE INV NUMBER FK1 CUS_COOE NV DATE CUS LNAME CUS FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE LINE UNITS LINEPRICE - isfound in VENDOR PRODUCT V NAME supplies P INDATE P DESCRIPT CONTACT de- V AREACODE V PHONE V STATE V ORDER ?,.QOH P MIN P PRICE 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.00H, P.MIN, P.PRICE, PDISCOUNT(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 Q0H), the minimum quantity and the price for each product ) The description, quantity on hold(P_Q0H), the minimum quantity, the price and the date for whose price is below $10.00 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
Step: 1
Get Instant Access with AI-Powered 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