discounts table

discounts is defined as follows:

create table discounts
(discounttype varchar(40) not null,
stor_id char(4) null,
lowqty smallint null,
highqty smallint null,
discount float not null)

Its primary keys are discounttype and stor_id:

sp_primarykey discounts, discounttype, stor_id 

Its stor_id is a foreign key to stores:

sp_foreignkey discounts, stores, stor_id

Table A-9 lists the contents of discounts:

Table A-9: discounts table

discounttype

stor_id

lowqty

highqty

discount

Initial Customer

8042

NULL

NULL

10.5

Volume Discount

NULL

100

1001

6.7

Huge Volume Discount

NULL

1001

NULL

10

Customer Discount

8042

NULL

NULL

5