0% found this document useful (0 votes)
25 views

Hawkeye Project Final Report

Uploaded by

rishitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Hawkeye Project Final Report

Uploaded by

rishitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

TERM PROJECT FINAL REPORT

Team: Hawkeye
Team Members:
Name Student ID
Gurupavani Kethepalli (Team Coordinator) 11560379
Nikhitha Goli 11549527
Sai Teja Munja 11591803
Jayanth Krishna Golla 11558056
Likith Chowdary Mallipeddi 11590166

Team Co-ordinator:
Gurupavani Kethepalli
Title of the Project:
A convenience store like 7-11, Circle K, considering the same store database.
Introduction:
The convenience store is a store like 7-11 which is a retail store that sells a range of everyday
items like food, groceries, toiletries, newspapers, soft drinks, ice creams, tobacco products etc.
These stores are mainly located near to the gas stations such that people who stop by for gas
can buy basic needs for travel like water, food etc. The prices charged by these stores is quite
high compared to normal super stores. This is because they buy the smaller quantities at high
unit price from whole sellers. Even though the price is high the people often prefer these stores
because these stores are open for long late hours, available in multiple locations and short
cashier lines.

Scope of the Convenience store database:


The convenience store database is related to the retail industry. It addresses the enterprise
needs which helps the owner of the store and leadership team of the organisation to monitor
the weekly/monthly/yearly product sales of the store, which employee is selling the product,
how many transactions are done for the day, customer details. This helps the organisation to
track the information of the store, maintain efficiency and improve sales performance.
Objectives:
Considering manual recording for transactions, there is always possibility of human error and
missing records for transactions. So, a computerised database helps to store the information,
and retrieve the required monthly or yearly sales, transactions, customer data etc. Also
maintains data consistency and avoids data redundancy. This collects the information as
customer details, employee details, sales, date of purchase, store location etc.
User Requirements:
 User can buy multiple products
 No promotional codes/discounts provided
 Single transaction entry records details of the customer, products purchased, price
and date.
 Store manager should be able to insert, update and delete the product information.
 User should be able to monitor daily/weekly/monthly/yearly sales.
 User should be able to monitor sales at store location level.
 The system should store details of transactions, employee details without any
ambiguity.
 Front Desk Employee should not have access to modify customer, product, and
Employee details.
 It provides a computerized system for maintaining records of the products and the
customers.
 It is user-friendly and it is used to improve efficiency in recording for each
transaction

DB Preference:
The system preferred for creating a database is Relational database management system
(RDBMS) - MySQL database using SQL workbench. For visual representation will be using
ERD with crow’s foot notation.
Business rules:
 A store can be in multiple locations.
 Each Location can have multiple sales done.
 Each store is managed by multiple employees under one manager.
 A brand can have multiple products.
 A customer can buy multiple products.
 Each customer should be uniquely identified.
 A product may appear in several transaction records and may be included in
numerous transactions.
 An order should have at least one product.
 Vendor supplies multiple products to the store
 Sale Price is calculated based on quantity sold and price of single product.
 Date cannot be NULL

ERD:

Data Dictionary:
Database Requirements:
Considering the RDBMS, creating the required entities that serve as a database for a
convenience store. The tables created are Customer table, Employee table, Product table,
ProductBrand table, Sale table, SaleItem table, StoreLocation table, and Vendor table.
Database Structure View:
Entity Generation and Data Entry:
1. Customer Table:
The created Customer table is for maintaining customer records who purchase
products in the convenience store.

 Initially the table is created in RDMS with name ‘Customer’ with command
CREATE TABLE ‘Customer’ with the required fields.
 Then inserted the values in the Customer entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM
Customer.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.

Create Table Statements for Customer Entity:


