17.12.2012 Views

The Pizza Company Inventory Tracking Database - Njit.edu

The Pizza Company Inventory Tracking Database - Njit.edu

The Pizza Company Inventory Tracking Database - Njit.edu

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong><br />

<strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong><br />

Jim Lubey<br />

Debbie Miksiewicz<br />

DBM380<br />

April 17, 2011


Table of Contents<br />

Abstract 3<br />

Business Rules 4<br />

Elements of the <strong>Database</strong> 5<br />

Tables / Entities 5<br />

Attributes / Properties 5<br />

Identifiers 5<br />

Relationships 6<br />

Cardinality 6<br />

Entity-Relationship (E-R) Diagram 7<br />

Schema 8<br />

Delivery_Method Table 8<br />

Employee Table 9<br />

Ingredient Table 10<br />

Ingredient_Category Table 11<br />

<strong>Inventory</strong>_Transaction Table 12<br />

Orders Table 13<br />

Suppliers Table 14<br />

Business Functions 15<br />

Forms – General 15<br />

Forms – Columns / Display Names 17<br />

Reports 20<br />

Summary 21<br />

References 22<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 2


Abstract<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 3<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> is a fictitious company chosen by the members of Team A to illustrate the development of an inventory system. In the<br />

following diagrams, we will show the details of the inventory system as it applies to the various functional areas involved in the materials<br />

management of the inventory of this pizza company. Covered in this paper are the business rules, the data base elements, and the requirements. We<br />

will also discuss the schema and the entity relationship diagram that such a database would require, in addition to typical user reports.


Business Rules<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 4<br />

As with any database, determining business rules was an important part of our design process. Users have specific requirements, which the<br />

database must meet. During the data modeling stage, we attempted to determine what these rules are, and to adjust the database relations<br />

accordingly. Understanding the business processes, and knowing how the business has decided to use the database information are critical.<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> makes frozen pizzas and distributes them to supermarkets and grocery stores for sale to the public. In the tables and<br />

relationships shown in this documentation, we show how each process step is dependent upon or related to the database model. <strong>The</strong> <strong>Pizza</strong><br />

<strong>Company</strong> employs several associates who have the authority to order (add to inventory) ingredients and to remove items from inventory to use in<br />

the production of the pizza. <strong>The</strong>se specially trained production control staff have an in-depth understanding of the company processes.<br />

Generally, the <strong>Pizza</strong> <strong>Company</strong> buys ingredients, and the supplier delivers them. Occasionally the <strong>Pizza</strong> <strong>Company</strong> picks up a purchase in the<br />

corporate vehicle. <strong>The</strong> company considers orders as changes to the ‘Ingredient warehouse’ indicating a ‘Purchased’ or ‘Used in Production’. Every<br />

Order must have certain information, including the employee’s name that entered the order, and the Ingredient supplier’s name. <strong>The</strong> general<br />

business rules are as follows:<br />

• <strong>The</strong> company buys ingredients from several suppliers.<br />

• Perishable ingredients have a percentage of shrinkage.<br />

• <strong>The</strong> unit of measure for all of the Ingredients is the pound.<br />

• <strong>The</strong> Ingredient_Name contains units of measure for bulk items used for packaging. (i.e.: “500 foot role of Z-wrap – 24 inches wide”)<br />

• <strong>The</strong>re are five categories of Ingredients. <strong>The</strong>se are the crust, the toppings, the cheese, the sauce, and packaging.<br />

• <strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> employees have the authority to order or remove items from inventory.<br />

• All required database fields must be complete to create an order.


Elements of the <strong>Database</strong><br />

Tables / Entities<br />

Entities are items that the user wants to track. An entity class is a group of entities of the same type. We use seven tables:<br />

� Delivery_Methods<br />

� Employees<br />

� Ingredients<br />

� Ingredient_Categories<br />

� <strong>Inventory</strong>_Transactions<br />

� Orders<br />

� Suppliers<br />

Attributes / Properties<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 5<br />

