CPSC 304

Partial Solution for Project Part I

1. Transaction Specification

1.1  Purchase

User: Clerk

Input: UPC, quantity, payment type

Optional input (depending on payment type): cash amount, or credit card type and number, or account type and number.

Output: "OK" or "Cancelled"

Basic Case:

The system will remove quantity many items from the item table check if the item is taxable, and calculate the total value. If the amount is to be charged on a credit card, will ask for authorization. If the payment is to be charged to a UBStore account, check for sufficient funds. If all go well it adds a log record in the purchases log table and returns "OK".

Exceptions:

1.2  Return

User: Clerk

Input: UPC, quantity, payment type

Optional input (depending on payment type): credit card type and number, or account type and number.

Output: "OK" or "Cancelled"

Basic Case:

The system will add quantity many items to the item table, check if the item is taxable, and calculate the total value to be refunded. If the payment was through a UBStore account, it credits the account. If all go well ,it adds a log record in the purchases log table and returns "OK". (Crediting a credit card is done manually by the clerk.)

Exceptions:

1.3  Add Item

User: Manager

Input: date, UPC, quantity, supplier name.

Optional input :

Output: "OK" or "Cancelled"

Basic Case:

The system will check if the item already exist in the database. It will update the item table, the supplies table if the item is new, the book and nonbook tables according to the item type, and will insert a record in the shipment log.

Exceptions:

1.4  Add Supplier

....

   

1.5  Remove Supplier

...

   

1.6  Add Account

....

   

1.7  Remove Account

...

          

1.8  Day Sales Report

...

 

1.9 Low Stock Report

...

 

1.10  Item Query

...

    

1.11  Suppliers for Item Query

...

 

1.12  Top 5 Items from Supplier Query

...

   

1.13  Courses for Text Query

...

1.14  Texts for Course Query

...

   

1.15  Books from Publisher Query

...

   

      

       

2. ER Diagram

The following is the ER diagram for the UBStore enterprise. Please note the following: