The SALESORD Database

The examples in this manual are based upon the dealings of a fictitious company, Acme Sales Order Plc, which sells a number of products throughout the United Kingdom. An example database called SALESORD is supplied on which you may experiment with the database utilities. SALESORD stores information on Acme employees, customers, orders and supplier’s materials. Its structure is illustrated below. See below further information.

SALESORD Entity Relationship Diagram

 

The principal tables in the SALESORD database are as follows:

EMPLOYEE

Stores details of Acme employees who manage customer sales regions and customer accounts, including the employee’s name, gender, company grade and date of birth. The primary key is a unique number that identifies the employee

REGION

Stores details of the UK regions where customers live, including the name of the region and the company employee managing the region. The primary key is a unique code that identifies each region

CUSTOMER

Stores the customer’s name, address and region code, credit arrangements and balance. The primary key is a unique number that identifies the customer

ORDER_HEADER

Stores the details of the date and time the order was placed, its value and customer payments made against it, delivery details, customer number and code of the Acme employee responsible for the account. The primary key is a unique number that identifies each order. A customer may have several order header records, each of which may have several order lines giving materials and quantities ordered. An order header record may also have several order payment records

ORDER_LINE

Includes one record for each different material in an order. ORDER_LINE contains the order number, a line number that identifies an order line, the material code and quantity ordered, together with the value of the order line. The order number plus line number form the primary key that identifies each record

ORDER_PAYMENT

Includes one record for each payment made against an order. ORDER_PAYMENT records the order number, a payment number that identifies separate payments, the media code (cheque, direct debit, credit card), the amount paid, the card number and payment date and time

MATERIAL

Stores details of each material including its code, description, unit price, quantity in stock and re-order level together with the code of the principal and the alternative supplier of the material. The material code is the primary key to the MATERIAL table

SUPPLIER

Stores the company’s name and address. The primary key is a unique number that identifies the company