Visvesvaraya Technological University BELGAUM-590014: "Online Agriculture Products Marketing"

You might also like

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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELGAUM-590014

A DBMS Mini-Project Report


On
“Online Agriculture Products Marketing”
A Mini-project report submitted in partial fulfillment of the requirements for the
award of the degree of Bachelor of Engineering in Computer Science and Engineering
of Visvesvaraya Technological University, Belgaum.

Submitted by:

SURYA K S (1DT16CS107)

Under the Guidance of:


Mr. ANOOP G L
Assistant Professor
(Department of CSE)

Department of Computer Science and Engineering


(ACCREDITED BY NBA, NEW DELHI FOR 3 YEARS VALIDITY:26-07-18 TO 30-06-21 )
DAYANADA SAGAR ACADEMY OF TECHNOLOGY AND
MANAGAEMENT
(AFFILIATED TO VTU, BELAGAVI AND APPROVED BY AICTE,NEW DELHI )
Kanakpura Road,Udayapura, Bangalore
2016-2020 BATCH
DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND
MANAGEMENT,
(AFFILIATED TO VTU, BELAGAVI AND APPROVED BY AICTE, NEW DELHI)
Kanakpura Road,Udayapura, Bangalore
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
(ACCREDITED BY NBA, NEW DELHI FOR 3 YEARS VALIDITY: 26-07-18 TO 30-06-21)

CERTIFICATE
This is to certify that the Mini-Project on Database Management System (DBMS) entitled “ONLINE
AGRICULTURE PRODUCTS MARKETING” has been successfully carried out by SURYA K S
(1DT16CS107) a bonafide students of Dayananda sagar academy of technology and management
in partial fulfillment of the requirements for the award of degree in Bachelor of Engineering in
Computer Science and Engineering of Visvesvaraya Technological University, Belgaum during
academic year 2018-19. It is certified that all corrections/suggestions indicated for Internal Assessment
have been incorporated in the report deposited in the departmental library. The mini project report has
been approved as it satisfies the academic requirements in respect of project work for the said degree.

GUIDES:

Mr. ANOOP G L Dr. C NANDINI


Assistant Professor Vice Principal & HOD
(Department of CSE) (Department of CSE)

Examiners: Signature with Date


1:
2:
ACKNOWLEDGEMENT
It gives us immense pleasure to present before you our project titled “ONLINE
AGRICULTURE PRODUCTS MARKETING USING HTML and PHP”. The joy and
satisfaction that accompany the successful completion of any task would be incomplete without
the mention of those who made it possible. We are glad to express our gratitude towards our
prestigious institution DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND
MANAGEMENT for providing us with utmost knowledge, encouragement and the maximum
facilities in undertaking this project.

We wish to express a sincere thanks to our respected principal Dr. B. R. Lakshmikantha for
all their support.

We express our deepest gratitude and special thanks to Dr.C.Nandini, Vice Principal &
H.O.D, Dept. Of Computer Science Engineering, for all her guidance and encouragement.

We sincerely acknowledge the guidance and constant encouragement of our mini- project
guides, Mr.Raghu M T (Assistant Professor) and Mr.Manjunath D R (Assistant Professor)

SURYA K S (1DT16CS107)

i
ABSTRACT

Our Project “Online Agriculture Products Marketing” is a computerized system used to


store and retrieve information and conduct transactions related to Agricultural Products. The
aim of the project is to reduce the involvement of third person between farmer and buyer.

Online Agriculture Products Marketing is a market place for farmers where they can
sell/buy their vegetables, fruits etc using this e-Trading Platform. Farmers can also
transparently buy inputs and implements using online shopping ecommerce platform.

E-commerce is clearly beginning to have a major impact in the agricultural sector. The
way people go about purchasing agricultural products is of great concern. Most of the time
customers have to travel far distances to get agricultural products and getting the right quality
is not ensured. Besides, farming is the prime occupation in India. Indian people involved in
farming are mostly cheated by the agents in today’s market which leads to poverty

