Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

C. V.

Raman Global University, Bhubaneswar


Odisha-752054
Department of Computer Science

A CASE STUDY REPORT


ON
E-COMMERCE DATABASE DESIGN

Under The Guidance of


Ms. Jayanti Rout

SUBMITTED BY:-
Name Regd. No.
RASHMIREKHA NAYAK 2301080005

KAWANI ROSEMARY 2301080006

AYUSH KUMAR SHARMA 2301080008


We, the undersigned students—Rashmirekha Nayak, Kawani Rosemary and Ayush Kumar
Sharma—enrolled in the Bachelour of Computer Applications (BCA) program at C V
Raman Global University, declare that the case study titled "Student Record System" is our
original work undertaken as part of the DBMS course for the academic year 2023-2026.

This case study aims to analyze and design a E-Commerce Database Design ,gathering to the
principles and concepts learned in the DBMS course. We attest that the content presented is
authentic, and no part has been submitted elsewhere for academic purposes.

We acknowledge and take responsibility for the authenticity, accuracy, and originality of
this case study. Any external sources used for reference are appropriately cited. We
understand the importance of academic integrity and affirm that this work is free from
plagiarism.

RASHMIREKHA NAYAK 2301080005

KAWANI ROSEMARY 2301080006

AYUSH KUMAR SHARMA 2301080008

2|Page
ACKNOWLEDGEMENT

In sincere acknowledgment of the collaborative efforts of our dedicated team, we emphasize


the significant impact of collective contributions on shaping this section of the project report.
We express heartfelt gratitude to our esteemed teachers for their unwavering encouragement
and guidance, instrumental in enhancing the quality and depth of our work.

At this pivotal juncture, we extend our thanks to our instructors whose indispensable support
navigated the complexities of our chosen project topic, securing its approval. Their knowledge,
feedback, and mentorship empowered us to undertake this academic endeavor with
confidence.

We also appreciate Ms. Jayanti Rout for their invaluable support throughout our project
journey. Their commendable commitment to our academic pursuits and shared experƟse
have been deeply valued.

Reflecting on the process of selecting a suitable project topic, we cannot overstate our
appreciation for the substantial contributions of our mentors. Their consistent motivation
served as a guiding light, leading us to an informed and appropriate project choice.

The success of this project is a testament to the collaborative spirit within our team and the
unwavering support from our educators and staff. As we express gratitude, we recognize the
profound impact their guidance has had on our academic and personal growth, shaping us into
more capable individuals within the academic community.

RASHMIREKHA NAYAK 2301080005

KAWANI ROSEMARY 2301080006

AYUSH KUMAR SHARMA 2301080008

3|Page
TABLE OF CONTENT

S No. Content Page No.


01 INTRODUCTION 06
A FESIBILITY STUDY AND REQUIREMENT
02 ANALYSIS 07-08

03 TABLE DESCRIPTION WITH ALL CONSTRAINTS 09-11


04 DESIGN ER DIAGRAM 12
05 RELATIONAL DATABASE SCHEMA 13
06 NORMALIZATION TABLE (UPTO 2 NF) 14-16
07 CONCLUSION 17
08 IMPLEMENTATION 18
09 REFERENCES 19

4|Page
ABSTRACT

In the ever-evolving landscape of e-commerce, the efficiency and robustness of the underlying
database system play a pivotal role in shaping the success of online platforms. This abstract
aims to analyze the intricacies of the design and implementation of a comprehensive database
system for an e-commerce platform, with specific attention to three critical components: the
product catalog, user profiles, and order processing. Through this analysis, key considerations,
strategies, and outcomes pertaining to each component are examined, providing insights into
the optimization of database functionality to enhance overall platform performance and user
satisfaction.

Product Catalog:
The product catalog serves as the gateway to customer engagement, demanding a meticulously
designed database schema. Our analysis reveals a structured "Products" table capturing essential
product attributes and supplementary tables for product-related data, facilitating a dynamic and
responsive catalog. Scalability considerations, such as efficient indexing and partitioning, ensure
optimal performance as the catalog expands. The integration with the frontend through well-designed
APIs guarantees a seamless and engaging product browsing experience for users.

User Profiles:
Security and personalization are paramount in the realm of user profiles. The analysis underscores the
implementation of robust security measures, including encryption and hashing techniques,
safeguarding sensitive user information. The user-centric database architecture, featuring a dedicated
"Users" table and additional tables for addresses and purchase history, enables personalization and
customization. APIs for user account management, coupled with authentication mechanisms,
contribute to a secure and user-friendly environment.

Order Processing:
Efficient order processing is crucial for customer satisfaction and operational success. The analysis
emphasizes the importance of a comprehensive "Orders" table and its integration with external
payment gateways for secure transactions. APIs for order creation, tracking, and management facilitate
real-time updates for users, while system adaptability allows for handling various order-related
operations, including cancellations and returns. The application of performance optimization
techniques ensures swift retrieval of order information, even during peak transaction periods

