• Designed relational database, da modeling and profiling, create of table and view structure on MS SQL Server
• Developed complex SQL code such as table-level check constraint, Triggers, computed columns, Indexes and Views
• Utilized Tableau to create analytical dashboards pertaining to sales and retailer information making vital decisions and strategic planning of the system.
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Online Retailing Database System on Amazon
1. Online Retailing
System
INFO 6210 Team 1 Final Project Report
Shu-Ya Hsu, Hung-Chih Huang, JunyaoLi,
JialinWang, Yangzi Xin, YiningChen
2. 1 Business Problem
As a platform of Online Retailing System on Amazon,
the purpose of the database is to
• maintain data used for business managers to
purchase goods from vendors or ship directly from
inventory
• track orders’ shipment information
• check inventory value and provide customer
services. The database will be used by executive
managers, and business managers.
7. We created 7 computed columns
• Calculate total price for Order Record and Purchase Order
• Calculate total quantity for Purchase Order
• Calculate net profit, Amazon Fee, and Vendor Price for Product
entity
• Calculate the number of the returned order for each Customer
• We can get all of them automatically based on the inserted
values.
2 Computed Columns
10. 3 Table-level CHECK Constraints for Inventory
• We created a function CheckNoInventory,
and use table-level CHECK constraint to
confirm that we have enough inventory
for each product.
• To do that, we compare the ordered
product quantity with inventory product
quantity.
• If the difference between inventory and
order product quantity is smaller than
zero, meaning the ordered quantity
exceeds the maximum amountin the
inventory, as a result, the system will
decline the insertion of that order.
11.
12. 4 Trigger for Decreasingand Increasing Inventory
• We Created a DML trigger to
update the product inventory
quantity.
• In the decreasing case, if a
purchase is made and the order
status from table order shipment
shows ’Ready’, the trigger will
decrease the product inventory
quantity accordingly.
13.
14. • We also created another
trigger to increase the number
of products in the inventory by
tracking the new insertion in
the TABLE Inventory_FBA
shipment.
15. 5 View of the Top Business Manager and Total Sales
• We created a view of business
managers’ ranking and the
total sales that they have sold.
• The view includes the rank of
sale values and business
manager information
• We used order records related
to the customer to calculate
sum of the total price.
16. View of the Top Business Manager and Total Sales
17. View of the Popularity of Products
• We created a view to evaluate
the popularity of products.
• We defined popularity based
on the number of products sold
and evaluate different
products.
• We calculated the product
quantity of each product that
was purchased by customers.
The result listed popularity,
information of vendors and
total sales.