CREATE TABLE `Customer` (
`CustomerID` int NOT NULL,
`FirstName` varchar(50) NOT NULL,
`LastName` varchar(50) NOT NULL,
`EmailID` varchar(50) NOT NULL,
`PhoneNumber` varchar(15) NOT NULL,
PRIMARY KEY (`CustomerID`);
)
Inserting the values:
INSERT INTO `Customer` (`CustomerID`, `FirstName`, `LastName`, `EmailID`,
`PhoneNumber`) VALUES
(1201, 'James', 'Wilmington', '[email protected]', '721-110-3245'),
(1202, 'Mike', 'Lamb', '[email protected]', '425-678-2672'),
(1203, 'Sherlock', 'Flames', '[email protected]', '434-231-7750'),
(1204, 'Ethan', 'Thomas', '[email protected]', '415-666-875'),
(1205, 'Ava', 'Millar', '[email protected]', '166-789-3436'),
(1206, 'Charlotte', 'Jones', '[email protected]', '205-655-7890'),
(1207, 'Emma', 'Martin', '[email protected]', '773-051-6894'),
(1208, 'Aria', 'Smith', '[email protected]', '490-254-9821'),
(1209, 'Amritha', 'Araji', '[email protected]', '910-096-4520'),
(1210, 'Robert', 'Henry', '[email protected]', '141-489-0431'),
(1211, 'Charlie', 'Peters', '[email protected]', '468-437-8721'),
(1212, 'John', 'Botts', '[email protected]', '205-368-0924'),
(1213, 'Rocky', 'Kwon', '[email protected]', '212-880-5642'),
(1214, 'Grayson', 'Wood', '[email protected]', '213-649-7650'),
(1215, 'Abhijith', 'Jacksone', '[email protected]', '447-124-6803');
Result:

Question:
Show the details of the customer whose last name is ‘Martin’.
Query:
Result:

Explanation:
This query statement helps us to get the customer information whose last name is
Martin. When ever there is a need of getting customer details like while billing these
queries are helpful.

2. Employee Table:
The created Employee table is for maintaining employee records who helps in billing
the customer purchased products in the convenience store.

 Initially the table is created in RDMS with name ‘Employee’ with command
CREATE TABLE ‘Employee’ with the required fields.
 Then inserted the values in the Employee entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM
Employee.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.

Create Table Statements for Employee Entity:


CREATE TABLE `Employee` (
`EmpoyeeID` int NOT NULL,
`FirstName` varchar(50) NOT NULL,
`LastName` varchar(50) NOT NULL,
`EmailID` varchar(50) NOT NULL,
`Address` varchar(100) NOT NULL,
`PhoneNumber` varchar(15) NOT NULL,
`Salary` int NOT NULL,
`StoreLocationID` int NOT NULL,
`ManagerID` int NOT NULL
PRIMARY KEY (`EmployeeID`);
)

Inserting the values:


