0% found this document useful (0 votes)
13 views11 pages

BDM - CP5

The document describes a system to collect and analyze customer feedback on products. It outlines the key entities like Customer, Product, Feedback and their attributes. It also describes the relationships between entities and provides the ER diagram and SQL queries to create tables and insert sample data.

Uploaded by

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

BDM - CP5

The document describes a system to collect and analyze customer feedback on products. It outlines the key entities like Customer, Product, Feedback and their attributes. It also describes the relationships between entities and provides the ER diagram and SQL queries to create tables and insert sample data.

Uploaded by

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

BUSINESS DATA MANAGEMENT

CLASS PARTICIPATION – 5

A Report submitted in the partial fulfillment of the requirements for the


degree of
Master of Business Administration

BY,
SHARA GEORGE VAIDIAN – 2327848

Under the guidance of

PROF. BINDHIA JOJI

MBA PROGRAMME
SCHOOL OF BUSINESS AND MANAGEMENT
CHRIST (DEEMED TO BE UNIVERSITY),BANGALORE

MARCH 2024
The Product Feedback Analysis System aims to systematically collect, analyze, and respond to customer
feedback on products to enhance product quality, customer satisfaction, and inform product development
strategies.

An inefficient and disorganized system for analyzing customer feedback causes these issues:
 Missing or forgetting valuable insights from customers due to disorganized collection.
 Spending a lot of time analyzing large amounts of unstructured feedback, making it hard to spot
common issues or preferences.
 Struggling to handle a large volume of individual feedback points.
 Difficulty making informed decisions about product improvements and future strategies due to
unclear insights from feedback.

Entities:

1. Customer
 Customer_ID
 Name
 Email
 Registration_Date

2. Product
 Product_ID
 Name
 Category
 Price

3. Feedback
 Feedback_ID
 Customer_ID
 Product_ID
 Rating
 Category
 Comment
 Date

4. Category
 Category_ID
 Name

5. SalesData
 Transaction_ID
 Customer_ID
 Product_ID
 Quantity
 Unit_Price
 Total_Price
 Transaction_Date
Relationships:

•One customer provide many feedbacks.


•One product has many feedbacks.
•One product belongs to one category.
•One SalesData is recorded for One Product.

E-R Diagram:

Creation of tables:

 Customer

mysql> CREATE TABLE customer (


-> customer_id INT PRIMARY KEY,
-> name VARCHAR(100),
-> email VARCHAR(100),
-> registration_date DATE
-> );
Query OK, 0 rows affected (0.11 sec)

mysql> describe customer;


+-------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------+-------+
| customer_id | int | NO | PRI | NULL | |
| name | varchar(100) | YES | | NULL | |
| email | varchar(100) | YES | | NULL | |
| registration_date | date | YES | | NULL | |
+-------------------+--------------+------+-----+---------+-------+
4 rows in set (0.04 sec)
 Product

mysql> CREATE TABLE product (


-> product_id INT PRIMARY KEY,
-> name VARCHAR(100),
-> category VARCHAR(50),
-> price DECIMAL(10, 2)
-> );
Query OK, 0 rows affected (0.02 sec)

mysql> describe product;


+------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------+------+-----+---------+-------+
| product_id | int | NO | PRI | NULL | |
| name | varchar(100) | YES | | NULL | |
| category | varchar(50) | YES | | NULL | |
| price | decimal(10,2) | YES | | NULL | |
+------------+---------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

 Feedback

mysql> CREATE TABLE feedback (


-> feedback_id INT PRIMARY KEY,
-> customer_id INT,
-> product_id INT,
-> rating INT,
-> category VARCHAR(50),
-> comment TEXT,
-> date DATE,
-> FOREIGN KEY (customer_id) REFERENCES customer(customer_id),
-> FOREIGN KEY (product_id) REFERENCES product(product_id)
-> );
Query OK, 0 rows affected (0.03 sec)

mysql> describe feedback;


+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| feedback_id | int | NO | PRI | NULL | |
| customer_id | int | YES | MUL | NULL | |
| product_id | int | YES | MUL | NULL | |
| rating | int | YES | | NULL | |
| category | varchar(50) | YES | | NULL | |
| comment | text | YES | | NULL | |
| date | date | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
7 rows in set (0.00 sec)

 Category

mysql> CREATE TABLE category (


-> category_id INT PRIMARY KEY,
-> name VARCHAR(50)
-> );
Query OK, 0 rows affected (0.02 sec)

mysql> describe category;


+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| category_id | int | NO | PRI | NULL | |
| name | varchar(50) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

 Sales data

mysql> CREATE TABLE sales_data (


-> transaction_id INT PRIMARY KEY,
-> customer_id INT,
-> product_id INT,
-> quantity INT,
-> unit_price DECIMAL(10, 2),
-> total_price DECIMAL(10, 2),
-> transaction_date DATE,
-> FOREIGN KEY (customer_id) REFERENCES customer(customer_id),
-> FOREIGN KEY (product_id) REFERENCES product(product_id)
-> );
Query OK, 0 rows affected (0.03 sec)

mysql> describe sales_data;


+------------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------+------+-----+---------+-------+
| transaction_id | int | NO | PRI | NULL | |
| customer_id | int | YES | MUL | NULL | |
| product_id | int | YES | MUL | NULL | |
| quantity | int | YES | | NULL | |
| unit_price | decimal(10,2) | YES | | NULL | |
| total_price | decimal(10,2) | YES | | NULL | |
| transaction_date | date | YES | | NULL | |
+------------------+---------------+------+-----+---------+-------+
7 rows in set (0.01 sec)

Insert Statements:

Customer table:

mysql> INSERT INTO customer (customer_id, name, email, registration_date)


-> VALUES
-> (1, 'John', '[email protected]', '2023-01-01'),
-> (2, 'Aarcha', '[email protected]', '2023-02-15'),
-> (3, 'Michael', '[email protected]', '2023-03-20'),
-> (4, 'Emily', '[email protected]', '2023-04-10');
Query OK, 4 rows affected (0.06 sec)
Records: 4 Duplicates: 0 Warnings: 0

mysql> select * from customer;


+-------------+---------+--------------------------+-------------------+
| customer_id | name | email | registration_date |
+-------------+---------+--------------------------+-------------------+
| 1 | John | [email protected] | 2023-01-01 |
| 2 | Aarcha | [email protected] | 2023-02-15 |
| 3 | Michael | [email protected] | 2023-03-20 |
| 4 | Emily | [email protected] | 2023-04-10 |
+-------------+---------+--------------------------+-------------------+
4 rows in set (0.01 sec)

Product Table:

mysql> INSERT INTO product (product_id, name, category, price)