5|Page
INTRODUCTION

In the rapidly evolving digital landscape, e-commerce platforms stand as the vanguards of
modern retail, offering consumers unparalleled convenience and access to a vast array of
products. At the heart of these platforms lies a sophisticated database system, a linchpin that
orchestrates seamless interactions between users, products, and transactions. This
introduction sets the stage for an in-depth analysis of the design and implementation of a
database system for an e-commerce platform, with a focused lens on three pivotal
components: the product catalog, user profiles, and order processing.

E-commerce platforms, in their essence, represent the convergence of technology, business,


and user experience. A well-designed and efficiently implemented database system is
fundamental to the platform's success, shaping not only the backend operations but also
influencing the overall user journey. The trinity of the product catalog, user profiles, and
order processing forms the nucleus of this analysis, representing key touchpoints in the e-
commerce ecosystem

6|Page
A FESIBILITY STUDY AND REQUIREMENT ANALYSIS :-

Designing and implementing a database system for an e-commerce platform involves


several crucial steps, including conducting a feasibility study, defining requirements,
scoping the project, designing the database, and testing or maintaining the system.
Let's break down each of these components:

1. Feasibility Study :
• Assess the technical, economic, and operational feasibility of the project.
• Determine if the e-commerce platform is viable within the given constraints (budget,
resources, time).
• Identify potential risks and challenges associated with the project.
2. Requirements Gathering :
• Gather requirements from stakeholders, including business owners, users, and
developers.
• Define the functional and non-functional requirements of the database system.
• Identify key features such as product catalog management, user profiles, and order
processing.
3. Scope of Project :
• Define the scope of the project, including the features and functionalities to be
included in the database system.
• Establish project timelines, milestones, and deliverables.
• Identify project constraints and assumptions.
4. Functional Requirements :
❖ Detailed specification of functional requirements for the database system:

Product Catalog:
• Ability to manage various product attributes such as name, description, price,
availability, etc.
• Support for categorization and organization of products.
• Search and filter functionalities for users to easily find products.
User Profiles:
• Secure authentication and authorization mechanisms.
• Storage of user information including personal details, order history, preferences,
etc.
• Support for user roles and permissions management.
Order Processing:
• Ability to create, modify, and track orders.
• Integration with payment gateways for secure transactions.
7|Page
• Inventory management to track product availability.
5. Non-Functional Requirements :
❖ Performance:
• Response time requirements for various database operations.
• Scalability to handle concurrent users and large datasets.
❖ Security:
• Encryption of sensitive data such as user credentials and payment information.
• Protection against SQL injection and other security threats.
❖ Reliability:
• Backup and recovery mechanisms to ensure data integrity.
• High availability to minimize downtime.
❖ Usability:
• Intuitive user interfaces for managing the database system.
• Accessibility considerations for users with disabilities.
6. Design Database :
• Entity-Relationship Modeling: Identify entities (such as products, users, orders) and
their relationships.
• Database Schema Design: Design tables, attributes, and relationships based on the
identified entities and relationships.
• Normalize the database to ensure data integrity and minimize redundancy.
• Choose an appropriate database management system (DBMS) based on the
requirements and scalability needs (e.g., MySQL, Oracle).
• Implement security measures to protect sensitive data (e.g., encryption, access
control).
• Define indexing and optimization strategies to improve query performance.
7. Implementation Plan :
• Phased approach for implementing the database system.
• Allocation of resources including personnel, time, and budget.
• Testing and quality assurance procedures.
8. Conclusion :
• Summary of key findings and recommendations.
• Conclusion on the feasibility of implementing the proposed database system for the
e-commerce platform.

8|Page
TABLE DESCRIPTION WITH ALL CONSTRAINTS :-

❖ Table Description :-
▪ The E-Commerce Database Design System consists of several tables that are used to
store data related to Customer , Order , product , payment and Order Details. The tables,
their Data type , and the constraints applied to them are listed below.
--------------------------------------------------------------------------------------------------
Customer Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Email_id Varchar Primary Key
First_Name Varchar Not Null
Last_Name Varchar Not Null
Address Varchar Not Null
DOB Varchar Not Null

Description :- This table stores information about all the Customer Profile.
----------------------------------------------------------------------------------------------------------------

Customer_2 Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Tel_no Number Not Null
Email_id Varchar Foreign Key

Description :- This table stores information about all the Customer Tel_No.
----------------------------------------------------------------------------------------------------------------

9|Page
Product Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Product_Id Number Primary Key
Product_Name Varchar Not Null
Quality Varchar Not Null
Price Number Not Null
Quantity Number Not Null

Description :- This table stores information about all the Product Details.
----------------------------------------------------------------------------------------------------------------

