Академический Документы
Профессиональный Документы
Культура Документы
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE & ENGINEERING
Submitted by
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.
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.
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.
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 .
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.
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.
RAM 4.00 GB
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
PHNO MA_ID
VILLAGE
M
NAME MANAME M
CHECK
ITEM ORDER
CHECK ITEM
AVAILABLE AVAILABLE
ORD
QUANT
N
CROP_ID
CROP
NAME
SEASON C PHNO C_ID
CNAME
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
5. IMPLEMENTATION
5.1 Backend Implementation
......
);
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.).
AMOUNT_REC number(10),
PASSWORD varchar(20));
COMPANY_NAME varchar(20),
PH-NO varchar(15),
ORD_AMT number(10),
ORD-DATE date,
DEL_DATE date,
PASSWORD varchar(20));
C_NAME varchar(20),
C_ADDRESS varchar(20),
C_PHNO varchar(20),
PASSWORD varchar(20));
CROP_NAME varchar(20),
SEASON_MONTH varchar(20),
CROP_NAME varchar(20),
SEASON_MONTH varchar(20),
QUANT_AVAILABLE number(10)),
ORD_QUANT NUMBER(10),
F_NAME VARCHAR2(20)
ACRES_OF_LAND NUMBER(10)
VILLAGE_NAME VARCHAR2(20)
AMT_REC NUMBER(10)
PASSWORD VARCHAR2(20)
MA_NAME VARCHAR2(20)
COMPANY_NAME VARCHAR2(20)
PH-NO VARCHAR2(20)
ORD_DATE DATE
DELETE_DATE DATE
PASSWORD VARCHAR(20)
SQL>DESC CUSTOMER;
C_NAME VARCHAR(20)
C_ADDRESS VARCHAR(20)
C_PHNO VARCHAR(20)
PASSWORD VARCHAR(20)
CROP_NAME VARCHAR(20)
SEASON_MONTH VARCHAR(20)
SQL>DESC CHECK_ITEM_AVAILABLE;
MA_ID NUMBER(10)
CROP_ID NUMBER(10)
QUANT_AVAILABLE NUMBER(10)
SQL>DESC ORDERS;
CROP_ID NUMBER(10)
ORD_QUANT NUMBER(10)
C_ID NUMBER(10)
MA_ID NUMBER(10)
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");
}%>
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>
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);
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+"'");
6. SNAPSHOTS
Welcome Page:
Login Page:
Insert Page:
Delete Page:
Update page:
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.
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