IE 330 Fall 2015 Term Project #2

IE 330
Fall 2015
Term Project #2
GROUP 5
BERK BASAR
TYLER BOGGS
SAMIR KALAVAR
ABHISHEK VAIDYA
Database Schema
The image below shows the database schema. In order to write the ten queries, the two
given Excel files had to be broken down into four separate tables based off of what each table
required. The four tables that were created were Transaction Table, Items Table, Customer
Table, and Coupon Table. The Transaction Table had to include AutoID, TransactionID, ItemID,
CustomerID, Week, Day, StoreID, UnitsSold, and CouponID. AutoID was created by letting
Access create a primary key for the table. AutoID created a number for every tuple in the table to
make each set unique. For Items Table, Item_ID, VendorID, and ItemType were filtered out of
the transaction data set. The customer table that was imported into Access contained all of the
data from the given customer data set. Lastly, Coupon Table contained CouponID,
CouponOrigin, and CouponValueCents. This data was also filtered from the transaction data set.
The next step after importing the tables into Access was to create relationships between the
tables. This was done by relating all tables with primary keys to the Transaction Table.
Essentially, items that were uniquely relatable in both tables were connected. To relate the Items
Table to Transaction Table, Item_ID’s were connected between tables. Since Item_ID is a
primary key in Items Table, the cardinality relationship is one to many from Items Table to
Transaction Table. For Customer Table and Transaction Table Customer ID’s were connected.
Again, the cardinality relationship was one to many from Customer Table to Transaction Table.
Coupon Table was related to Transaction Table through CouponID’s. As was true to the two
other cases, the cardinality relationship from Coupon Table to Transaction Table was one to
many. Once all the tables were connected, a database was built that connected all tables. After
this point, querying could be performed to obtain necessary data.
Snapshots of Tables
Transaction Table
Coupon Table
Items Table
Customer Table
SQL Code for Queries
Query A
Query B
Query C
Query D
Query E
Query F
Query G
Query H
Query I
Query J
Query Results
Query A
Query B
Query C
Query D
Query E
Query F
Query G
Query H
Query I
Query J
Forms
Recommendations
3b
The data set created in query B was first exported from Access to Excel. After plotting
the results of the query in Excel, it was discovered that the sales of item types 1, 5, and 15 from
weeks 614 to 717 are slightly increasing. In order to greater stimulate the growth of sales in these
categories, the stores will need to market the products slightly more and potentially add
promotions. The projections for week 718, using the formula given by Excel, yielded a value of
about 242 units sold. Because of this, inventory needs to be slightly increased to meet the
projections.
Units Sold by Week
y = 0.3314x + 3.6758
400
350
300
250
200
150
100
50
0
600
620
640
660
680
700
720
740
3c
While analyzing different customers and their backgrounds, it was noted that most
customers who have pets tend to be of a higher income level. This was the case for both cats and
dogs. The charts from Excel are displayed below:
# Dogs vs Income Level
y = 0.0648x + 0.059
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
2
4
6
8
10
12
# Cats vs Income Level
y = 0.0186x + 0.1266
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0
2
4
6
8
10
12
Because of these results, the recommendation is that the stores need to begin tailoring pet
products to the wealthier consumer base. The pet products they carry can be priced slightly
higher because the citizens with pets can likely afford it.
3d
The income levels were compared with the amount of transactions after the query for this
section was done. Excel results are below:
Transaction Count vs Income Level
18000
16000
14000
12000
10000
8000
6000
4000
2000
0
0
2
4
6
8
10
12
As the chart shows, income levels 5-8 have a sizably larger number of transactions. This
group is the one that the stores should be targeting as much as possible to continue their heavy
number of purchases. Furthermore, the group 0-3 are making the fewest number of transactions.
Those groups should either be heavily targeted by marketing and deals in an attempt to stimulate
spending, or should not be targeted at all, as their financial situations may not allow them to
make as many purchases.
3h
When analyzing the data after this query, it was easy to see the drastic difference in
coupon value between the stores. Stores 1521 and 1522 need to better promote their coupons and
learn from the success of stores 1542 and 1558, the stores who have much higher coupon values.
By having better marketed deals involving more of the popular store items, they can create a
better value for the coupons.
3j
The numbers of sales for both pizza and soft drinks fluctuate each week. Though they
both reach numbers that are very large, there is little consistency in the values. The stores need to
improve in this regard. Recommendations include Friday promotions or deals for both pizza and
drinks, or marketing targeted towards parties, celebrations, and reunions, where both pizza and
soda are common.