Вы находитесь на странице: 1из 27

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belgaum-590018, Karnataka State, India

A Mini Project Report On


“Online Organic Supply”
(Agriculture)
Submitted in Partial fulfillment of the Requirements for the award of
Degree
Of

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE & ENGINEERING

Submitted by

NAME: MONISHA.SANDUR NAME: JAWARIA AFSHAN


USN: 1CD16CS087 USN: 1CD14CS063

Under the Guidance of

Mrs. Priyadarshini M Mrs. Sathya Priya


Associate Professor, Assistant Professor,
CSE Department, CITech CSE Department, CITech

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Cambridge Institute of Technology


K R Puram, Bangalore-560036, Karnataka, India
CAMBRIDGE INSTITUTE OF TECHNOLOGY

CERTIFICATE
This is to certify that the Database Management System mini project entitled “Online
Organic Supply(Agriculture)” has been carried out by Monisha Sandur (1CD16CS087), and
Jawaria Afshan (1CD14CS063) are bonafide students of Cambridge Institute of Technology
in partial fulfillment for Fifth Semester of Bachelor of Engineering in Computer Science and
Engineering of the Visvesvaraya Technological University, Belgaum during the year 2018-
2019. It is certified that all corrections/suggestions indicated for Internal Assessment have been
incorporated in the Report. The Database Project Report has been approved as it satisfies the
academic requirements in respect of project work prescribed for the said Semester.

Internal Guides: HOD

1) Mrs. Priyadarshini M Dr. Shashi Kumar D.R


Dept. of CSE, CiTech Dept. of CSE, CiTech

2) Mrs. Sathya Priya


Dept. of CSE, CiTech

Examiners:

1) 2)
ACKNOWLEDGEMENT
I take great pleasure in expressing our sincere gratitude to Dr. Suresh L principal of
Cambridge Institute of Technology for giving us an opportunity to computerize this project.

I wish to express our gratitude to Dr. Shashi Kumar D.R, Professor and Head of
Department of Computer Science and Engineering for providing such a healthy environment
for the successful completion of Project work.

Our Sincere thanks to Mrs. Sathya Priya, Associate Professor Department of Computer
Science and Engineering and Mrs. Priyadarshini M, Assistant Professor, Department of
Computer Science and Engineering for their expert guidance, initiative and providing a good
working environment and for their constant support and encouragement throughout the project.

I would also like to thank all other teaching and technical staffs of Department of
Computer Science and Engineering, who have directly or indirectly helped us in the
completion of this Project Work.

And lastly we would hereby acknowledge and thank our parents who have been a source
of inspiration and also instrumental in the successful completion of this project.

MONISHA SANDUR (1CD16CS087)

JAWARIA AFSHAN (1CD14CS063)


ABSTRACT
Now a days we buy vegetables either from a wholesale market or from grocery shops nearby,
the vegetables which we buy from the market won’t be fresh.
Inorder to supply fresh organic vegetables ”The Online Organic Supply” unites the Customer and
the Farmer together with the help of a Middle Agent who acts as a Intermediator.

This will help the Customer receive fresh organic vegetables by approaching the Middle Agent
who will interact with the Farmer for the order which was placed.This will help Farmer supply
surplus amount of their crops and earn money.

Here we are maintaining a database of the Farmer,Middle Agent,Customer,Crops,Check item


available and Orders.

The main motive of the project is to help farmer to supply the crops in a feasible manner and
customer to receive fresh organic vegetables .

This project entitled “Online Organic Supply” is an implementation of the above


description.
This is a java project using JSP servlet technology and Sqlplus database. The methodology
used by us is object oriented model. The present includes system planning, requirement analysis,
system design, programming, system testing and evaluation of the project. This project is
utilizing Relational Databases as back-end and JSP as the front end. Interface with the Database
used is the application being developed in SQL server (ODBC driver). Interface with the user is
using Java such that the application assumes its users to be novice and having an extremely
simple and user-friendly interface.
Table of Contents

