Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Foster’s

Furnishings (DB)
OVERVIEW
Foster’s Furnishings, based in Kingston, produces stylish reasonably priced furniture for the local market,
which are sold to furniture stores island-wide. The company has an array of standard designs, produced from
local and imported lumber, and makes the occasional custom piece to order.
The company currently tracks their orders using a paper-based system and would like to upgrade to an IT-
based solution. Accordingly, you been asked to develop a prototype using a database management system and
demonstrate its usefulness by developing basic forms, queries, and reports. You have been provided with
sample data in a file named Fosters_OrderData_DB.

DESIGN SPECIFICATIONS
The Order database is comprised of four (4) tables: Customer, Product, Order, and OrderLine.
The Customer table is used to capture customer details. Figure 1 has the design and Figure 2 has the data.
CustomerID is the primary key.
Figure 1: tblCustomer Design
Field Name Field Description Data Type Field Size Comments
CustomerID Uniquely identifies each customer Number Byte PK
CustomerName Name of customer Short Text 20
Address Street address Short Text 30
City City or town Short Text 20

Figure 2: tblCustomer Data


CustomerID CustomerName Address City
1 Contemporary Casuals 21 Oxford Road Kingston 10
2 Value Furniture 14 Eastwood Park Road Kingston 4
3 Home Furnishings 190 Molynes Road Kingston 20
4 Eastern Furniture 160 Main Street Santa Cruz
5 Impressions 45 Kings Street May Pen
6 Furniture Gallery 100 Duke Street Ocho Rios
The Product table is used to capture product details. Figure 3 has the design and Figure 4 has a sample of the
data. ProductID is the primary key and unit prices are quoted in US$.
Figure 3: tblProductDesign
Field Name Field Description Data Type Field Size Comments
ProductID Uniquely identifies each product Number Byte PK
ProductDescription Name of product Short Text 30
ProductFinish Product finish: Short Text 10 Listbox
cherry/oak/maple/birch/walnut
UnitPrice Unit price in US$ Currency
QtyOnHand Quantity on hand Number Integer

Figure 4: tblProduct Sample Data


ProductID ProductDescription ProductFinish UnitPrice QtyOnHand
1 End Table Cherry $ 175.00 8
2 Coffee Table Birch $ 200.00 4
3 Computer Desk Oak $ 375.00 5
4 Entertainment Center Maple $ 650.00 3

A sample order from is displayed in Figure 5 and two (2) tables are used to capture order details: Order and
Orderline.

Figure 5: Sample Order Form

Order Header

Order Details

MGMT2004 Foster’s Furnishings DB Exercise Page | 2


The Order table stores order header data i.e. when the order was made and by whom. Figure 6 has the
design and Figure 7 has a sample of the data. OrderID is the primary key and CustomerID is the foreign key
Figure 6: tblOrder Design
Field Name Field Description Data Type Field Comments
Size
OrderID Uniquely identifies each order Number Integer PK
OrderDate Date of Order Date/Time Short Date format
CustomerID ID of customer who placed order Number Byte FK, Lookup
XRate US$:JM$ Exchange Rate Number Single Format as currency

Figure 7: tblOrder Sample Data


OrderID OrderDate CustomerID Xrate
1 07/19/2018 4 124
2 07/28/2018 3 132
3 08/17/2018 1 135

The OrderDetail table stores order detail data i.e. which products were ordered and how many of each.
Figure 8 has the design and Figure 9 has a sample of the data. OrderID and ProductID together form the
primary key (i.e. a composite key) and individually, they are (each) foreign keys. For a composite PK, the
combination is unique. In this database, the assumption is that each product will appear ONCE on each
order.
Figure 8: tblOrderDetail Design
Field Name Field Description Data Type Field Comments
Size
OrderID Together form the PK Number Integer FK, Lookup
ProductID (separately they are FKs) Number Byte FK, Lookup
OrderQty Quantity ordered Number Byte

Figure 9: tblOrderDetail Sample Data


OrderID ProductID OrderQty
1 2 2
1 10 2
2 3 1

Noticed that the totals at the bottom of the form in Figure 5 are not stored? That’s because they are
calculated when needed. That’s like AGE. We store DOB and calculate AGE on demand.

MGMT2004 Foster’s Furnishings DB Exercise Page | 3


IMPLEMENTATION REQUIREMENTS
1. Create OrderDB by designing and/or importing tables and enforce referential integrity.
2. Create forms for the Customer table [frmCustomer] and the Product table [frmProduct]
3. Create queries to determine:
a. [qryOak] Which products are finished in oak? List description and unit price
b. [qryKin] Who are the Kingston customers? List Name and address
c. [qryJuly] Which customers ordered in July 2018? List CustomerName
d. [qryOrder2] What is the total in US$ for order #2 and how many products were ordered?
e. [qryPopular] List products in the order of popularity
f. [qryLeastPopular] What is the least popular product ordered?
g. [qryTotalRevenue] What is the total revenue in JM$ after tax? (GCT Rate = 16.5%)
h. [qryReorder] List ALL products that need to be reordered i.e. total order quantity exceeds or is
equal to quantity on hand
4. [rptPopular] Create a report that lists the total number ordered of each product. List ProductID,
ProductDescription and total ordered.
5. [rptOrders] Create a report, grouped by Order #, that displays the order details (similar to Figure 5) for
each order, as well as the order grand total in US$.
6. [qryNoOrders] Are there any customers who have not placed an order? List customer details. Similarly,
are there any products that have never been ordered? List product details [qryNotOrdered]
7. Challenge: Recreate the order form in Figure 5 (Hint: form with subform)

LEARNING OBJECTIVES
1. Create tables from design view of by importing and modifying the design.
2. Relate tables and enforce referential integrity.
3. Create lookups/list boxes on foreign keys and other fields using the Lookup Wizard.
4. Create forms with/without subforms.
5. Create SELECT queries: detail and group by/aggregate/total
6. Create reports with/without groupings
7. Create UNMATCHED queries

MGMT2004 Foster’s Furnishings DB Exercise Page | 4

You might also like