Relation_Buy Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Email_id Varchar Foreign Key
Product_id Number Foreign Key

Description :- This table link between customer table and Product table.
----------------------------------------------------------------------------------------------------------------
Order_Details Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Order_details_id Number Primary Key
Total_Amount Number Not Null

Description :- This table stores information about Order Details.


----------------------------------------------------------------------------------------------------------------
Payment Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Payment_id Number Primary Key
Payment_type Varchar Not Null
Order_details_id Number Foreign Key
10 | P a g e
Description :- This table stores information about all the Payment.
----------------------------------------------------------------------------------------------------------------

Payment_2 Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Tel_no Number Primary Key
Payment_id Number Foreign Key

----------------------------------------------------------------------------------------------------------------

Order# Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Order_id Number Primary Key
Amount Number Not Null
Order_date Number Not Null
Payment_id Number Foreign Key

Description :- This table stores information about all the Order.


----------------------------------------------------------------------------------------------------------------

Relation_Place Table :-
COLUMN_NAME DATA_TYPE CONSTRAINTS
Product_id Number Foreign Key
Order_id Number Foreign Key

Description :- This table link between Product table and Order id.
----------------------------------------------------------------------------------------------------------------

11 | P a g e
ER-DIAGRAM :-

PRODUCT_NAME
ADDRESS

EMAIL_ID PRODUCT_ID
DOB

M M
CUSTOMERS BUY PRODUCT
M

PRICE QUANTIY
NAME TEL_NO
Y
AGE

LAST_NAM
E PLACE

FIRST_NAM
E
ORDER_ID
M

ORDER_DATE ORDERS
4
AMOUN M

T
QUANTI
TY

PAY
ORDER_DETAIL_ID S
AMOUN
1 T

ORDER_DETAILS VERIFY PAYMENTS


PAYMENTS
1 1

TEL_NO
TOTAL_AMOUNT

12 | P a g e
Relational Database Schema :-

1. Customers
Email_id First_name Last_name Address DOB

1.1. Customers_2
Tel_no Email_id

2. Relation_buy
Email_id Product_id

3. Product
Product_id Product_name Quality Price Quantity

4. Relation_place
Product_id Order_id

5. Orders
Order_id Amount Order_date Payment_id

6. Payments
Payment_id Payment_type Order_details_id

6.1. payments_2

Tel_no Payments_id

7. Order_details
Order_details_id Total_amount

13 | P a g e
NORMALIZATION TABLE (UPTO 2 NF) :-

Normalization is the process of minimizing redundancy from a relation or set of


relations. It includes creating tables and establishing relationships between those tables
according to rules designed both to protect the data and to make the database more
flexible by eliminating redundancy and inconsistent dependency.
• In the Case of E-Commerce Database Design, the data can be normalized up to 2nd
Normal Form(2NF).
• To achieve this, we can start by identifying the primary key of each table and then
removing any partial dependencies and transitive dependencies.

Table Name - Customer :-


Email_id First_Name Last_Name Address DOB
Katihar,
ayush@gmail.com Ayush Kumar 22-04-2003
Bihar
Ramgarh,
tanya@gmail.com Tanya Kamal 14-04-2004
Jharkand

Bhubneswar,
rashmi@gmail.com RashmiRekha Nayak 01-06-2004
Odisha

Jhamesdhpur,
ronit@gmail.com Ronit Kar 14-09-2004
Jharkand

Bhubneswar,
anshuman@gmail.com Anshuman Mohanty 07-07-2004
Odisha

FD :- Email_id → First_name , Last_name , Address , Dob.


First_name → Email_id, Last_name , Address , Dob.
Last_name → Email_id , First_name , Address , Dob.
Address → Email_id , First_name , Last_name , Dob.
Dob → Email_id , First_name , Last_name , Address.
14 | P a g e
Candiadate Key → Email_id , First_name , Last_name , Address , Dob.
Prime Attributes → Email_id , First_name , Last_name , Address , Dob.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.
--------------------------------------------------------------------------------------------------

Table Name – Customer2 :-


Tel_no Email_id
8235308885 ayush@gmail.com

6200938285 tanya@gmail.com

9348712994 rashmi@gmail.com

9934443554 ronit@gmail.com

9437972374 anshuman@gmail.com

FD :- Email_id → Tel_no.
Tel_no → Email_id.
Candiadate Key → Email_id , Tel_no.
Prime Attributes → Email_id , Tel_no.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.

15 | P a g e
Table Name - Product :-
Product_id Product_name Quality Price Quantity
001 Joggers 5-Star 880 38
002 Jenas 4_star 999 40
003 Shirt 5-Star 799 32
004 T-Shirt 4_star 399 50
005 Shoes 5-Star 899 40

FD :- Product_id → Product_name , Quality , Price , Quantity.

Product_name → Product_id , Quality , Price , Quantity.

Price → Product_id , Product_name , Quality , Quantity.

Quantity → Product_id , Product_name , Quality , Price .

Candiadate Key → Product_id , Product_name , Price , Quantity.

Prime Attributes → Product_id , Product_name , Price , Quantity.

Non Prime Attributes → Quality.


❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency .
--------------------------------------------------------------------------------------------------

Table Name – Relation_Buy :-

16 | P a g e
Email_id Product_id
ayush@gmail.com 001
tanya@gmail.com 002
rashmi@gmail.com 003
ronit@gmail.com 004
anshuman@gmail.com 005

FD :- Email_id → Product_id.
Product_id → Email_id.
Candiadate Key → Email_id , Product_id.
Prime Attributes → Email_id , Product_id.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.
--------------------------------------------------------------------------------------------------

Table Name – Order Details :-


Order_Details_id Total_Amount
301 3400.00
302 890.98
303 1689.09
304 1899.98
305 2590.89

FD :- Order_Details_id → Total_Amount.

17 | P a g e
Total_Amount.→ Order_Details_id.
Candiadate Key → Order_Details_id , Total_Amount.
Prime Attributes → Order_Details_id , Total_Amount.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.
--------------------------------------------------------------------------------------------------

Table Name - Payment :-


Payment_id Payment_type Order_Details_id
401 UPI 301
402 CARD 302
403 UPI 303
404 UPI 304
405 CARD 305

FD :- Payment_id → Payment_type , Order_Details_id.


Payment_type → Payment_id , Order_Details_id.
Order_Details_id → Payment_id , Payment_type.
Candiadate Key → Payment_id , Payment_type , Order_Details_id.
Prime Attributes → Payment_id , Payment_type , Order_Details_id.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.

Table Name – Payment2 :-


18 | P a g e
Tel_no Payment_id
8235308885 401
6200938285 402
9348712994 403
9934443554 404
9437972374 405

FD :- Tel_no → Payment_id.
Payment_id → Tel_no.
Candiadate Key → Tel_no , Payment_id.
Prime Attributes → Tel_no , Payment_id.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.
--------------------------------------------------------------------------------------------------
Table Name – Order# :-
Order_id Amount Order_date Payment-id

501 3400.00 23/03/2024 401

502 890.98 25/03/2024 402

503 1689.09 27/03/2024 403

504 1899.98 29/03/2024 404

505 2590.89 01/04/2024 405

FD :- Order_id → Amount , Order_date , Payment-id.


Amount → Order_id , Order_date , Payment-id.
19 | P a g e
Order_date → Order_id , Amount , Payment-id.
Payment-id → Order_id , Order_date , Amount.
Candiadate Key → Order_id , Amount , Order_date , Payment-id.
Prime Attributes → Order_id , Amount , Order_date , Payment-id.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.
--------------------------------------------------------------------------------------------------
Table Name – Relation_Place :-
Product_id Order_id
001 501
002 502
003 503
004 504
005 505

FD :- Product_id → Order_id.
Order_id → Product_id .
Candiadate Key → Product_id , Order_id.
Prime Attributes → Product_id , Order_id.
Non Prime Attributes → Nothing.
❖ This Table is in 1NF.
➢ This Table is also in 2NF Because there is No Partial Dependency
as absence of non prime attributes.

20 | P a g e
Conclusion :-

In conclusion, the successful implementation of this comprehensive database


system marks a pivotal stride towards operational excellence in the dynamic realm
of e-commerce. By placing emphasis on the Product catalog, User profiles, and
Order processing, the platform not only meets but exceeds the expectations of its
user base. The adaptability of the system positions it as a cornerstone for continued
growth, scalability, and unparalleled customer satisfaction in the ever-evolving e-
commerce landscape.

21 | P a g e
Implementation :-

The technological stack employed in the implementation of this e-commerce


platform includes MySQL & ORACLE as the relational database management
system, Node.js for server-side logic, and React.js for the dynamic and responsive
user interface. APIs are meticulously crafted to handle a myriad of functionalities,
including product management, user profiles, and order processing. Regular
updates to the product catalog, user profiles, and order database ensure that the
system remains responsive to evolving business needs, providing a foundation for
sustained growth and customer satisfaction.

22 | P a g e
REFERENCES :-

1) https://medium.com/@karlos-b/database-project-e-commerce-order-management-
system-with-sql-d986b044d92
2) https://github.com/bhumijgupta/Ecommerce-management-DBMS-project
3) https://codereview.stackexchange.com/questions/221391/sql-e-commerce-database-
design
4) https://www.researchgate.net/publication/2359510_Database_Design_for_Real-
World_E-Commerce_Systems
5) https://chat.openai.com/share/638d7f2b-12e4-4820-9f65-f6d328bd38b8

23 | P a g e
24 | P a g e

You might also like