Sl.No Topic Title Page No.

1 Introduction 6

2 Requirements 7

3 ER-Diagram 8

4 Schema Diagram 9

5 Implementation 10

6 Snapshots 21

7 Conclusion 26

8 References 27
Online Organic Supply

1. INTRODUCTION
The Online Organic Supply (Agriculture) is based on providing organic fresh vegetables
and fruits to the customer rather than buying the vegetables from the market which wouldn’t be
fresh. It helps in linking the customer indirectly with the farmer with the help of an intermediator
who is the middle agent.

The main features of Online Organic Supply:

1. It provides fresh vegetables.

2. Customers need not go to markets to buy vegetables.

3. Farmers and Middle Agent can earn money through this easily.

4. They can insert, update, and delete the details which they require.

5. Vegetables and Fruits will be delivered to their door step and are very fresh.

This is one of the easy ways of delivering the vegetables and fruits grown by the farmer in a very
feasible manner and it will help customer receive fresh organic vegetables and fruits..

The customer can check which middle agent is available and can contact them to place order of
the crop they want.

The middle agent will check which customer has contacted them and will place the order to the
farmer who has that particular crop and deliver it to the customer.

The farmer will receive orders placed by the middle agent and will check if he has that crop and
then he will supply it to the middle agent and receives money.

Now a days in this modern day of life where everyone have become busy in their day to day
schedule and are not even getting time to buy fresh fruits and vegetables, are intended to buy
whatever is available in the market and are not noticing the quality of vegetables and fruits which
they are buying.

As a result we buy such kind of vegetables and fruits and we at times tend to fall sick and not
only this the farmers who work from morning till night spending their time only on growing crops
aren’t receiving much benefit .
Hence this is one of the easier and safest ways and can solve the problems faced by the farmer
and customer.

Department of CSE Page 6


Online Organic Supply

2. HARDWARE AND SOFTWARE REQUIREMENTS

• Software Requirement Specifications

Operating System : Windows 8.1

Front End : JSP (Java Server Pages)

Back End : Sqlplus


Server : Apache Tomcat 8.0.27.0
Documentation : Microsoft Word 2012

• Hardware Requirement Specifications

Computer Processor Intel(R) Core (TM)i3-5010U

Processor Speed 2.10 GHz Processor

Hard Disk 400 GB or more

RAM 4.00 GB

Department of CSE Page 7


Online Organic Supply

3. ENTITY RELATIONSHIP DIAGRAM

An entity relationship diagram (ERD) shows the relationships of entity sets stored in a
database. An entity in this context is a component of data. In other words, ER diagrams
illustrate the logical structure of databases.

ORD ORD
DEL COMPANY
FNAME ACRES AMT DATE
F_ID DATE NAME
OF LAND

AMT M SUPPLY N MIDDLE_AGENT


FARMER
REC

PHNO MA_ID
VILLAGE
M
NAME MANAME M

CHECK
ITEM ORDER
CHECK ITEM
AVAILABLE AVAILABLE

ORD
QUANT

N
CROP_ID

CROP C ADDRESS CUSTOMER

CROP
NAME
SEASON C PHNO C_ID
CNAME

Department of CSE Page 8


Online Organic Supply

4. SCHEMA DIAGRAM
A database schema is the skeleton structure that represents the logical view of the entire
database. It defines how the data is organized and how the relations among them are associated.
It formulates all the constraints that are to be applied on the data.
A database schema defines its entities and the relationship among them.It
contains a descriptive detail of the database, which can be depicted by means of
schema diagrams.

FARMER
F_ID F_NAME ACRES_OF_LAND VILLAGE_NAME AMT_REC PASSWORD

MIDDLE_AGENT
MA_ID MA_NAME COMPANY_NAME PH-NO ORD_AMT ORD_DATE DEL_DATE PASSWORD

