Question: Consider the following tables in a relational database. Provide the appropriate SELECT SQL statement necessary to answer the queries that follow. Primary keys are underlined

 Consider the following tables in a relational database. Provide the appropriate

  1. Consider the following tables in a relational database. Provide the appropriate "SELECT" SQL statement necessary to answer the queries that follow. Primary keys are underlined and foreign key fields have an asterisk at the end of the field.

CUSTOMERS (CUST-NO, C-NAME, C-ADDRESS, BALANCE)

SALESPERSONS (SP-NO, S-NAME, DATE-EMPLOYED, SALARY)

SALES (INVOICE-NO, DATE, CUST-NO*, SP-NO*)

a) List the salesperson name and salary for all sales to customers whose balance outstanding is greater than 20000.

b) List the names and addresses of all customers who have been sold merchandise by salespersons employed before 1/1/96.

  1. Find all violations of entity and referential integrities.
  2. "SELECT" SQL statement necessary to answer the queries that follow. Primary keysAccounting Information Systems

2. Find all violations of entity and referential integrities. CUSTOMERS CUSTOMER NAME ADDRESSI ADDRESS STATE STR BALANCE 456 ABC Corp 111 Any St. Houston 6.25 34560.65 DEF Corp 222 Anywhere Dr. New York NY 16.50 145.90 458 s Someplace a FL 6.45 45670.75 J459 UKL Corp 56 Some De Bryan TX 6.25 1009.50 MINO Corp Noplace Cir San Diego ICA 5.50 4561.00 INVOICE-ITEMS INVOICE# ITEM DESC PRICE QTY 1001 121 Widget 12.25 45 1001 15:40 Bolt 10.40 25 1002 211 Gear 3.70 10 1003 121 Widget 12.25 15 1003 121 Widget 12.25 10 1006 348 Nut 10.25 INVOICES INVOICE# DATE CUSTOMER AMOUNT 1001 11-1-95 1456 450.75 1002 11-2-95 457 560.25 11-2-95 1460 300.10 1003 11-2-95 1159 890.25 1004 11-3-95 150 425.50 2. Find all violations of entity and referential integrities. CUSTOMERS CUSTOMER NAME ADDRESSI ADDRESS STATE STR BALANCE 456 ABC Corp 111 Any St. Houston 6.25 34560.65 DEF Corp 222 Anywhere Dr. New York NY 16.50 145.90 458 s Someplace a FL 6.45 45670.75 J459 UKL Corp 56 Some De Bryan TX 6.25 1009.50 MINO Corp Noplace Cir San Diego ICA 5.50 4561.00 INVOICE-ITEMS INVOICE# ITEM DESC PRICE QTY 1001 121 Widget 12.25 45 1001 15:40 Bolt 10.40 25 1002 211 Gear 3.70 10 1003 121 Widget 12.25 15 1003 121 Widget 12.25 10 1006 348 Nut 10.25 INVOICES INVOICE# DATE CUSTOMER AMOUNT 1001 11-1-95 1456 450.75 1002 11-2-95 457 560.25 11-2-95 1460 300.10 1003 11-2-95 1159 890.25 1004 11-3-95 150 425.50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!