Attributes (also called properties) describe the characteristics of the entity, thus giving it definition. <strong>The</strong> table properties include the physical<br />

name and conceptual name (which in this case are the same), columns, primary key, and indexes. Properties for columns include the physical<br />

name, display name, data type and length, and whether or not it is a primary key and or required. <strong>The</strong> attributes of our ingredients are self-<br />

describing, and therefore make ordering easier to understand.<br />

Identifiers<br />

Identifiers are those attributes that identify the entity instances (instances are representations of a specific entity.)


Relationships<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 6<br />

Relationships describe how entities are associated with each other. <strong>The</strong>re are three types of relationships, one to one, one to many, and many to<br />

many. <strong>The</strong>se relationships define how entity instances relate. Relationships also provide us with critical information about entity interactions.<br />

In this project, there are six relationships. <strong>The</strong>re is a relation of one to many between Ingredients and Ingredient_Categories. <strong>The</strong> relationship<br />

between Orders and Delivery_Method and Orders and Employees are each one to one. <strong>The</strong> relationship between Orders and Suppliers is one to<br />

many because sometimes a request for ingredients from manufacturing contains items from one or more suppliers. Orders to Suppliers (items<br />

purchased) are always one order submitted to one supplier. <strong>The</strong> <strong>Inventory</strong>_Transaction table has a many to one relation to Ingredients and also a<br />

many to one relation to Orders. <strong>The</strong> five relationship names are:<br />

� Delivery_Method_Orders<br />

� Ingredient_Ingredient_Category<br />

� <strong>Inventory</strong>_Transaction_Ingredients<br />

� <strong>Inventory</strong>_Transaction_Orders<br />

� Orders_Employees<br />

� Orders_Suppliers<br />

Cardinality<br />

In general, each relationship can also have a minimum and maximum cardinality associated with it to show which relationships are optional,<br />

which are mandatory, and any numerical limitations on these relationships. <strong>The</strong> cardinality for this database is:<br />

� Delivery_Method_Orders is 1:1<br />

� Ingredient_Ingredient_Category is 1:1<br />

� <strong>Inventory</strong>_Transaction_Ingredients is 1:1<br />

� <strong>Inventory</strong>_Transaction_Orders: 1:N<br />

� Orders_Employees: is N:1<br />

� Orders_Suppliers is 1:1


Entity-Relationship (E-R) Diagram<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 7<br />

To document the <strong>Pizza</strong> <strong>Company</strong> database, we used the following Entity-Relationship (E-R) diagrams. <strong>The</strong> following diagram graphically<br />

depicts the various relationships, the associated cardinality, and the entity classes of the relationship.<br />

<strong>Inventory</strong>_Transactions<br />

PK <strong>Inventory</strong>_Transaction_ID<br />

I1 <strong>Inventory</strong>_Transaction_Date<br />

FK3,I2 Ingredient_ID<br />

FK4 Order_ID<br />

<strong>Inventory</strong>_Transaction_Description<br />

Unit_Price<br />

Units_Ordered<br />

Units_Received<br />

Units_Sold<br />

Units_Shrinkage<br />

Ingredients<br />

PK Ingredient_ID<br />

I1 Ingredient_Name<br />

Ingredient_Description<br />

FK2,I2 Ingredient_Category_ID<br />

Unit_Price<br />

Unit_Size<br />

Reorder_Level<br />

Discontinued<br />

Lead_Time<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> ERD<br />

PK Order_ID<br />

Orders<br />

Order_Number<br />

Order_Description<br />

FK9,I1 Supplier_ID<br />

FK6,I4 Employee_ID<br />

I3 Order_Date_Time<br />

Promised_Ready_Date_Time<br />

Delivery_Date_Time<br />

FK4 Delivery_ID<br />

Delivery_Charge<br />

Ingredient_Categories<br />

PK Ingredient_Category_ID<br />

I1 Ingredient_Category_Name<br />

Suppliers<br />

PK Supplier_ID<br />

I2 Supplier_Name<br />

Contact_Name<br />

Contact_Title<br />

Address<br />

City<br />