CUSTOMER
C_ID C_NAME C_ADDRESS C_PHNO PASSWORD

CROP
CROP_ID CROP_NAME SEASON_MONTH

CHECK_ITEM_AVAILABLE
F_ID MA_ID CROP_ID QUANT_AVAILABLE

ORDERS

ORD_ID CROP_ID ORD_QUANT C_ID MA_ID

Department of CSE Page 9


Online Organic Supply

5. IMPLEMENTATION
5.1 Backend Implementation

5.1.1 Create Statement

The CREATE TABLE statement is used to create a new table in a database.


SYNTAX

CREATE TABLE table_name (


column1 datatype,
column2 datatype,
column3 datatype,

......
);

The column parameters specify the names of the columns of the table.

The data type parameter specifies the type of data the column can hold (e.g.
varchar, integer, date, etc.).

SQL> CREATE TABLE FARMER(

F_ID number (10) primary key,

F_NAME varchar (20),

ACRES_OF LAND number (10),

VILLAGE_NAME varchar (20),

AMOUNT_REC number(10),

PASSWORD varchar(20));

SQL> CREATE TABLE MIDDLE_AGENT (

MA_ID number (10) primary key,

MA_NAME varchar (20),

COMPANY_NAME varchar(20),

Department of CSE Page 10


Online Organic Supply

PH-NO varchar(15),

ORD_AMT number(10),

ORD-DATE date,

DEL_DATE date,

PASSWORD varchar(20));

SQL> CREATE TABLE CUSTOMER(

C_ID number(10) primary key,

C_NAME varchar(20),

C_ADDRESS varchar(20),

C_PHNO varchar(20),

PASSWORD varchar(20));