The website builds a platform for farmers and agents to ensure greater profitability
through direct farmer to customer communication The website will act as a unique and secure
way to perform agro-marketing. E-farming will serve as a way for the farmers to sell their
products across the country just with some basic knowledge about how to use the website. This
project allows viewing various products available enables users to purchase desire products
instantly by online payment. This website would be developed using web service as the
communication infrastructure between the buyer and farmers and also products selling.

Our project aims to help farmers as well as customers for buying and selling
agricultural products across the country using a computerized approach.

ii
TABLE OF CONTENTS

Chapter # Chapter Name Page #

1 INTRODUCTION 1

1.1 Background 1

1.2 Problem Definition 1

1.3 Motivation 1

1.4 Objective 2

1.5 Scope of the project 2

2 REQUIREMENTS 3

2.1 Hardware Requirements 3

2.2 Software Requirements 3

3 DESIGN 4

3.1 Database Design 4

3.1.1 E-R Diagram 4

3.1.2 Database Schema 5

3.1.3 Relational Schema 7

3.2 Database Normalization 8

3.2.1 First Normal Form 8

3.2.2 Second Normal Form 8

3.2.3 Third Normal Form 8

3.3 User Interface 8

3.3.1 Welcome Page 9

3.3.2 User Registration 9

iii
3.3.3 User Login 10

3.3.4 User Product Search 10

3.3.5 Available Products 11

3.3.6 Upload Product 11

3.3.7 Product View 12

3.3.8 Order Product 12

4 IMPLEMENTATION 13

4.1.1 User Registration Module 13

4.1.2 User Log in 14

4.2.1 Upload Product 14

4.2.2 Digital Market 14

4.2.3 Order Details 15

4.2.4 MyCart 15

5 SOURCE CODE 17

6 CONCLUSION AND 21
FUTURE WORK
6.1 Advantages 21

6.2 Future Enhancement 21

7 BIBILOGRAPHY 22

8 PERSONAL DETAILS 23
LIST OF FIGURES

SL # FIGURE # TOPIC PAGE #

1 Figure 3.3.1 Welcome Page 9

2 Figure 3.3.2 User Registration 9

3 Figure 3.3.3 User Login 10

4 Figure 3.3.4 User Product Search 10

5 Figure 3.3.5 Available Products 11

6 Figure 3.3.6 Upload Product 11

7 Figure 3.3.7 Product View 12

8 Figure 3.3.8 Order Product 12

v
DBMS Mini Project – Online Agriculture Product Marketing

CHAPTER 1

INTRODUCTION

1.1 Background
Considering facilities given by Indian Government to farmers that provides quality
agricultural inputs supply, efficient irrigation management and production of high yielding
seeds of different crops. It also provides the best use of surface water, irrigation efficiency
by reducing logging and increasing irrigated areas and farmers to supply quality fertilizer.

1.2 Problem Definition

Now a day, the farmers have to go to the nearest market to hand over his product to a particular
agent where agent sells the product to another agent or a dealer. After a specific time the agent
gives the collected cash out of the sold products to the respected farmer but every Agent tries to
cuts his commission out of the earned amount. The whole process is not transparent as there is
no way for farmer to know about the deal and the exact amount at which their product was
sold. No facility is present for the farmers to know the product rates at different markets where
they can sell their products for achieving high profits. Our project aims to help farmers to sell
their products in a transparent way.

1.3 Motivation

Manual System: The system is not effiecient as the third person involve and farmers will have
no idea at what price their products was sold.This system is more prone to errors and
sometimes the approaches to various problems are unstructured.

Dept. of CSE, DSATM 2018-19 Page 1


DBMS Mini Project – Online Agriculture Product Marketing

Technical System: With the invention of latest technology, we should update our systems
which are very fast, accurate, user-friendly and reliable.

1.4 Objective

The main objective of this project is to build a platform for farmers to sell their product
and track the sale. This platform is flexible which can improve the customer-farmer
relationship in an effective manner. Farmer will get unique interface where they can avail
everything right from learning to the market information. This website will act as unique and
secure way to perform agro-marketing with the following advantages:
1. Faster System
2. Accuracy
3. Reliability
4. Cost Effective
5. User Friendly
6. Immediate access to the data and statistics

1.5 Scope of the project