State<br />

I3 Zip_Code<br />

Phone<br />

FAX<br />

Payment_Terms<br />

Remarks<br />

Delivery_Methods<br />

PK Delivery_ID<br />

Delivery_Method<br />

Employees<br />

PK Employee_ID<br />

First_Name<br />

I1 Last_Name<br />

Title<br />

Work_Phone<br />

Extension


Schema<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 8<br />

<strong>The</strong> following schema defines aspects of the database, such as attributes (fields), domains, and parameters of the <strong>Pizza</strong> <strong>Company</strong> database. As<br />

shown here, each table has specific definitions that apply to each item, and enforce some of the business rules.<br />

Delivery_Method Table<br />

Table Column Keys<br />

Delivery_Methods<br />

Data<br />

Type<br />

Delivery _ID PK Integer 10<br />

Delivery<br />

_Method<br />

max Note<br />

Auto<br />

Counter<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

VarChar 10 X<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

X 0-9999999999 Autocounter<br />

air; ground,<br />

refrigerated truck,<br />

will call<br />

Comment<br />

User Input - User may decide how we want it<br />

shipped, when placing the order


Employee Table<br />

Table Column Keys<br />

Employee<br />

Data<br />

Type<br />

Employee _ID PK Integer 10<br />

max Note<br />

Auto<br />

Counter<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 9<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

X X 0-999999999<br />

First _Name VarChar 30 X REQUIRED<br />

Last _Name I1 VarChar 30 X REQUIRED<br />

Title VarChar 50 X<br />

Work _Phone VarChar 30 X REQUIRED<br />

Extension VarChar 10 X<br />

Comment<br />

This would be a choice during transactions (auto<br />

generated when record is created). An Employee<br />

Form by user creates dropdown list for<br />

Transaction (Use Ingredient or Order Ingredient)<br />

This would be filled in by system during a<br />

transaction, based on Employee _ID (user input<br />

when employee record is created or edited)<br />

This would be filled in by system during a<br />

transaction, based on Employee _ID (user input<br />

when employee record is created or edited)<br />

This would be filled in by system during a<br />

transaction, based on Employee_ID (user input<br />

when employee record is created or edited)<br />

This would be filled in by system during a<br />

transaction, based on Employee_ID (user input<br />

when employee record is created or edited)<br />

This would be filled in by system during a<br />

transaction, based on Employee _ID (user input<br />

when employee record is created or edited)


Ingredient Table<br />

Table Column Keys<br />

Ingredients<br />

Data<br />

Type<br />

Ingredient _ID PK Integer 10<br />

Ingredient<br />

_Name<br />

Ingredients<br />

_Description<br />

Ingredient<br />

_Category _ID<br />

max Note<br />

Auto<br />

Counter<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

DBM<br />

Input:<br />

Data<br />

fie lds<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

X X 0-999999999<br />

I1 VarChar 50 X X<br />

VarChar 50 X X<br />

FK, I2 Integer 10 X<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 10<br />

Comment<br />

This would be a choice during transactions (auto<br />

generated when record is created)<br />

Ground beef,<br />

Mushrooms, olives, This would be filled in by system during a<br />

ham. Pineapple. transaction, based on Ingredient_ID (user input<br />

Sausage. Green when Ingredient record is created or edited)<br />

peppers, pepperoni<br />

i.e.: for ground<br />

beef the<br />

description would<br />

be "Lean Ground<br />

Beef"<br />

This would be filled in by system during a<br />

transaction, based on Ingredient_ID (user input<br />

when Ingredient record is created or edited)<br />

See<br />

Ingredient_Catego User selects Ingredient category from list<br />