-> VALUES
-> (101, 'Laptop', 'Electronics', 1200.00),
-> (102, 'Headphones', 'Electronics', 100.00),
-> (103, 'T-Shirt', 'Clothing', 20.00),
-> (104, 'Jeans', 'Clothing', 50.00),
-> (105, 'Smartphone', 'Electronics', 800.00);
Query OK, 5 rows affected (0.02 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql> select * from product;


+------------+------------+-------------+---------+
| product_id | name | category | price |
+------------+------------+-------------+---------+
| 101 | Laptop | Electronics | 1200.00 |
| 102 | Headphones | Electronics | 100.00 |
| 103 | T-Shirt | Clothing | 20.00 |
| 104 | Jeans | Clothing | 50.00 |
| 105 | Smartphone | Electronics | 800.00 |
+------------+------------+-------------+---------+
5 rows in set (0.00 sec)

Feedback table:

mysql> INSERT INTO feedback (feedback_id, customer_id, product_id, rating, category, comment, date)
-> VALUES
-> (1, 1, 101, 5, 'Electronics', 'Great product, highly recommended', '2023-01-05'),
-> (2, 2, 102, 4, 'Electronics', 'Good quality headphones', '2023-02-20'),
-> (3, 3, 103, 3, 'Clothing', 'Average quality t-shirt', '2023-03-25'),
-> (4, 1, 101, 5, 'Electronics', 'Excellent service and product', '2023-04-01'),
-> (5, 4, 104, 2, 'Clothing', 'Poor fitting jeans', '2023-04-05');
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql> select * from feedback;


+-------------+-------------+------------+--------+-------------+-----------------------------------+------------+
| feedback_id | customer_id | product_id | rating | category | comment | date |
+-------------+-------------+------------+--------+-------------+-----------------------------------+------------+
| 1| 1| 101 | 5 | Electronics | Great product, highly recommended | 2023-01-05 |
| 2| 2| 102 | 4 | Electronics | Good quality headphones | 2023-02-20 |
| 3| 3| 103 | 3 | Clothing | Average quality t-shirt | 2023-03-25 |
| 4| 1| 101 | 5 | Electronics | Excellent service and product | 2023-04-01 |
| 5| 4| 104 | 2 | Clothing | Poor fitting jeans | 2023-04-05 |
+-------------+-------------+------------+--------+-------------+-----------------------------------+------------+
5 rows in set (0.00 sec)

Category table:

mysql> INSERT INTO category (category_id, name)


-> VALUES
-> (1, 'Electronics'),
-> (2, 'Clothing'),
-> (3, 'Home & Kitchen'),
-> (4, 'Books'),
-> (5, 'Sports & Outdoors');
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql> select * from category;


+-------------+-------------------+
| category_id | name |
+-------------+-------------------+
| 1 | Electronics |
| 2 | Clothing |
| 3 | Home & Kitchen |
| 4 | Books |
| 5 | Sports & Outdoors |
+-------------+-------------------+
5 rows in set (0.00 sec)

Sales data table:

mysql> INSERT INTO sales_data (transaction_id, customer_id, product_id, quantity, unit_price, total_price, transaction_date)
-> VALUES
-> (1, 1, 101, 2, 1200.00, 2400.00, '2023-01-05'),
-> (2, 2, 102, 1, 100.00, 100.00, '2023-02-20'),
-> (3, 3, 103, 3, 20.00, 60.00, '2023-03-25'),
-> (4, 1, 101, 1, 1200.00, 1200.00, '2023-04-01'),
-> (5, 4, 104, 2, 50.00, 100.00, '2023-04-05');
Query OK, 5 rows affected (0.02 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql> select * from sales_data;


+----------------+-------------+------------+----------+------------+-------------+------------------+
| transaction_id | customer_id | product_id | quantity | unit_price | total_price | transaction_date |
+----------------+-------------+------------+----------+------------+-------------+------------------+
| 1| 1| 101 | 2 | 1200.00 | 2400.00 | 2023-01-05 |
| 2| 2| 102 | 1 | 100.00 | 100.00 | 2023-02-20 |
| 3| 3| 103 | 3| 20.00 | 60.00 | 2023-03-25 |
| 4| 1| 101 | 1 | 1200.00 | 1200.00 | 2023-04-01 |
| 5| 4| 104 | 2| 50.00 | 100.00 | 2023-04-05 |
+----------------+-------------+------------+----------+------------+-------------+------------------+
5 rows in set (0.00 sec)

mysql>

15 POTENTIAL PROBLEMS IN AN E-COMMERCE DOMAIN RELATED TO PRODUCT FEEDBACK ANALYSIS

1. Identifying most reviewed products:

mysql> SELECT product_id, COUNT(*) AS review_count


-> FROM feedback
-> GROUP BY product_id
-> ORDER BY review_count DESC
-> LIMIT 10;
+------------+--------------+
| product_id | review_count |
+------------+--------------+
| 101 | 2|
| 102 | 1|
| 103 | 1|
| 104 | 1|
+------------+--------------+
4 rows in set (0.01 sec)

2. Calculating average rating for each product:

mysql> SELECT product_id, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY product_id;
+------------+------------+
| product_id | avg_rating |
+------------+------------+
| 101 | 5.0000 |
| 102 | 4.0000 |
| 103 | 3.0000 |
| 104 | 2.0000 |
+------------+------------+
4 rows in set (0.01 sec)

3. Finding products with low rating

mysql> SELECT product_id, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY product_id
-> HAVING avg_rating < 3.5;
+------------+------------+
| product_id | avg_rating |
+------------+------------+
| 103 | 3.0000 |
| 104 | 2.0000 |
+------------+------------+
2 rows in set (0.00 sec)

4. Identifying products with high positive feedback:

mysql> SELECT product_id, COUNT(*) AS positive_feedback_count


-> FROM feedback
-> WHERE rating > 4
-> GROUP BY product_id
-> ORDER BY positive_feedback_count DESC
-> LIMIT 10;
+------------+-------------------------+
| product_id | positive_feedback_count |
+------------+-------------------------+
| 101 | 2|
+------------+-------------------------+
1 row in set (0.00 sec)

5. Finding products with no feedback:

mysql> SELECT product_id


-> FROM product
-> WHERE product_id NOT IN (SELECT DISTINCT product_id FROM feedback);
+------------+
| product_id |
+------------+
| 105 |
+------------+
1 row in set (0.01 sec)
6. Calculating overall satisfaction rate:

mysql> SELECT AVG(rating) AS overall_satisfaction_rate


-> FROM feedback;
+---------------------------+
| overall_satisfaction_rate |
+---------------------------+
| 3.8000 |
+---------------------------+
1 row in set (0.00 sec)

7. Identifying customers with most reviews:

mysql> SELECT customer_id, COUNT(*) AS review_count


-> FROM feedback
-> GROUP BY customer_id
-> ORDER BY review_count DESC;
+-------------+--------------+
| customer_id | review_count |
+-------------+--------------+
| 1| 2|
| 2| 1|
| 3| 1|
| 4| 1|
+-------------+--------------+
4 rows in set (0.00 sec)

8. Calculate average rating given by each customer

mysql> SELECT customer_id, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY customer_id;
+-------------+------------+
| customer_id | avg_rating |
+-------------+------------+
| 1 | 5.0000 |
| 2 | 4.0000 |
| 3 | 3.0000 |
| 4 | 2.0000 |
+-------------+------------+
4 rows in set (0.01 sec)

9. Identifying customers with consistently low ratings:

mysql> SELECT customer_id, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY customer_id
-> HAVING avg_rating < 3.5;
+-------------+------------+
| customer_id | avg_rating |
+-------------+------------+
| 3 | 3.0000 |
| 4 | 2.0000 |
+-------------+------------+
2 rows in set (0.01 sec)
10. Finding customers who haven’t given ratings recently:

mysql> SELECT customer_id


-> FROM customer
-> WHERE customer_id NOT IN (
-> SELECT DISTINCT customer_id
-> FROM feedback
-> WHERE date >= DATE_SUB(NOW(), INTERVAL 3 MONTH)
-> );
+-------------+
| customer_id |
+-------------+
| 1|
| 2|
| 3|
| 4|
+-------------+
4 rows in set (0.02 sec)

11. Identifying the most common feedback categories:

mysql> SELECT category, COUNT(*) AS feedback_count


-> FROM feedback
-> GROUP BY category
-> ORDER BY feedback_count DESC;
+-------------+----------------+
| category | feedback_count |
+-------------+----------------+
| Electronics | 3|
| Clothing | 2|
+-------------+----------------+
2 rows in set (0.01 sec)

12. Calculate average rating for each feedback category:

mysql> SELECT category, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY category;
+-------------+------------+
| category | avg_rating |
+-------------+------------+
| Electronics | 4.6667 |
| Clothing | 2.5000 |
+-------------+------------+
2 rows in set (0.01 sec)

13. Identify products with most positive feedback in each category:

mysql> SELECT category, product_id, AVG(rating) AS avg_rating


-> FROM feedback
-> GROUP BY category, product_id
-> ORDER BY avg_rating DESC;
+-------------+------------+------------+
| category | product_id | avg_rating |
+-------------+------------+------------+
| Electronics | 101 | 5.0000 |
| Electronics | 102 | 4.0000 |
| Clothing | 103 | 3.0000 |
| Clothing | 104 | 2.0000 |
+-------------+------------+------------+
4 rows in set (0.00 sec)

14. Identifying Products with the Highest Average Purchase Quantity:

mysql> SELECT product_id, AVG(quantity) AS avg_purchase_quantity


-> FROM sales_data
-> GROUP BY product_id
-> ORDER BY avg_purchase_quantity DESC;
+------------+-----------------------+
| product_id | avg_purchase_quantity |
+------------+-----------------------+
| 103 | 3.0000 |
| 104 | 2.0000 |
| 101 | 1.5000 |
| 102 | 1.0000 |
+------------+-----------------------+
4 rows in set (0.00 sec)

15. Finding Customers with the Highest Total Purchase Amount:

mysql> SELECT customer_id, SUM(total_price) AS total_purchase_amount


-> FROM sales_data
-> GROUP BY customer_id
-> ORDER BY total_purchase_amount DESC
-> LIMIT 10;
+-------------+-----------------------+
| customer_id | total_purchase_amount |
+-------------+-----------------------+
| 1| 3600.00 |
| 2| 100.00 |
| 4| 100.00 |
| 3| 60.00 |
+-------------+-----------------------+
4 rows in set (0.01 sec)

Conclusion:

The Product Feedback Analysis System is vital for businesses to handle customer feedback effectively.
Challenges from an inefficient system highlight the need for a structured approach, with the Entity-
Relationship (ER) diagram offering a practical solution for organized data. By understanding the importance
of product feedback and its benefits, businesses can enhance products, customer satisfaction, marketing
strategies, and sales. Overall, an organized feedback system improves the customer experience and helps
businesses make informed decisions.

You might also like