The project provides a very simple application which provides better price for the
agricultural products grown by farmer. This application saves the data of farmers and
products in the database. Allows users to search for products and buy them. This will
provide the better price for farmer products than the manual market system.

Dept. of CSE, DSATM 2018-19 Page 2


DBMS Mini Project – Online Agriculture Product Marketing

CHAPTER 2

REQUIREMENTS
The requirements can be broken down into 2 major categories namely hardware and
software requirements. The former specifies the minimal hardware facilities expected in a
system in which the project has to be run. The latter specifies the essential software needed to
build and run the project.

2.1 Hardware Requirements

The Hardware requirements are very minimal and the program can be run on most of the
machines.

• Processor - Intel 486/Pentium processor or better

• Processor Speed - 500 MHz or above

• Hard Disk - 20GB(approx)

• RAM - 64MB or above

• Storage Space - Approx. 5MB

2.2 Software Requirements

• Technology Implemented : Apache Server, MySQL Server

• Language Used : PHP

• Database : My SQL

• User Interface Design : HTML, CSS,Bootstrap

• Web Browser : Google Chrome

• Software : XAMPP Version: 7.1.10

Dept. of CSE, DSATM 2018-19 Page 3


DBMS Mini Project – Online Agriculture Product Marketing

CHAPTER 3

DESIGN
3.1 Database Design

3.1.1 E-R Diagram

Fig 3.1 E-R diagram for Agriculture Marketing

Dept. of CSE, DSATM 2018-19 Page 4


DBMS Mini Project – Online Agriculture Product Marketing

3.1.2 Database Schema

Table 3.1.2.1 : Agriculture Products Database

Table 3.1.2.2 : Table User

Dept. of CSE, DSATM 2018-19 Page 5


DBMS Mini Project – Online Agriculture Product Marketing

Table 3.1.2.2 : Table Products

Table 3.1.2.2 : Table Review

Table 3.1.2.2 : Table Mycart

Dept. of CSE, DSATM 2018-19 Page 6


DBMS Mini Project – Online Agriculture Product Marketing

3.1.3 Relational Schema

Database: Agriculture Products

Agriculture Products Marketing Relational Schema

Dept. of CSE, DSATM 2018-19 Page 7


DBMS Mini Project – Online Agriculture Product Marketing

3.2 Database Normalization

3.2.1 First Normal Form

All the Relations are designed in such a way that it has no repeating groups. Hence all
tables are in 1st Normal Form.

3.2.2 Second Normal Form

A relation is said to be in second normal form if it is already in first normal form and it
has no partial dependency. All the tables in the database are designed in such a way that
there is no partial dependency. Hence all tables are in 2nd Normal Form.

3.2.3 Third Normal Form

A relation is said to be in third normal form if it is already in 1st and 2nd Normal Form
and has no transitive dependency. All the tables in the database are designed in such a
way that there is no transitive dependency. Hence all tables are in 3rd Normal Norm.

3.3 User Interface

The User Interface of the Online Agriculture Products Marketing is single moduled
where farmers can upload their products and buyers can buy and rate them.

Dept. of CSE, DSATM 2018-19 Page 8


DBMS Mini Project – Online Agriculture Product Marketing

Figure 3.3.1 Welcome Page

Figure 3.3.2 User Registration

Dept. of CSE, DSATM 2018-19 Page 9


DBMS Mini Project – Online Agriculture Product Marketing

Figure 3.3.3 User Login

Figure 3.3.4 User Products Search

Dept. of CSE, DSATM 2018-19 Page 10


DBMS Mini Project – Online Agriculture Product Marketing

Figure 3.3.5 Available Products

Figure 3.3.6 Upload Product

Dept. of CSE, DSATM 2018-19 Page 11


DBMS Mini Project – Online Agriculture Product Marketing

Figure 3.3.7 Product View

Figure 3.3.8 Order Product

Dept. of CSE, DSATM 2018-19 Page 12


DBMS Mini Project – Online Agriculture Product
Marketing

CHAPTER 4

IMPLEMENTATION
4.1 User Registration Module

Process Name : User Registration

Process Number : 1.1

Input : Name

: Username

: Mobile number
: Email

: Password
: Confirm Password
: Address

Output : Status Message

Error Condition : Username Already Exists

: Passwords do not match

: All Fields are Required

Table 4.1.1: User Registration Module

Process Name : User Login

Process Number : 1.2

: Username

Input : Password

Dept. of CSE, DSATM 2018-19 Page 13


DBMS Mini Project – Online Agriculture Product
Marketing

Output : Status Message

Error Condition : Invalid Username or Password

: All Fields are Required

Table 4.1.2 : User Login

Process Name : Upload Product

Process Number : 2.1

Input : Image

: Category and Product Name

: Price

Output : Status Message

Error Condition : Image not choosen

:Enter Price

Table 4.2.1 : Upload Product

Process Name : Digital Market

Process Number : 2.2

Input : select category

Output : Products availability

Error Condition : No product in that category

Table 4.2.2 :Digital Market

Dept. of CSE, DSATM 2018-19 Page 14


DBMS Mini Project – Online Agriculture Product
Marketing

Process Name : Order Details

Process Number : 4.2.3

Input : Name

: City

: Mobile No

: Email

: PIN Code

: Address

Output : Status Message

Error Condition : PIN Code not exist

: All fields are Required

Table 4.2.3 :Order Details

Process Name : MyCart

Process Number : 4.2.4

Output : Available Product Details

Error Condition : Product not available

Table 4.2.4 :MyCart

Dept. of CSE, DSATM 2018-19 Page 15


DBMS Mini Project – Online Agriculture Product Marketing

Stored Procedure:
The Stored procedure implemented in the project for :

helps to retrieve the product details.

CREATE PROCEDURE getDetails(fid int(255),pid int(255),product varchar(255), pcat


varchar(255), price float, pimage varchar(255), picstatus int(10), certified varchar(30));

BEGIN
SELECT * from fproduct(fid,pid,product,pcat,price,pimage,picstatus,certified);
END

Trigger:
The trigger is implemented for :

To maintain the history of user details.

CREATE TRIGGER `after_farmer_insert` AFTER INSERT ON `farmer` FOR EACH


ROW
BEGIN

insert into farmer_backup values(NEW.fid, NEW.fname,NEW.fusername,


NEW.fpassword, NEW.fhash, NEW.femail, NEW.fmobile, NEW.faddress,
NEW.factive, NEW.frating, NEW.picExt, NEW.picStatus);

END

Dept. of CSE, DSATM 2018-19 Page 16


DBMS Mini Project – Online Agriculture Product Marketing

CHAPTER 5

SOURCE CODE
Sample Source code to view the product:

Filename: review.php

<?php
session_start();
require 'db.php';
$pid = $_GET['pid'];
?>

<!DOCTYPE html>
<html>
<head>
<title>Krishi: Product</title>
<meta lang="eng">
<meta charset="UTF-8">
<title>Krishi</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
</head>
<body>

<?php
require 'menu.php';

$sql="SELECT * FROM fproduct WHERE pid = '$pid'";


$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);

$fid = $row['fid'];
$sql = "SELECT * FROM farmer WHERE fid = '$fid'";

Dept. of CSE, DSATM 2018-19 Page 17


DBMS Mini Project – Online Agriculture Product Marketing

$result = mysqli_query($conn, $sql);


$frow = mysqli_fetch_assoc($result);
$picDestination = "images/productImages/".$row['pimage'];

?>
<div class="container">
<div class="row">
<div class="col-sm-4">
<img class="image fit" src="<?php echo $picDestination.'';?>" alt="" />
</div><!-- Image of farmer-->

<div class="col-12 col-sm-6" action="submit_btn.php">

<p style="font: 50px Times new roman;"><?= $row['product']; ?></p>


<p style="font: 30px Times new roman;">Product Owner : <?= $frow['fname']; ?></p>
<p style="font: 30px Times new roman;">Certified by : <?= $row['certified']; ?></p>
<p style="font: 30px Times new roman;">Price per kg: <?= $row['price'].' /-'; ?></p>
<h4 clss="text-danger">
</div><br />
<div class="row">
<div class="col-12 col-sm-12" style="font: 25px Times new roman;">
</div>
</div>
</div>
<br /><br />

<div class="12u$">
<center>
<div class="row uniform">
<div class="6u 12u$(large)">
<a href="myCart.php?flag=1&pid=<?= $pid; ?>" class="btn btn-primary" style="text-
decoration: none;"><span class="glyphicon glyphicon-shopping-cart"> AddToCart</a>
</div>
<div class="6u 12u$(large)">
<a href="buyNow.php?pid=<?= $pid; ?>" class="btn btn-primary"
style="text-decoration: none;">Buy Now</a>
</div>
</div>
</center>
</div

Dept. of CSE, DSATM 2018-19 Page 18


DBMS Mini Project – Online Agriculture Product Marketing

<div class="container">
<h1>Product Reviews</h1>
<div class="row">
<?php
$sql = "SELECT * FROM review WHERE pid='$pid'";
$result = mysqli_query($conn, $sql);
?>
<div class="col-0 col-sm-3"></div>
<div class="col-12 col-sm-6">
<?php
if($result) :
while($row1 = $result->fetch_array()) :
?>
<div class="con">
<div class="row">
<div class="col-sm-4">
<em style="color: black;"><?= $row1['comment']; ?></em>
</div>
<div class="col-sm-4">
<em style="color: black;"><?php echo "Rating : ".$row1['rating'].' out of 10';?></em>
</div>
</div>
<span class="time-right" style="color: black;"><?php echo "From: ".$row1['name']; ?></span>
<br /><br />
</div>
<?php endwhile; endif;?>
</div>
</div>
</div>

Dept. of CSE, DSATM 2018-19 Page 19


DBMS Mini Project – Online Agriculture Product Marketing

<?php
?>
<div class="container">
<p style="font: 20px Times new roman; align: left;">Rate this product</p>
<form method="POST" action="reviewInput.php?pid=<?= $pid; ?>">
<div class="row">
<div class="col-sm-7">
</div>
<div class="col-sm-5">
<br />
Rating: <input type="number" min="0" max="10" name="rating" value="0"/>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<br />
<input type="submit" />
</div>
</div>
</form>
</div>

</body>
</html>

Dept. of CSE, DSATM 2018-19 Page 20


DBMS Mini Project – Online Agriculture Product Marketing

CHAPTER 6

CONCLUSION AND FUTURE WORK


The present project has been developed to meet the aspirations indicated in the modern age.

Through the developed project, anyone can visualize the effectiveness and efficiency in the real

life. It is very helpful for computerization or doing automation of a personal information

management system. This program helps reduce the manual method and stress which is done

by a person and that is time consuming and lengthy process. With this application user’s

information are stored very efficiently in a secured database. Trend of information

improvement in the generation has improved the quality and services of human operation just

as the case of this application for job services has reduce the mobility rate of human and

improve their standard of database storage.

6.1 Advantages

• This Marektting System avoids Manual inefficient method


• Web-based
• Eradicates third person(Agent) involvement
• Provides fresh products for the customers

6.2 Future Enhancements

The future plan of this project is to improved design; implementation and documentation in
such a way that anyone can use this project for better perform. I will develop the site more
dynamically.

Dept. of CSE, DSATM 2018-19 Page 21


DBMS Mini Project – Online Agriculture Product Marketing

BIBLIOGRAPHY
BOOK REFERENCES:

Learn to Code HTML and CSS: Develop and Style Websites (Web Design
Courses) 1st, Kindle Edition by Shay Howe

PHP 6 and MySQL 5 - Larry Ullman

WEBSITE REFERENCES:
HTML Learning:
https://www.codecademy.com/
https://dash.generalassemb.ly/
https://www.w3schools.com/

PHP Learning:
http://www.tutorialspoint.com/php/
https://killerphp.com
https://www.w3schools.com/

Dept. of CSE, DSATM 2018-19 Page 22


DBMS Mini Project – Online Agriculture Product Marketing

PERSONAL DETAILS

NAME: SURYA K S
USN: 1DT16CS107
SEMESTER AND SECTION: 5TH SEM, B SEC
COLLEGE: DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND MANAGEMENT
EMAIL ID: suryasrinivas7098@gmail.com

Dept. of CSE, DSATM 2018-19 Page 23

You might also like