ry_ID in Ingredient (Ingredient form<br />

Category Table<br />

Unit _Price Currency 10 X<br />

Cost at time of last<br />

User enters in Ingredient form<br />

purchase<br />

Unit _Size VarChar 20 X<br />

pound, each,<br />

bushel etc…<br />

depending on<br />

supplier, and<br />

User enters in Ingredient form<br />

ReOrder _Level Integer 10 X<br />

perishable, this is<br />

User enters in Ingredient form<br />

the number of day<br />

it takes to reorder<br />

and receive<br />

This field indicates that the ingredient is no longer<br />

Discontinued Boolean 2 X Yes - No<br />

used at our company. Yes would make the item<br />

not show up in any new dropdowns of ingredients.<br />

User inputs this value.<br />

Lead _Time VarChar 30 X<br />

User enters in Ingredient form the date provided<br />

by the seller


Ingredient_Category Table<br />

Table Column Keys<br />

Ingredient _Categories<br />

Ingredient<br />

_Category _ID<br />

Ingredient<br />

_Category<br />

_Name<br />

Data<br />

Type<br />

PK Integer 10<br />

max Note<br />

Auto<br />

Counter<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

I1 VarChar 20 X<br />

Data<br />

defaults<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 11<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

X 0-999999999 System<br />

Initially these are:<br />

Topping, Cheese,<br />

Sauce Crust…<br />

Comment<br />

Form to add/edit/delete Ingredient Categories<br />

Used for Order or purchases


<strong>Inventory</strong>_Transaction Table<br />

Table Column Keys<br />

<strong>Inventory</strong>_Transactions<br />

<strong>Inventory</strong><br />

_Transaction<br />

_ID<br />

<strong>Inventory</strong><br />

_Transaction<br />

_Date<br />

Data<br />

Type<br />

PK Integer 10<br />

max Note<br />

Auto<br />

Counter<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

I1 Date/Time 15 X<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 12<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

X 0-999999999 System<br />

short date format<br />

(I.e.: 01/01/1901)<br />

Default is (today)<br />

Comment<br />

Ingredient _ID FK3 Integer 10 X<br />

See<br />

Ingredient_Catego<br />

User selects Ingredient from list (<strong>Inventory</strong> Form)<br />

ry_ID in Ingredient<br />

Table<br />

Order _ID<br />

<strong>Inventory</strong><br />

FK4 Integer 10 X<br />

See Order_ID in<br />

Ingredient Table<br />

Generated from order<br />

_Transaction<br />

_Description<br />

VarChar 50 X Purchased; WIP user input<br />

Unit _Price Currency 10 X from Ingredient table<br />

Units _Ordered Integer 10 X from purchase or sale record<br />

Units _Received Integer 10 X from purchase or sale record<br />

Units _Sold Integer 10 X From Order table<br />

Units<br />

_Shrinkage<br />

Integer 10 X<br />

= (Units_Ordered -<br />

User Input<br />

Units_Received)


Orders Table<br />

Table Column Keys<br />

Data<br />

Type<br />

max Note<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 13<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

Comment<br />

Orders<br />

Order _ID PK Integer 10<br />

Auto<br />

Counter<br />

X 0-999999999<br />

This would be a choice during transactions (auto<br />

generated when record is created)<br />

Order _Number VarChar 30 X User Input<br />

Order<br />

_Description<br />

VarChar 255 X User Input<br />

Supplier _ID FK9, I1 Integer 10 X<br />

User Chooses from list created from Supplier<br />

Form<br />

Employee _ID FK6, I4 Integer 10 X<br />

User Chooses from list created from Employee<br />

Form<br />

Order _Date<br />

_Time<br />

Date/Time 15 X<br />

long date format<br />

(I.e.: 01/01/1901<br />

5:00 PM)<br />

User Input<br />

Promised<br />

long date format<br />

_Ready _Date Date/Time 15 X<br />

(I.e.: 01/01/1901 User Input<br />

_Time<br />

5:00 PM)<br />

Deliver _Date<br />

_Time<br />

Date/Time 15 X<br />

long date format<br />

(I.e.: 01/01/1901<br />

5:00 PM)<br />

User Input<br />

Delivery _ID FK4 Integer 10 X<br />

User Chooses from list created from Delivery<br />

Type Form<br />

Delivery<br />

_Charge<br />

Currency 10 X X<br />

depends on<br />

delivery method<br />

When a delivery method is selected, related charge<br />

will be displayed


Suppliers Table<br />

Table Column Keys<br />

Data<br />

Type<br />

max Note<br />

User<br />

Input:<br />

Data field<br />

req<br />

during a<br />

trans.<br />

DBM<br />

Input:<br />

Data<br />

fields<br />

input<br />

prior to a<br />

trans.<br />

Data<br />

defaults<br />

Permitted Value,<br />

range of values,<br />

or formula<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 14<br />

Comment<br />

Suppliers<br />

Supplier _ID PK Integer 10<br />

Auto<br />

Counter<br />

X 0-999999999<br />

This would be a choice during transactions (auto<br />

generated when record is created)<br />

This would be filled in by system during a<br />

Supplier _Name I2 VarChar 50 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

Contact _Name VarChar 50 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

Contact _Title VarChar 50 X X<br />

transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

Address VarChar 255 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

City VarChar 50 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

State VarChar 20 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

Zip _Code I3 VarChar 20 X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

Phone VarChar 30 X X REQUIRED transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

This would be filled in by system during a<br />

FAX VarChar 30 X X<br />

transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

Payment<br />

_Terms<br />

VarChar 255 X X REQUIRED<br />

This would be filled in by system during a<br />

transaction, based on Supplier_ID (user input<br />

when Supplier record is created or edited)<br />

Remarks VarChar 255 X User Input


Business Functions<br />

Forms – General<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 15<br />

<strong>The</strong>re will be six forms and two child forms used to add, edit or delete records. <strong>The</strong> parent forms are the Employee Form, the Supplier Form,<br />

the Delivery Method Form, the Ingredient Form, and the Ingredient Category Form. <strong>The</strong> Child forms are the Purchase Order sub form, and the<br />

Ingredient sub form.<br />

<strong>The</strong> Purchase Order sub form is contained on the Orders Form. <strong>The</strong> Ingredient sub form is found on the Ingredients form.<br />

<strong>The</strong> purpose of the Purchase Order Form is to create a printable request for ingredients, that can be faxed or mailed to a supplier, while the<br />

Ingredients sub form is used to maintain a record of transactions affecting an particular ingredient.<br />

Before using the system to keep track of inventory, someone must enter employees, suppliers, ingredient categories and Delivery methods.<br />

Note: Employees with the appropriate permission can add new employees, suppliers, ingredients categories, and delivery methods as needed while<br />

creating an order.<br />

<strong>The</strong> Employee Form, the Supplier Form, <strong>The</strong> Delivery Method Form and the Ingredient Category Form are simple forms to record data used<br />

for the more complex Ingredient from, queries and reports.<br />

<strong>The</strong>se initial records will be used to choose from, when a user creates orders and other inventory transactions.<br />

Employees use the Ingredient Form to initially describe the particular ingredient and later to record transaction, using the sub form to record items<br />

that remove items from inventory. <strong>The</strong>re are two calculated fields on the form displaying current on hand and on-order quantities.


<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 16<br />

A user would use the Order form to add Ingredient quantities to the inventory. After creating an order, the user will have the option to create a<br />

printable purchase order to send to a supplier. Order transaction, which add to the inventory and transactions that subtract from inventory (entered<br />

directly into the Ingredient sub form) are all maintained in the <strong>Inventory</strong>_Transaction table, and are displayed in the Ingredient sub form.<br />

Ingredients sub form depicted as a table on the Ingredient parent form.<br />

Date Order ID Ingredient Description # Ordered # Received<br />

7/20/2002 102 Tomatoes<br />

# Used<br />

in MFG # Shrinkage<br />

Purchase from Albino’s<br />

Produce Co. 10 0 1 2<br />

7/23/2002 102 Tomatoes<br />

Received from Albino’s<br />

Produce Co. 0 10 0 0<br />

7/24/2002 Tomatoes Sent to MFG 0 0 5 0<br />

7/24/2002 Tomatoes Removed spoiled items 0 0 0 0.5<br />

Purchase Order sub form for order # 102 depicted as a table on the Orders parent form.<br />

Date Ingredient # Ordered Unit Price Line Total<br />

7/20/2002 Tomatoes 10 $12.50 $ 125.00<br />

7/20/2002 Green Peppers 2 $23.00 $46.00<br />

7/20/2002 Mushrooms 4 $32.00 $128.00


Forms – Columns / Display Names<br />

<strong>The</strong> following table describes the display names and row sources for each form and sub forms used in the system.<br />

Form Name Source Column Display<br />

Name<br />

Categories Form Ingredient_Categories Ingredient_Category_ID Category ID<br />

Ingredient_Category_Name Category<br />

Name<br />

Delivery Methods Delivery_Methods Delivery_Method_ID Delivery<br />

Form<br />

Method ID<br />

Delivery_Method Delivery<br />

method<br />

Employees Form Employees Employee_ID Employee ID<br />

First_Name First Name<br />

Last_Name Last Name<br />

Title Title<br />

Work_Phone Phone<br />

Extension Extension<br />

Ingredients Form Ingredients Ingredient_ID Ingredient ID<br />

Ingredient_Name Ingredient<br />

Name<br />

Ingredient_ Description Ingredient<br />

Description<br />

Ingredient_Category_ID Category<br />

Unit_Price Unit Price<br />

Reorder_Level Reorder<br />

Level<br />

Discontinued Discontinued<br />

Lead_Time Lead Time<br />

Units On<br />

Hand<br />

Units on<br />

Order<br />

Ingredient<br />

List<br />

Ingredient<br />

Subform<br />

Ingredients Order_Date Date<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 17<br />

Notes<br />

Units_received - Units_Sold -<br />

Units_Shrinkage<br />

Units_Ordered - Units_Received<br />

See Ingredient Sub form


<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 18<br />

Form Name Source Column Display<br />

Name<br />

Notes<br />

Ingredients Ingredient Ingredient<br />

<strong>Inventory</strong>_Transactions Units_Ordered Units<br />

Ordered<br />

Ingredients Unit_Price Unit Price<br />

Line Total Units_Ordered * Unit_Price<br />

Order Form Orders Order_ID Order ID<br />

Order_Number Order<br />

Number<br />

Order_Description Description<br />

Supplier_ID Supplier SELECT DISTINCTROW Suppliers.*<br />

FROM Suppliers ORDER BY<br />

[Suppliers].[Supplier_Name];<br />

Employee_ID Employee SELECT [Employee_ID],<br />

[Last_Name] & ", " & [First_Name]<br />

FROM Employees ORDER BY<br />

[Last_Name] & ", " & [First_Name];<br />

Order_Date_Time Order Date<br />

Date_Required Date<br />

Required<br />

Promised_Ready_Date_Time Date<br />

Promised<br />

Ship_Date Ship Date<br />

Delivery_Method_ID Delivery SELECT DISTINCTROW<br />

Method [Delivery_Methods]. * FROM<br />

[Delivery_ Methods] ORDER BY<br />

[Delivery_Methods].Delivery_Method;<br />

Delivery_Charge Delivery<br />

Charge<br />

<strong>Inventory</strong><br />

Order List<br />

See Purchase Order Sub form<br />

Purchase Order<br />

(Subform)<br />

<strong>Inventory</strong>_Transactions TransactionDate_Date Date<br />

Ingredient Ingredient_ID Ingredient SELECT DISTINCTROW Ingredients.<br />

* FROM Ingredients ORDER BY<br />

[Ingredients].[Ingredient_Name];<br />

<strong>Inventory</strong>_Transactions Units_Ordered Units Orderd<br />

<strong>Inventory</strong>_Transactions Unit_Price Unit Price


<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 19<br />

Form Name Source Column Display<br />

Name<br />

Notes<br />

Line Total Unit_Price * Units_Ordered<br />

Suppliers Form Suppliers Supplier_ID Supplier ID Hidden<br />

Supplier_Name Supplier<br />

Name<br />

Contact_Name Contact<br />

Name<br />

Contact_Title Contact Title<br />

Address Address<br />

City City<br />

State State<br />

Zip_Code Zip Code<br />

Phone Phone<br />

Number<br />

FAX Fax Number<br />

Payment_Terms Payment<br />

Terms<br />

Remarks Remarks


<strong>The</strong> five Reports that <strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> initially requires are:<br />

Reports<br />

<strong>The</strong> Ingredient Cost Comparison Report (by date and supplier) generated from a Select Statement that will result in a report showing the<br />

Ingredient_Name, Supplier_Name, Average Unit_Price, Total Units, and summaries. Employees use this report to determine the best average price<br />

that a supplier offers, for a particular ingredient.<br />

<strong>The</strong> Ingredients Purchased Report (by date and supplier name) generated from a Select Statement and will display the Ingredient_Name, <strong>The</strong><br />

Supplier_Name, <strong>The</strong> Average Unit_Price, the Total_Units and summaries. This report will summarize ingredients purchased from various<br />

suppliers.<br />

<strong>The</strong> <strong>Inventory</strong> Summary Report generated from a Select Statement shows quantities coming in and going out of stock. <strong>The</strong> fields that will be<br />

included are: Ingredient_Name, Reorder_Level, Lead _Time, Number In Stock, and Number on Order. This report will be viewed/printed daily to<br />

determine what if anything should be ordered.<br />

<strong>The</strong> Ingredient Transaction Detail Report (sorted by date) generated from a Select Statement shows the history of all ingredients. <strong>The</strong> fields<br />

included are Ingredient_Name, Transaction_Date, transaction_Description, Unit_Price, Units_Ordered, Units_Received, Units_Sold, and<br />

Units_Shrinkage.<br />

<strong>The</strong> Purchase Order is the hard copy of an order to be sent to a supplier. It is generated from a Select Statement and contains the Employee’s<br />

First_Name, Last_Name, Order_Date, Order_ID, Order_Number, Date_Required, Date_Promised, Delivery_Method, Order_Description. <strong>The</strong><br />

supplier portion will include Supplier_Name, Contact_Name, Address, City, State, Phone, and Fax. <strong>The</strong> Ingredient portion of the document will<br />

include the Ingredient_ID, Ingredient_Name, Units_Ordered, Unite_Price, and a line subtotal. <strong>The</strong>re will also be a grand total displayed.


Summary<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 21<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> is a fictitious company chosen by the members of Team A to illustrate the development of an inventory system. In the<br />

preceding pages, we demonstrated the step-by-step requirements needed to develop a productive database that would satisfy the requirements of<br />

this particular company. We have shown the details of the inventory system as it applies to the various functional areas involved in the materials<br />

management of the inventory, and how the ordering process is controlled. <strong>The</strong> comprehensive set of business rules was created to set the database<br />

criteria so those business requirements were met. Finally, documentation of the schema and entity-relationships serves as a visual guide that shows<br />

the user how the database fields relate to one another, in addition to providing a clear map for report generation.<br />

Developing a database is a complex process, requiring that both the potential users and the database developer work together to create one<br />

vision of the completed product. While every design may require some adjustments once in actual implementation, using the tools we have shown<br />

here will go a long way towards creating a near perfect product. Documentation is critical, not only in the design phase, but for future<br />

programmers who may need to maintain this database in the future. At the <strong>Pizza</strong> <strong>Company</strong>, Team A has provided such documentation.


References<br />

<strong>The</strong> <strong>Pizza</strong> <strong>Company</strong> <strong>Inventory</strong> <strong>Tracking</strong> <strong>Database</strong> 22<br />

Kroenke, D. M. (2000). <strong>Database</strong> Processing: Fundamentals, Design and Implementation: Sections 1-6 (University of Phoenix Custom Edition).<br />

Needham Heights, MA: Pearson Custom Publishing.<br />

Kroenke, D. M. (2002). <strong>Database</strong> Processing: Fundamentals, Design and Implementation: 8 th edition. Upper Saddle River, NJ: Pearson<br />

Education.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!