INSERT INTO `Employee` (`EmpoyeeID`, `FirstName`, `LastName`, `EmailID`,
`Address`, `PhoneNumber`, `Salary`, `StoreLocationID`, `ManagerID`) VALUES
(1301, 'Tony', 'Jackson', '[email protected]', '401 NORTHWEST HWY
IRVING, TX 75039', '310-243-7810', 56000, 1801, 1391),
(1302, 'Richard', 'Dean', '[email protected]', '729 Prince Ave. Angleton, TX
77515', '701-356-8921', 65000, 1801, 1391),
(1303, 'Justin', 'Paul', '[email protected]', '8244 Ocean Drive Euless, TX 76039',
'141-456-7892', 72000, 1801, 1391),
(1304, 'Jayson', 'Marker', '[email protected]', '1 Princess Ave. Fort
Worth, TX 76133', '555-438-0928', 55000, 1802, 1392),
(1305, 'Tony', 'Joe', '[email protected]', '51 Young Road Baytown, TX 77520',
'409-451-0765', 67000, 1802, 1392),
(1306, 'Lucas', 'Hill', '[email protected]', '107 Woodsman St. McAllen, TX
78501', '605-408-5749', 76000, 1802, 1392),
(1307, 'Nancy', 'Taylor', '[email protected]', '99 La Sierra
Street\r\nFriendswood, TX 77546', '490-831-7600', 45000, 1803, 1393),
(1308, 'Steve', 'Wheeler', '[email protected]', '107 Woodsman
St.\r\nMcAllen, TX 78501', '555-362-7521', 37000, 1803, 1393),
(1309, 'Mike', 'Wright', '[email protected]', '701 CHESTNUT ST
DENISON TX 75021', '612-200-8788', 75000, 1803, 1393),
(1310, 'Will', 'Brown', '[email protected]', '501 TRINITY ST GILMER TX
75644', '910-670-4523', 46000, 1804, 1394),
(1311, 'Dustin', 'Perrson', '[email protected]', '3100 SANDY CREEK RD
QUINLAN, TX 75474', '425-001-5621', 55000, 1804, 1394),
(1312, 'Johnathan', 'Mark', '[email protected]', '4200 FM 2666 RD
SHEPHERD , TX 77371', '847-156-8486', 65000, 1804, 1394),
(1313, 'Anderson', 'Harris', '[email protected]', '701 COUNTY ROAD
1152 WOODVILLE , TX 75979', '314-456-7021', 67000, 1805, 1395),
(1314, 'Davis', 'Miller', '[email protected]', '3701 NASA PKWY SEABROOK
,\r\nTX 77586', '316-999-2645', 55000, 1805, 1395),
(1315, 'Stanford', 'Lilly', '[email protected]', '6600 AUTUMNWOOD DR
ARLINGTON , TX 76016', '847-368-1642', 56500, 1805, 1395),
(1391, 'Derik', 'Alex', '[email protected]', '402 NORTHEAST HWK DENTON,
TX 75039', '310-286-7816', 80000, 1801, 0),
(1392, 'Rita', 'Carol', '[email protected]', '226 Cactus Avenue Nacogdoches, TX
75961', '555-489-0630', 76527, 1802, 0),
(1393, 'Albritge', 'Benjimen', '[email protected]', '5 Lakeview Drive
Amarillo, TX 79106', '409-111-7430', 74500, 1803, 0),
(1394, 'Crosby', 'Julin', '[email protected]', '11 Baker Court El Paso, TX
79905', '701-555-9999', 77900, 1804, 0),
(1395, 'Alice', 'Thimas', '[email protected]', '414 Gregory Ave. Waxahachie,
TX 75165', '316-455-6240', 79500, 1805, 0);

Note: The Manager ID for managers is given as 0 as they are also employees, and
they are given with Employee ID but not Manager ID
Result:
Questions:
1. Show the details of the Employee whose ManagerID is ‘1391’.
Query:

Result:
Explanation:
This query statement helps us to get the Employee information whose ManagerID
is 1391.
2. Show the details of the Employee whose EmailID ends with @store.com
Query:

Result:

Explanation:
This query statement helps us to get the Employee information whose Email ends
with @store.com.

3. Show the details of the Employee whose Salary is between 30000 and 50000:
Query:

Result:

Explanation:

This query statement helps us to get the Employee information whose Salary is
between 30000 and 50000.
3. Product Table:

The created Product table will appear in several transaction records and included in
numerous transactions in the convenience store.

Initially the table is created in RDMS with name ‘Product’ with command CREATE
TABLE ‘Product’ with the required fields.
 Then inserted the values in the Product entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM Product.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.
Create Table Statements for Product Entity:
CREATE TABLE `Product` (
`ProductID` int NOT NULL,
`ProductName` varchar(50) NOT NULL,
`Price` float NOT NULL,
`ProductDescription` varchar(200) NOT NULL,
`Category` varchar(50) NOT NULL,
`VendorID` int NOT NULL,
`ProductBrandID` int NOT NULL
PRIMARY KEY (`ProductID`);
)
Inserting the values:
INSERT INTO `Product` (`ProductID`, `ProductName`, `Price`, `ProductDescription`,
`Category`, `VendorID`, `ProductBrandID`) VALUES
(1401, 'Butter Croissant', '1.29', 'Breakfast', 'Food', '1901', '1501'),
(1402, 'Walnut Fudge Brownie', '1.89', 'Desserts', 'Food', '1902', '1502'),
(1403, 'Mango Cup with Tajin', '3.29', 'Fruits & Veggies', 'Food', '1903', '1502'),
(1404, 'Simply Orange Juice 52oz', '5.49', 'Juice', 'Drinks', '1901', '1501'),
(1405, 'Smart Water 1L', '2.99', 'Water', 'Drinks', '1902', '1502'),
(1406, 'Gatorade Lemon Lime 28oz', '2.99', 'Sports Drink', 'Drinks', '1903', '1501'),
(1407, 'Xtra Detergent Tropical Passion 45oz', '4.29', 'Cleaning', 'Household', '1904',
'1504'),
(1408, 'Energizer Max AA 8 pack ', '12.99', 'Electronics', 'Household', '1905', '1505'),
(1409, 'Bounty Paper Towels 36 Count', '2.49', 'Paper, Plastic & Essentials',
'Household', '1903', '1503'),
(1410, 'Kings Hawaiian Sweet Rolls 4.4oz', '1.89', 'BREAD', 'Grocery', '1903', '1503'),
(1411, 'Nutella 13oz', '4.49', 'PANTRY', 'Grocery', '1904', '1504'),
(1412, 'DairyPure Whole Milk 1 Gallon', '5.29', 'Dairy Products', 'Grocery', '1905',
'1505'),
(1413, 'LD Carmex Tube .35oz', '2.49', 'Beauty Products', 'Personal Care', '1903',
'1503'),
(1414, 'Dove White Bar 3.17oz', '2.99', 'Bath & Body', 'Personal care', '1904', '1503'),
(1415, 'Listerine Cool Mint 8.5oz', '5.49', 'Grooming', 'Personal care', '1905', '1505');

Result:
Question:
Show the details of the Product whose Category is ‘Food’.
Query:

Result:

Explanation:
This query statement helps us to get the information about Product whose Category is
Food. Whenever there is a need of getting Product details like above these queries are
helpful.

4. ProductBrand Table:
The created ProductBrand table is for having multiple products in the convenience
store.

Initially the table is created in RDMS with name ‘ProductBrand’ with command
CREATE TABLE ‘ProductBrand’ with the required fields.
 Then inserted the values in the ProductBrand entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM
ProductBrand.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.

Create Table Statements for ProductBrand Entity:


CREATE TABLE `ProductBrand` (
`ProductBrandID` int NOT NULL,
`BrandName` varchar(50) NOT NULL,
PRIMARY KEY (`ProductBrandID`);
)
Inserting the values:
INSERT INTO `ProductBrand` (`ProductBrandID`, `BrandName`) VALUES
(1501, 'Signature Select'),
(1502, 'GreatValue'),
(1503, 'Scott'),
(1504, 'Kirkland'),
(1505, 'WinCo'),

Result:

Question:
What is the name of the ProductBrand whose BrandID is ‘1501’.
Query:

Result:

Explanation:
This query statement helps us to get the information about ProductBrand whose
BrandName is Signature Select. Whenever there is a need of getting ProductBrand
details like above, these queries are helpful.

5. Sale Table:
The created Sale table is for maintaining Sale records of the convenience store.

 Initially the table is created in RDMS with name ‘Sale’ with command
CREATE TABLE ‘Sale’ with the required fields.
 Then inserted the values in the Sale entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM Sale.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.

Create Table Statements for Sale Entity:

CREATE TABLE `Sale` (


`SaleID` int NOT NULL,
`CustomerID` int NOT NULL,
`EmployeeID` int NOT NULL,
`Date` date NOT NULL,
PRIMARY KEY ‘SaleID’;
)
Inserting the values:
INSERT INTO `Sale` (`SaleID`, `CustomerID`, `EmployeeID`, `Date`) VALUES
(1601, 1201, 1301, '2021-01-07'),
(1602, 1204, 1301, '2021-01-27'),
(1603, 1211, 1301, '2021-02-02'),
(1604, 1207, 1304, '2021-03-23'),
(1605, 1203, 1304, '2021-04-02'),
(1606, 1201, 1302, '2021-05-28'),
(1607, 1208, 1301, '2021-06-07'),
(1608, 1203, 1308, '2021-08-08'),
(1609, 1214, 1311, '2021-09-03'),
(1610, 1212, 1304, '2021-10-02'),
(1611, 1204, 1313, '2021-10-27'),
(1612, 1209, 1303, '2021-11-12'),
(1613, 1206, 1302, '2021-11-19'),
(1614, 1201, 1314, '2021-12-14'),
(1615, 1207, 1306, '2021-12-31'),
(1616, 1202, 1303, '2022-01-03'),
(1617, 1205, 1305, '2022-01-20'),
(1618, 1210, 1307, '2022-02-10'),
(1619, 1213, 1309, '2022-03-16'),
(1620, 1215, 1310, '2023-04-18'),
(1621, 1203, 1304, '2023-05-08'),
(1622, 1209, 1314, '2022-06-02'),
(1623, 1211, 1309, '2022-07-21'),
(1624, 1215, 1305, '2022-08-15'),
(1625, 1206, 1310, '2022-09-23');
Result:
Question
Show the number of transactions made by Customer whose ID is 1201 and year of
purchase is 2021.
Query:

Result:
Explanation:
This query statement helps us to get the number of transactions made by customer
whose Id is 1201

6. SaleItem Table:
The created SaleItem table is for maintaining SaleItem records of the convenience
store.

 Initially the table is created in RDMS with name ‘SaleItem’ with command
CREATE TABLE ‘SaleItem’ with the required fields.
 Then inserted the values in the SaleItem entity with help of INSERT INTO
VALUES.
 The inserted values can be displayed with the query SELECT * FROM
SaleItem.
 To edit the table for adding a row, we can use INSERT INTO TABLE NAME
command.

Create Table Statements for SaleItem Entity:


CREATE TABLE `SaleItem` (
`SaleID` int NOT NULL,
`ProductID` int NOT NULL,
`QuantitySold` int NOT NULL,
`SalePrice` float NOT NULL;
)

Inserting the values:


INSERT INTO `SaleItem` (`SaleID`, `ProductID`, `QuantitySold`, `SalePrice`)
VALUES
(1601, 1401, 2, 2.58),
(1602, 1404, 1, 5.49),
(1603, 1407, 1, 4.29),
(1604, 1402, 5, 9.45),
(1605, 1413, 2, 4.98),
(1606, 1402, 2, 3.78),
(1607, 1401, 5, 6.45),
(1608, 1414, 3, 8.97),
(1609, 1409, 2, 4.98),
(1610, 1403, 4, 13.16),
(1611, 1401, 3, 3.87),
(1612, 1413, 1, 2.49),
(1613, 1407, 1, 4.29),
(1614, 1404, 1, 5.49),
(1615, 1415, 3, 16.47),
(1616, 1410, 2, 3.78),
(1617, 1408, 1, 12.99),
(1618, 1414, 2, 4.58),
(1619, 1405, 2, 5.98),
(1620, 1413, 3, 7.47),
(1621, 1415, 1, 5.49),
(1622, 1402, 6, 11.34),
(1623, 1403, 5, 16.45),
(1624, 1409, 3, 7.47),
(1625, 1415, 2, 10.98);

Result:
Question:
Show all the details in the SaleItem table, where the quantity sold for the product is
more than 2 and less than or equal to 4
Query:

Result:
Explanation:
This query statement helps us to get the details of the product sold in the quantity
more than 2 and less than 5.

7. StoreLocation Table:

The Store location table helps to maintain the information regarding the multiple store
locations where the convenience store is located.

Create Table Statements for StoreLocation Entity :-

CREATE TABLE `StoreLocation` (

`StoreLocationID` int NOT NULL,

`Address` varchar(100) NOT NULL,


‘City’ varchar(25) NOT NULL,

‘State’ varchar(25) NOT NULL,

‘ZipCode’ varchar(15) NOT NULL,

PRIMARY KEY (`StoreLocationID`);

Inserting the values:

INSERT INTO `StoreLocation` (`StoreLocationID`, `Address`, `City`, `State`,


‘ZipCode’) VALUES

(1801, ‘915 FT WORTH DR’, ‘Denton’, ‘TX’, ‘76205’ ),


(1802, ‘4340 Blvd ste a’, ‘Harry Hines’, ‘TX’, ‘75219’ ),
(1803, ‘3128 McKinney Ave’, ‘Dallas’, ‘TX’, ‘75204’ ),
(1804, ‘ 1010 Ross Ave’, ‘Dallas’, ‘TX’, ‘75202’ ),
(1805, ‘7215 Custer Rd’, ‘Frisco’, ‘TX’, ‘75035’ );

Result :-

Question:

Show the details of store location which is in Denton.

Query:

Result:

Explanation :-

This query statement helps us to get the store location information whose Store is in
Denton.
8. Vendor Table:

This table helps to store the information related to vendors who supplies products.

Create Table Statements for Vendor Entity :-


CREATE TABLE `Vendor` (
`VendorID` int NOT NULL,
`FirstName` varchar(50 NOT NULL,
`LastName` varchar(50) NOT NULL,
`Address` varchar(100) NOT NULL,
`PhoneNumber` varchar(15) NOT NULL,
PRIMARY KEY (`VendorID`);
)

Inserting the values:

INSERT INTO `Vendor` (`VendorID`, `FirstName`, `LastName`, `Address`,


`PhoneNumber`) VALUES
(1901, 'Rachel', 'Wilson', '3230 W Mockingbird Ln Dallas, TX 75235', '(214) 352-
3847'),
(1902, 'Howard ', 'Rose', '2111 W Mockingbird Ln Dallas, TX 75235', '(214) 357-
8365'),
(1903, 'Anthony', 'Corey', '12505 Nortwest Hwy Dallas, TX 75228', '(972) 613-4537'),
(1904, 'Heather', 'Javier', '2801 N Fitzhugh Ave Dallas, TX 75204', '(914) 887-0714'),
(1905, 'Elizabeth ', 'Dan', '8424 Preston Rd Dallas, TX 75225', '(214) 691-0120');

Result :-
Update:
Updated the phone number for the vendor, having vendor ID 1902.

Question:

Get the area code of each vendor along with their ID.

Query:

Result:

Explanation:

This query helps to retrieve the area code of the vendors.


Results that can be drawn from our convenience store database:

1. Get the Customer first name, last name along with sale price, who made the sale
more than 10 dollars.

Result:

Explanation:
This query helps us to know the names of customers who made high sale in the store,
such that any offers or coupons can be provided during billing time.

2. Get the Scott brand Product name, price and category sold by Anthony.

Result:
Explanation:
This result helps us to know the Scott brand product details which are sold by vendor
Anthony.

3. Get the monthly sales for all the products purchased through VendorID 1903

Result:

Explanation:
This result help us to know the monthly sale price of all products that are sold by
vendor id 1903.
4. Get the count of employees under each manager.

Result:

Explanation:

Here we get the total number of employees under each manager. So, we have 3
employees under each manager and there is total 5 managers. Also, in ‘WHERE’
condition considered the ManagerID != 0, because the manager will have the
employee id but not manager id as manager is also one of the employees. So, in
database under ManagerID column for manager the EmployeeID is considered and
ManagerID is 0.

5. Show the maximum SalePrice in each store location along with employee name
who sold it.

Result:
Explanation:
With help of this results, we can know the maximum sale happened in each store
along with the employee’s name who sold.

You might also like