Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
  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. image text in transcribedAccounting 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Using Financial Accounting Information The Alternative to Debits and Credits

Authors: Gary A. Porter, Curtis L. Norton

7th Edition

978-1133161646

Students also viewed these Accounting questions

Question

Define self-discipline and cite its benefits.

Answered: 1 week ago

Question

Describe the traditional inventory management model.

Answered: 1 week ago

Question

Describe JIT inventory management.

Answered: 1 week ago

Question

Explain the basic concepts of constrained optimization.

Answered: 1 week ago