The Database system is used as a new alternative to the current file based legacy system of a Sporting Goods Store. The store has a strong physical presence in Massachusetts as well a newly established online store. This detailed centralized database system has a wide-ranging functionality and it comprises of Employee Information, Customer Information, Order Details, Inventory Details and Store Locations. Using this information, the objective is to provide statistics based on the data like the most profitable products, best performing employees and store locations such that the business processes can be optimized to maximize efficiency.
Order_Amount is calculated based on Order Quantity and Product Price and loaded into the table.
Invoice amount is calculated using the Order Amount, Tax and Discount and loaded into the table.
It selects the top employee based on number of orders sold by employee.
The procedures determines the products which are sold the most and least times.
It determines the top customer depending on the number of orders.
Order_Type, Total_Orders
Customer_Full_Name, Membership_Points
Calculates and updates the Membership points when an order is purchased by the customer based on their total Order Amount from all their previous Orders.
Encrypts and populates the Employee SSN.
On Employee_Type in the Employee table to check if the value falls under Contractor, Full-time or Part-time categories.
On Employee_Phone_No in the Employee table to check if the length of the phone number is valid.
On Payroll_Type in the Payroll table to check if it falls under Hourly, Weekly or Monthly categories.
On Customer_phone in the Customer table to check if the length of the phone number is valid.