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

Dms_1

The micro-project report focuses on designing an online retail application utilizing triggers in a relational database management system (RDBMS). It outlines the project's aim, methodology, and the creation of tables for products, customers, orders, and categories, along with the implementation of triggers for data management. The report also discusses the advantages and disadvantages of using triggers, as well as the resources required for the project.

Uploaded by

snehatumaskar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Dms_1

The micro-project report focuses on designing an online retail application utilizing triggers in a relational database management system (RDBMS). It outlines the project's aim, methodology, and the creation of tables for products, customers, orders, and categories, along with the implementation of triggers for data management. The report also discusses the advantages and disadvantages of using triggers, as well as the resources required for the project.

Uploaded by

snehatumaskar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

MICRO-PROJECT REPORT ON

“Design a Online Retail Application by applying trigger on it ”

In partial fulfilment of Diploma in Computer Engineering


(Third Semester)

In the subject of
‘Database Management System’(22319)
SUBMITTED BY
1. Isha M. Bagde
2. Akansha R. Deulkar
3. Ashay M. Thorat
4. Sneha S. Tumaskar

SUBMITTED TO

Maharashtra State Board of Technical Education, Mumbai(M.S)

Under the Guidance of


Prof. Harshal N. Ranotkar
Lecturer In
Department of Computer Engineering
Government Polytechnic Arvi Dist.-Wardha
(2023-2024)

Page | 1
Government Polytechnic, Arvi
Department of Computer Engineering

Certificate

This is to certify, that students whose name is mention below of Third Semester
of Diploma in Computer Engineering has satisfactorily completed the Micro-
project entitled “Design a Online Retail Application by applying Trigger on it”
in Database Management System of the academic year 2023-24 as prescribed in
MSBTE curriculum.
Name Enrollment No. Seat No.
Isha M. Bagde 2201320213
Akansha R. Deulkar 2201320221
Ashay M. Thorat 2201320311
Sneha S. Tumaskar 2201320325

Subject Teacher Head of the Department Principal


Mr. Harshal N. Ranotkar Dr.M.A.Ali Dr.M.A.Ali

Place: Arvi
Date:

Page | 2
Declaration

We under signed hereby declare that the micro-project report entitled “Design a
Online Retail Application By applying Trigger on it.” We further declare that
contents of this report are properly citied and well acknowledge. This present report
is not submitted to any other examination of this or any other institute for the award
of any diploma.

Place: Arvi
Date:

Signature

Page | 3
Part A- Microproject Report
“Design a Online Retail Application by applying Trigger on it”

➢ Brief Introduction:-
RDBMS stands for relational database management system—a software system that
enables you to define, create, maintain, and control access to relational databases. A
relational database is a collection of information that organizes data in predefined
relationships where data is stored in one or more tables (or "relations") of columns and
rows, making it easy to see and understand how different data structures relate to each
other. Relationships are a logical connection between different tables, established on the
basis of interaction among these tables.

Online shopping refers to procedure where customers use the Internet to


directly purchase goods, services, etc. from a seller. Customers can browse online
stores while lounging in their homes or while seated in front of a computer.

Many customers have access to the Internet both at work and at home, and online
stores are typically open 24 hours a day. Therefore, shopping online is very
convenient for them. One of the most alluring aspects of online shopping, especially
during the holiday season, is that it eliminates the need to stand in line or look around a
store for a specific item. Online stores offer a wide range of products.

It is a specific type of online trade. With this initiative, physical store customers will
be able to enjoy the advantages of online shopping.

It provides the customer with a list of the many things that may be purchased at the
retail establishment. The user is provided with access to a shopping cart to facilitate
more convenient online purchases. As a result of both the progression of technology and
the wave of digitalization, an increasing number of firms are making adjustments to
accommodate new technological developments.

The concept involves providing a facility that allows customers to place orders 24/7 and
a home delivery service to meet their needs. By providing an internet gateway for
customers to conveniently purchase from anywhere, stores can prevent losing clients
to popular online retailers like Flipkart or eBay. The application is accessible on
smartphones, ensuring it is readily available and accessible at all times.

Page | 4
➢ Aim of the Micro-Project:-

- Design a Online Retail Application by applying trigger on it.

➢ Intended Course Outcomes:-


-CO(b) Create and manage database using SQL command.
-CO(d) Apply the Trigger to database.

➢ Literature Review:-

Data:-
In a Database Management System (DBMS), data is organized and stored in a
structured manner to facilitate efficient retrieval, storage, and management.
Database:-
A database is a structured collection of data that is organized and stored in a way
that allows for efficient retrieval, updating, and management.
Tables:
Databases are typically divided into tables, which are used to store related data.
Each table consists of rows (records) and columns (attributes) that define the structure
of the data.

Schema:
The schema defines the structure of the database, including the tables, their
columns, data types, and relationships between tables. It acts as a blueprint for the
database.

Data Types:
Each column in a table has a data type that specifies the kind of data it can hold
(e.g., text, numbers, dates).

Keys:
Keys are used to uniquely identify records in a table.

Database management:-
Database management in a Database Management System (DBMS) involves
various activities related to the creation, maintenance, and manipulation of databases.

Database management system:-


A Database Management System (DBMS) is software that provides a way to
create, manage, and manipulate databases. It serves as an interface between the
database and the users or applications that need to interact with the data.

Page | 5
Types of database:-
There are several types of databases in database management systems (DBMS).
Here are some common ones:

Relational Databases:
These databases store data in tables with rows and columns, using a structured
schema. Popular examples include MySQL, PostgreSQL, and Oracle Database.

Online Retail System:-


The Online Shopping is a web based application intended for online retailers. The
main objective of this application is to make it interactive and its ease of use. It would
make searching, viewing and selection of a product easier. It contains a sophisticated
search engine for user's to search for products specific to their needs. The search
engine provides an easy and convenient way to search for products where a user can
Search for a product interactively and the search engine would refine the products
available based on the user’s input. The user can then view the complete specification
of each product. They can also view the product reviews and also write their own
reviews. The application also provides a drag and drop feature so that a user can add a
product to the shopping cart by dragging the item in to the shopping cart. The main
emphasis lies in providing a user- friendly search engine for effectively showing the
desired results and its drag and drop behavior.

➢ Trigger In PL/SQL:-

-A trigger is a procedure that is authomatically invoked by the DBMS in response to


specific alteration to the database or a table in database.

-Trigger is stored in database as simple database object.

Active trigger:-
-A database that has a set of associated trigger is called an active trigger.

-A database trigger enable DBA (Database administrators) to create additional


relationships between separate database.

Page | 6
➢ Syntax:-

-Create [or REPLACE]

Trigger < trigger_name >


[< Enable / Disable >]
< Before / After >
< Insert / Update / Delete >
On < table_name > [ For Each Row ]
Declare
< Variable_ Defination >;
Begin
< Trigger_code >;
End;

➢ Advantages of Trigger:-

-SQl provides an alternate way for maintaining the data and referential integrity in
the table.

-Trigger helps in executing the scheduled tasks because they are called
automatically.

-They catch the error in the database layer of various businesses.

-They allow the database user to validate values before inserting and updating.

➢ Disadvantages of Trigger:-

-They are not compiled.

-It is not possible to find and debug the error in trigger.

-If we use the complex code in the trigger , it makes the application run slower.

-Trigger increases the high load on the database system.

Page | 7
➢ Proposed Methodology:-
- Design a structure or schema definition for product , customer , order ,
categories in online retail application.
- Identify the key attributes and normalize the table for product , customer , order
, categories.
- Apply trigger for product , customer , order , categories.

➢ Resourses Required:-

Name of
Sr. No. Specifications Quantity Remarks
Resource
Computer i5
1 Computer System RAM=8GB, 1
Windows 10,
8th generation.

2 Operating system Windows 10 1

Oracle 10g
3 Software 1
Express

Any other Browser


4 As required
resources used

Group Member:-

Roll no Group Member Signature

7. Isha Bagde

11. Akansha Deulkar

44. Ashay Thorat

57. Sneha Tumaskar

Page | 8
Action Plan:-

Sr.no Steps Description Plan End Team


date Date membe
r
1. Perform Research Online retail All
information application and gather data on 6/10/23 10/10/23
search product , customer , order ,
categories

2. Analyze the Determine the interrelation All


information between product ,customer , order 10/10/23 17/10/23
,categories

3. Designed the Design the structure of database All


proposed and apply the trigger on it. 17/10/23 26/10/23
methodology

4. Developed the Execute the queries related to the All


solution database table. 26/10/23 6/11/23

5. Perform Testing Perform the verification and All


with various validation of data 9/11/23 9/11/23
inputs

Page | 9
Part-B Micro-Project
“ Design a online retail application by applying trigger on it “

Rationale:-
Enhanced User Engagement:-
Applying triggers can personalize the user experience, offering tailored
product recommendations and promotions based on browsing history and preferences,
leading to increased engagement.

Dynamic Content Updates:-


Triggers enable real-time updates of product availability, prices, or limited-time
offers, ensuring that users are presented with the latest and most relevant information during
their online shopping experience.

Customer Retention Strategies:-


Triggers can be applied to initiate loyalty programs, rewarding customers for
frequent purchases or specific milestones, thereby fostering customer retention.

Actual Methodology followed:-


In this microproject, we created 4 tables which include product , customer , order ,
categories and apply the trigger process on it.

The first table is Product where it includes product_id , product_name , price and
customer_ id. Here the customer_id is the primary key the Product table which is uniquely
identify in the table. This key can refers by all the table .And the data of product is store in
the product table.

Primary key is basically one of the a candidate key chosen by the database designer
to uniquely identify the entity set.

Next table is customer table where the primary key of Product table is used which is
customer_id. This table contain customer_id , customer_name , customer_add ,
Mobile_num. Here customer_name is a foreign key which refers to customer_id attribute
from Product table.
Foreign Key is a key attribute of a relation that can be reffered in other relation.

Third is Order table which include order_id , customer_id , total_amount.


In which Order table has order_id as a foreign key that refers the primary key of Product
table which is customer_id.
Fourth is Category table which has category_id , category_name.

Page | 10
Main Table:-

Table Name:- Product

Product_id Product_name Price Customer_id


10 Books 50 101
20 Smart phone 20,000 102
30 Pen 40 103
40 Apple pencil 25,000 104

Table Name:-Customer

Customer_id Customer_name Customer_add Mobile_num


101 Pritesh Pune 987678654
102 Shraddha Mumbai 987342565
103 Anshu Delhi 675787654
104 Yatharth Nagpur 765426376

Table Name:-Order

Order_id Customer_id Total_amount


300 101 5500
301 102 6000
302 103 900
303 104 230

Table Name:-categories

Category_id Category_name
200 Stationary
201 Electric Supplies
202 Home appliance
203 gadgets

Page | 11
Queries:-

Creating the tables:-

Table Name:- Product

Create table product


( Product_id number(5),
Product_name varchar2(20),
Price number(6),
Customer_id number(5));

Table Name:- Customer

Create table Customer


( Customer_id number(5),
Customer_name varchar2(20),
Customer_add varchar2(20),
Mobile_num number(10));

Table Name:-Order

Create table Order


( Order_id number(5),
Customer_id number(6),
Total_amount number(10));

Table Name:-categories

Create table categories


( Category_id number(5),
Category_name varchar2(20));

Page | 12
Inserting The Data Into Tables:-
Table Name:- Product

Insert into Product values(10,’Books’,50,101);

Insert into Product values(20,’Smart phone’,20000,102);

Insert into Product values(30,’Pen’,30,103);

Insert into Product values(40,’Apple pencil’,25000,104);

Table Name:-Customer

Insert into Customer values(101,’Pritesh’,’Pune’,9876786541);

Insert into customer values(102,’Shraddha’,’Mumbai’,9873425655);

Insert into Customer values(103,’Anshu’,’Delhi’,6757876544);

Insert into Customer values(104,’Yatharth’,’Nagpur’,7654263766);

Table Name:- Order

Insert into Order values(300,101,5500);

Insert into Order values(301,102,6000);

Insert into Order values(302,103,900);

Insert into Order values(303,104,230);

Table Name:- Categories

Insert into categories values(200,’Stationary’);

Insert into categories values(201,’Electric supplies’);

Insert into categories values(202,’Home appliance’);

Insert into categories values(203,’gadgets’);

Page | 13
Performing The Trigger Operation On Above table:-

Creating trigger :-
Table Name:-Product

Create trigger trg1


After insert On product
For each row
Begin
Dbms_output.put_line(‘Welcome to online retail application’);
End;

Performing insert operation:-


Insert into
product(product_id,product_name,price,customer_id)values(50,’laptop’,100000,105);

Page | 14
Performing delete operation:-

Delete from product where product_name=’pen’;

Performing Update operation:-

Update product set product_name=’Chopper’ where customer_id=102;

Page | 15
Performing Select Operation:-

Select product_id,product_name,price
From product
Where price=20000;

Select * from product where price>20;

Page | 16
Performing Subqueries:-

Select * from product where price<(select avg(price)from product);

Creating Trigger:-

Table Name:-Customer

Create trigger trg2


After insert On customer
For each row
Begin
Dbms_output.put_line(‘It’s a customer block’);
End;

Page | 17
Performing Insert Operation:-

Insert into
customer(customer_id,customer_name,customer_add,Mobile_num)values(105,’Shivam’,
’Pune’,9876543213);

Performing Delete Operation:-

Delete from customer where customer_id=101;

Page | 18
Performing Update Operation:-

Update customer set customer_add=’Nashik’ where customer_id=103;

Performing select Opration:-

Select customer_id,customer_name from customer where customer_id IN(101,102);

Page | 19
Select * from customer where customer_name like ‘_h%’;

Select customer_id,customer_name from customer where


NOT(customer_name=’Anshu’);

Page | 20
Conclusion:-

In this microproject, we implement the structure to store and organize the information
of data in such a way to make it easy to use as well as find.
A trigger is a database object that automatically performs an action, such as updating
data, in response to a specific event, like an insert, update, or delete operation on a table.
We implement 4 tables i.e. product , customer , order , categories and we applied the
trigger on on the database queries as well as SQL commands.

Skill Developed:-

• It may encourage creative thinking and innovation in problem-solving.


• Adapt new thinks with fluent communication.
• It develop the technical skill relevantly.

References:-

- https://www.researchgate.net/publication/370600141_Online_Retail_Application
- https://www.quora.com/What-are-the-steps-involved-in-developing-an-online-
retail-application
- https://creately.com/diagram/example/i8kexm0g2/online-retail-shop

Page | 21
Page | 22

You might also like