SQL> CREATE TABLE CROP(

CROP_ID number(10) primary key

CROP_NAME varchar(20),

SEASON_MONTH varchar(20),

SQL> CREATE TABLE CHECK_ITEM_AVAILABLE(

F_ID number(10) references FARMER(F_ID) ON DELETE CASCADE,

CROP_ID number(10) primary key

CROP_NAME varchar(20),

SEASON_MONTH varchar(20),

MA_ID number(10) references MIDDLE_AGENT(MA_ID) ON DELETE CASCADE,

CROP_ID number(10) references CROP(CROP_ID) ON DELETE CASCADE,

Department of CSE Page 11


Online Organic Supply

QUANT_AVAILABLE number(10)),

SQL>CREATE TABLE ORDERS(

ORD_ID number(10) primary key

CROP_ID number(10) references CROP(CROP_ID) ON DELETE CASCADE,

ORD_QUANT NUMBER(10),

C_ID number(10) references CUSTOMER(C_ID) ON DELETE CASCADE,

MA_ID number(10) references MIDDLE_AGENT(MA_ID) ON DELETE CASCADE,

5.1.2 Describe Statement


SQL> DESC FARMER;
Name Null? Type
-------------------------------- -------------- ----------------------------

F_ID NOT NULL NUMBER(10)

F_NAME VARCHAR2(20)

ACRES_OF_LAND NUMBER(10)

VILLAGE_NAME VARCHAR2(20)

AMT_REC NUMBER(10)

PASSWORD VARCHAR2(20)

SQL> DESC MIDDLE_AGENT;

Name Null? Type

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

MA_ID NOT NULL NUMBER(10)

MA_NAME VARCHAR2(20)

COMPANY_NAME VARCHAR2(20)

Department of CSE Page 12


Online Organic Supply

PH-NO VARCHAR2(20)

ORD_ AMT NUMBER(10)

ORD_DATE DATE

DELETE_DATE DATE

PASSWORD VARCHAR(20)

SQL>DESC CUSTOMER;

Name Null? Type

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

C_ID NOT NULL NUMBER(10)

C_NAME VARCHAR(20)

C_ADDRESS VARCHAR(20)

C_PHNO VARCHAR(20)

PASSWORD VARCHAR(20)

SQL> DESC CROP;

Name Null? Type

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

CROP_ID NOT NULL NUMBER(10)

CROP_NAME VARCHAR(20)

SEASON_MONTH VARCHAR(20)

SQL>DESC CHECK_ITEM_AVAILABLE;

Name Null? Type

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

Department of CSE Page 13


Online Organic Supply

F_ID NOT NULL NUMBER(10)

MA_ID NUMBER(10)

CROP_ID NUMBER(10)

QUANT_AVAILABLE NUMBER(10)

SQL>DESC ORDERS;

Name Null? Type

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

ORD_ID NOT NULL NUMBER(10)

CROP_ID NUMBER(10)

ORD_QUANT NUMBER(10)

C_ID NUMBER(10)

MA_ID NUMBER(10)

5.1.3 Insert Statement


The INSERT statement adds one or more new rows of data to a database table.
SYNTAX
Insert into table_name values (value1,value2....)
SQL>insert into farmer
(F_ID,F_NAME,ACRES_OF_LAND,VILLAGE_NAME,AMT_REC,PASSWORD)
values(1001,’HARISH’,2,’BAGALKOT’,1000,’HARI’);
SQL>insert into middle_agent
(MA_ID,MA_NAME,COMPANY_NAME,PH-NO,ORD_AMT,ORD-DATE,DEL-
. DATE,PASSWORD)
values(41,'SOMNATH','RR HAMILTON','9980763491',300,’2018-05-04’,’2018-05-
18 ’,’SOMN);

Department of CSE Page 14


Online Organic Supply

SQL>insert into customer


(C_ID,C_NAME,C_PHNO,C_ADDRESS,PASSWORD)
values(701,’GEETHA’,’9973496131’,’FLAT #4 ROAD
6,KALYANAGAR,BANGALORE’,’GEET’);
SQL>insert into crop
(CROP_ID,CROP_NAME,SEASON_MONTH)
values(1,’TOMATO’,’AUGUST’,’JULY’,’DECEMBER’,’APRIL’,’FEBRUARY’);
SQL>insert into check_item_available
(F_ID,MA_ID,CROP_ID,QUANT_AVAILABLE)
values(1001,41,9,10);
SQL>insert into orders
(ORD_ID,CROP_ID,ORD_QUANT,C_ID,MA_ID)
values(100,9,1,701,41);

Department of CSE Page 15


Online Organic Supply

5.2 Front End Implementation


Welcome.html
<html>
<head>
<style>
h1 {
color: black;
text-align: center;
font-size: 300%;
}
</style>
</head>
<body style="background-image:url('s_1.jpg')">
<a href="About.jsp">About</a>
<h1><B>WELCOME</B></h1>
<br>
<form method="post" action="LOGIN.html"><p align="center">
<input type="submit" value="FARMER LOGIN">
</form><br>
<form method="post" action="Mlogin.html"><p align="center">
<input type="submit" value="MIDDLE AGENT LOGIN">
</form><br>
<form method="post" action="Clogin.html"><p align="center">
<input type="submit" value="CUSTOMER LOGIN">
</form>
</body>

Department of CSE Page 16


Online Organic Supply

Login.jsp
<%@page import="java.sql.*"%>
<%@page import="java.sql.*"%>
<% String F_NAME=request.getParameter("user");
session.putValue("F_NAME",F_NAME);
String PASSWORD=request.getParameter("pwd");
Class.forName("oracle.jdbc.driver.OracleDriver");
java.sql.Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","monisha1","moni123");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM FARMER WHERE
F_NAME='"+F_NAME+"'");
if(rs.next())
{
if(rs.getString(6).equals(PASSWORD))
{
out.println("WELCOME"+F_NAME);
}
else
{
out.println("Invalid password try again");
}
}
else
{
out.println("Invalid user try again");
}%>

Department of CSE Page 17


Online Organic Supply

Insert.jsp
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.*,java.util.*"%>
<%
String F_ID=request.getParameter("F_ID");
String F_NAME=request.getParameter("F_NAME");
String ACRES_OF_LAND=request.getParameter("ACRES_OF_LAND");
String VILLAGE_NAME=request.getParameter("VILLAGE_NAME");
String AMT_REC=request.getParameter("AMT_REC");
String PASSWORD=request.getParameter("PASSWORD");
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con
=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","monisha1","moni123");
Statement st = con.createStatement();
int i=st.executeUpdate("INSERT INTO
FARMER(F_ID,F_NAME,ACRES_OF_LAND,VILLAGE_NAME,AMT_REC,PASSWORD)V
ALUES('"+F_ID+"','"+F_NAME+"','"+ACRES_OF_LAND+"','"+VILLAGE_NAME+"','"+AM
T_REC+"','"+PASSWORD+"')");
out.println("Data is successfully inserted");
}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
%>
<a href="LOGIN.html"><input type="submit" value="BACK" align="center" /></a>

Department of CSE Page 18


Online Organic Supply

Delete.jsp
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.*,java.util.*"%>
<%
String F_ID=request.getParameter("F_ID");

try{

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con
=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","monisha1","moni123");
Statement st = con.createStatement();
int i=st.executeUpdate("DELETE FROM FARMER WHERE F_ID="+F_ID);

out.println("Data is deleted successfully ");


}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>

Department of CSE Page 19


Online Organic Supply

Update.jsp
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.*,java.util.*"%>

<%
String F_ID=request.getParameter("F_ID");
String F_NAME=request.getParameter("F_NAME");
String ACRES_OF_LAND=request.getParameter("ACRES_OF_LAND");
String VILLAGE_NAME=request.getParameter("VILLAGE_NAME");
String AMT_REC=request.getParameter("AMT_REC");
String PASSWORD=request.getParameter("PASSWORD");

try{

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con
=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","monisha1","moni123");
Statement st = con.createStatement();
Int i=st.executeUpdate ("update FARMER set F_NAME='"+F_NAME+"',
ACRES_OF_LAND='"+ACRES_OF_LAND+"', VILLAGE_NAME='"+VILLAGE_NAME+"',
AMT_REC='"+AMT_REC+"', PASSWORD='"+PASSWORD+"' where F_ID='"+F_ID+"'");

out.println("Data is successfully Updated");


}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>
<a href="LOGIN.html"><input type="submit" value="BACK" align="center" /></a>

Department of CSE Page 20


Online Organic Supply

6. SNAPSHOTS
Welcome Page:

Department of CSE Page 21


Online Organic Supply

Login Page:

Department of CSE Page 22


Online Organic Supply

Insert Page:

Department of CSE Page 23


Online Organic Supply

Delete Page:

Department of CSE Page 24


Online Organic Supply

Update page:

Department of CSE Page 25


Online Organic Supply

7.CONCLUSION:
The following Conclusions can be deduced from the project:

 It provides easy access for farmer ,middle agent and customer for buying the produce and
selling their produce
 It is one of the most convenient way of producing their crop
 It is common platform for the farmer, middle agent and customer
 This project will help the farmers and customers in near future if they are facing any
problem.

ADVANTAGES:
 Online Organic Supply provides easy access to the farmers, middle agent and customer
 The farmer can earn money easily by selling their crop to middle agent on receiving the
orders placed by the customer
 It is a common platform to Farmer, Middle Agent and Customer so that they need not face
any problem.

Department of CSE Page 26


Online Organic Supply

8.REFERENCES:
 http://www.google.com/
 http://www.roseindia.com/
 http://www.w3schools.com/
 Java Complete Reference J2EEHerbert Scheldt: JAVA the Complete Reference,
7th/9th Edition, Tata McGraw Hill, 2007.
 Jim Keogh:J2EE-TheCompleteReference,McGraw Hil,2007

Department of CSE Page 27

Вам также может понравиться