You are on page 1of 50

Bapuji Institute of Engineering and Technology

Davangere -577004

Department of Computer Science and Engineering

CERTIFICATE
This is to certify that KEERTHANA S AND LAXMI ANGADI bearing USN 4BD18CS033 AND
4BD18CS037 respectively of Computer Science and Engineering department have satisfactorily submitted the
mini project report entitled “AGRICULTURE PRODUCT MANAGEMENT SYSTEM” for DATABASE
MANAGEMENT SYSTEM LABORATORY (18CSL58). The report of the mini project has been approved
as it satisfies the academic requirements in respect of mini project work prescribed for the year 2020-2021.

Project Guide Project Guide


________________________ _______________________
Prof. Vaishnavi Inamdar Prof. Shryavani K
Department of CS&E, Department of CS&E,
B.I.E.T.,Davangere . B.I.E.T.,Davangere.
Head of Department

Dr. Nirmala C R Ph.D.,


Prof.& Head, Department of CS&E,
B.I.E.T., Davangere.

Date: Signature of Examiners:

Place: Davanagere (1)

(2) ___________________
ACKNOWLEDGEMENT

Salutations to our beloved and highly esteemed institute, “BAPUJI INSTITUTE OF ENGINEERING AND
TECHNOLOGY” for having well qualified staff and lab furnished with necessary equipments.

We express my sincere thanks to our guides Prof. Vaishnavi Inamdar and Prof. Shryavani K for giving us
constant encouragement, support and valuable guidance throughout the course of project without whose guidance
this project would not have been achieved..

We express whole hearted gratitude to Dr . Nirmala C R ,H.O.D of Computer Science &Engineering


Department. We wish to thank her for making our task easy by providing her valuable help and encouragement.

We also express our whole hearted gratitude to our principal, Dr . H B Aravind for his moral support and
encouragement.

We would like to extend our gratitude to all staff of Computer Science and Engineering Department for their
help and support. we have benefited a lot from the review, suggestions given by them.

We would like to extend our gratitude to all my family members and friends especially for their advice and moral
support.

KEERTHANA S (4BD18CS033)

LAXMI ANGADI (4BD18CS037)


VISION

To be a centre-of-excellence by imbibing state-of-the-art technology in the field of Computer Science and


Engineering, thereby enabling students to excel professionally and be ethically strong.

MISSION

M1 Adapting best teaching and learning techniques that cultivates Questioning and
Reasoning culture among the students.
M2 Creating collaborative learning environment that ignites the critical thinking in
students and leading to the innovation.
M3 Establishing Industry Institute relationship to bridge the skill gap and make them
industry ready and relevant.
M4 Mentoring students to be socially responsible by inculcating ethical and moral values.

PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

The graduates will be able

PEO1 To apply skills acquired in the discipline of Computer Science and Engineering for
solving societal and industrial problems with apt technology intervention.
PEO2 To continue their career in industry/academia or to pursue higher studies and research.
PEO3 To become successful entrepreneurs, innovators to design and develop software
products and services that meets the societal, technical and business challenges.
PEO4 To work in the diversified environment by acquiring leadership qualities with effective
communication skills accompanied by professional and ethical values.
PROGRAM SPECIFIC OUTCOMES (PSOs)

They are ability to acquire Knowledge

PSO1 Analyze and develop solutions for problems that are complex in nature but applying
the knowledge acquired from the core subjects of this program.
PSO2 To develop secure, Scalable, Resilient and distributed applications for industry and
societal requirements.
PSO3 To learn and apply the concepts and construct of emerging technologies like
Artificial Intelligence, Machine learning, Deep learning, Big Data Analytics, IOT,
Cloud Computing, etc for any real time problems.

COURSE OUTCOMES:

The students should be able to:


1. Use structured query language (SQL) for database creation and manipulation
2. Demonstrate the working of different concepts of DBMS
3. Implement and test the project developed for an application.

COURSE OBJECTIVES:

This course will able students to:


1. Foundation knowledge in database concepts, technology, and practice to groom students into well-
informed database application developers.
2. Strong practice in SQL programming through a various database problems.
3. Develop database application using front-end tools and back-end tools of DBMS
ABSTRACT
Agriculture product Management System helps the farmers to plan, monitor and analyse all activities on their
farm easily.

The admin can manage every action .. Here in order to use the system, you have to log in to the system. You
can either log in as a farmer or a buyer. For now, this project consists of only the farmer side. With the use of
this super system, the farmers can manage their products with more ease. Design of this project is pretty simple
so that the user won’t find any difficulties while working on it. This system in PHP helps the user in managing
inventory and transactions. To run this project you must have installed virtual server i.e XAMPP on your PC
(for Windows).
CONTENTS

ACKNOWLEDGEMENT i
ABSTRACT ii
CONTENTS iii
LIST OF FIGURES iv
LIST OF TABLES v
LIST OF ACRONYMS vi

CHAPTERS
1. INTRODUCTION 1
1.1 Introduction 1
1.2 Problem Statement 2
1.3 Objectives 3
1.4 Methodology 3

2. LITERATURE SURVEY 4
2.1 Existing System 4
2.2 Proposed System 4

3. SYSTEM REQUIREMENTS AND SPECIFICATION 5


3.1 Software Requirements 5
3.2 Hardware Requirements 5

4.SYSTEM DESIGN AND IMPLEMENTATION 6

4.1 Entity Relationship diagram 6


4.2 Description 7
4.3 seven steps to ER to Schema conversion 8-10
4.4 Schema disgram 11
4.5 Database description 12-14
4.6 Code 15
4.6.1 connection code for front end to back end 15
4.6.2 SQl code 15-20

5 RESULTS AND SNAPSHOTS 21-30

CONCLUSION AND FUTURE WORK 31

BIBILOGRAPHY 32
LIST OF FIGURES

Sl. No Fig. No Description Page No


01 5.1 Log in or Register Page 21

02 5.2 Sign-up Page 21

03 5.3 User Profile Page 22

04 5.4 Product Information Page 22

05 5.5 Digital Market Page 23

06 5.5.1 Digital Market Page 23

07 5.6 Sorting of Fruits Page 24

08 5.7 Sorting of Vegetables Page 24

09 5.8 Sort Grains Page 25

10 5.9 Complete view of bajra product 25

11 5.10 Complete view of wheat product 26

12 5.11 Complete view of massor product 26

13 5.12 Complete view of mango product 27

14 5.13 Complete view of apple product 27

15 5.14 Complete view of chikoo product 28

16 5.15 Complete view of ladyfinger product 28

17 5.16 Complete view of brinjal product 29

18 5.17 Complete view of mushroom product 29

19 5.18 My cart page 30

20 5.19 Transaction page 30


LIST OF TABLES

Sl. No Fig. No Description Page. No


01 4.5.1 Tables present in the agriculture product management 12
system

02 4.5.2 Registered farmers database 12

03 4.5.3 Products details 13

04 4.5.4 My cart 13

05 4.5.5 Review 14

06 4.5.6 Transaction 14

LIST OF ACRONYMS

Sl. No Acronym Description


01 SQL Standard Query Language

02 IMS Integrated Management System

03 IDMS Integrated Database Management System

04 DBMS Database Management System

05 RAM Random Access Memory

06 PHP Hypertext Preprocessor

07 HTML Hypertext Markup Language

08 CSS Cascading Style Sheet


Bapuji Institute of Engineering and Technology
Davangere -577004

Department of Computer Science and Engineering

CERTIFICATE
This is to certify that KEERTHANA S bearing USN 4BD18CS033 respectively of Computer Science
and Engineering department have satisfactorily submitted the mini project report entitled “AGRICULTURE
PRODUCT MANAGEMENT SYSTEM” for DATABASE MANAGEMENT SYSTEM LABORATORY
(18CSL58). The report of the mini project has been approved as it satisfies the academic requirements in respect
of mini project work prescribed for the year 2020-2021.

Project Guide Project Guide


________________________ _______________________
Prof. Vaishnavi Inamdar Prof. Shryavani K
Department of CS&E, Department of CS&E,
B.I.E.T.,Davangere . B.I.E.T.,Davangere.
Head of Department

Dr. Nirmala C R Ph.D.,


Prof.& Head, Department of CS&E,
B.I.E.T., Davangere.

Date: Signature of Examiners:

Place: Davanagere (1)

(2) ___________________
ACKNOWLEDGEMENT

Salutations to our beloved and highly esteemed institute, “BAPUJI INSTITUTE OF ENGINEERING AND
TECHNOLOGY” for having well qualified staff and lab furnished with necessary equipments.

We express my sincere thanks to our guides Prof. Vaishnavi Inamdar and Prof. Shryavani K for giving us
constant encouragement, support and valuable guidance throughout the course of project without whose guidance
this project would not have been achieved..

We express whole hearted gratitude to Dr . Nirmala C R ,H.O.D of Computer Science &Engineering


Department. We wish to thank her for making our task easy by providing her valuable help and encouragement.

We also express our whole hearted gratitude to our principal, Dr . H B Aravind for his moral support and
encouragement.

We would like to extend our gratitude to all staff of Computer Science and Engineering Department for their
help and support. we have benefited a lot from the review, suggestions given by them.

We would like to extend our gratitude to all my family members and friends especially for their advice and moral
support.

KEERTHANA S (4BD18CS033)
VISION

To be a centre-of-excellence by imbibing state-of-the-art technology in the field of Computer Science and


Engineering, thereby enabling students to excel professionally and be ethically strong.

MISSION

M1 Adapting best teaching and learning techniques that cultivates Questioning and
Reasoning culture among the students.
M2 Creating collaborative learning environment that ignites the critical thinking in
students and leading to the innovation.
M3 Establishing Industry Institute relationship to bridge the skill gap and make them
industry ready and relevant.
M4 Mentoring students to be socially responsible by inculcating ethical and moral values.

PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

The graduates will be able

PEO1 To apply skills acquired in the discipline of Computer Science and Engineering for
solving societal and industrial problems with apt technology intervention.
PEO2 To continue their career in industry/academia or to pursue higher studies and research.
PEO3 To become successful entrepreneurs, innovators to design and develop software
products and services that meets the societal, technical and business challenges.
PEO4 To work in the diversified environment by acquiring leadership qualities with effective
communication skills accompanied by professional and ethical values.
PROGRAM SPECIFIC OUTCOMES (PSOs)

They are ability to acquire Knowledge

PSO1 Analyze and develop solutions for problems that are complex in nature but applying
the knowledge acquired from the core subjects of this program.
PSO2 To develop secure, Scalable, Resilient and distributed applications for industry and
societal requirements.
PSO3 To learn and apply the concepts and construct of emerging technologies like
Artificial Intelligence, Machine learning, Deep learning, Big Data Analytics, IOT,
Cloud Computing, etc for any real time problems.

COURSE OUTCOMES:

The students should be able to:


1. Use structured query language (SQL) for database creation and manipulation
2. Demonstrate the working of different concepts of DBMS
3. Implement and test the project developed for an application.

COURSE OBJECTIVES:

This course will able students to:


1. Foundation knowledge in database concepts, technology, and practice to groom students into well-
informed database application developers.
2. Strong practice in SQL programming through a various database problems.
3. Develop database application using front-end tools and back-end tools of DBMS
ABSTRACT
Agriculture product Management System helps the farmers to plan, monitor and analyse all activities on their
farm easily.

The admin can manage every action .. Here in order to use the system, you have to log in to the system. You
can either log in as a farmer or a buyer. For now, this project consists of only the farmer side. With the use of
this super system, the farmers can manage their products with more ease. Design of this project is pretty simple
so that the user won’t find any difficulties while working on it. This system in PHP helps the user in managing
inventory and transactions. To run this project you must have installed virtual server i.e XAMPP on your PC
(for Windows).
CONTENTS

ACKNOWLEDGEMENT i
ABSTRACT ii
CONTENTS iii
LIST OF FIGURES iv
LIST OF TABLES v
LIST OF ACRONYMS vi

CHAPTERS
1. INTRODUCTION 1
1.1 Introduction 1
1.2 Problem Statement 2
1.3 Objectives 3
1.4 Methodology 3

2. LITERATURE SURVEY 4
2.1 Existing System 4
2.2 Proposed System 4

3. SYSTEM REQUIREMENTS AND SPECIFICATION 5


3.1 Software Requirements 5
3.2 Hardware Requirements 5

4.SYSTEM DESIGN AND IMPLEMENTATION 6

4.1 Entity Relationship diagram 6


4.2 Description 7
4.3 seven steps to ER to Schema conversion 8-10
4.4 Schema disgram 11
4.5 Database description 12-14
4.6 Code 15
4.6.1 connection code for front end to back end 15
4.6.2 SQl code 15-20

5 RESULTS AND SNAPSHOTS 21-30

CONCLUSION AND FUTURE WORK 31

BIBILOGRAPHY 32
LIST OF FIGURES

Sl. No Fig. No Description Page No


01 5.1 Log in or Register Page 21

02 5.2 Sign-up Page 21

03 5.3 User Profile Page 22

04 5.4 Product Information Page 22

05 5.5 Digital Market Page 23

06 5.5.1 Digital Market Page 23

07 5.6 Sorting of Fruits Page 24

08 5.7 Sorting of Vegetables Page 24

09 5.8 Sort Grains Page 25

10 5.9 Complete view of bajra product 25

11 5.10 Complete view of wheat product 26

12 5.11 Complete view of massor product 26

13 5.12 Complete view of mango product 27

14 5.13 Complete view of apple product 27

15 5.14 Complete view of chikoo product 28

16 5.15 Complete view of ladyfinger product 28

17 5.16 Complete view of brinjal product 29

18 5.17 Complete view of mushroom product 29

19 5.18 My cart page 30

20 5.19 Transaction page 30


LIST OF TABLES

Sl. No Fig. No Description Page. No


01 4.5.1 Tables present in the agriculture product management 12
system

02 4.5.2 Registered farmers database 12

03 4.5.3 Products details 13

04 4.5.4 My cart 13

05 4.5.5 Review 14

06 4.5.6 Transaction 14

LIST OF ACRONYMS

Sl. No Acronym Description


01 SQL Standard Query Language

02 IMS Integrated Management System

03 IDMS Integrated Database Management System

04 DBMS Database Management System

05 RAM Random Access Memory

06 PHP Hypertext Preprocessor

07 HTML Hypertext Markup Language

08 CSS Cascading Style Sheet


Agriculture Product Management System

Chapter 1
INTRODUCTION
1.1 INTRODUCTION
1.1.1 DATABASE MANAGEMENT SYSTEM

A database management system (DBMS) refers to the technology for creating and managing
databases. Basically, DBMS is a software tool to organize (create, retrieve, update and manage)
data in a database. The main aim of a DBMS is to supply a way to store up and retrieve database
information that is both convenient and efficient.
Database systems are meant to handle large collection of information. Management of data
involves both defining structures for storage of information and providing mechanisms that can
do the manipulation of those stored information. Moreover, the database system must ensure
the safety of the information stored, despite system crashes or attempts at unauthorized access.

1.1.2 HISTORY

Following the technology progress in the areas of processors, computer memory, computer
storage, and computer networks, the sizes, capabilities, and performance of databases and their
respective DBMSs have grown in orders of magnitude. The development of database
technology can be divided into three eras based on data model or structure: navigational,
SQL/relational, and post-relational.

The two-main early navigational data models were the hierarchical model, epitomized by
IBM's IMS system and the CODASYL model (network model), implemented in a number of
products such as IDMS.

The relational model, first proposed in 1970 by Edgar F. Codd, departed from this tradition by
insisting that applications should search for data by content, rather than by following links. The
relational model employs set of ledger-style tables, each used for a different type of entity.
Only in the mid-1980s did computing hardware become powerful enough to allow the wide
deployment of relational systems (DBMSs plus applications).

CS&E Dept, B.I.E.T Davangere Page 1


Agriculture Product Management System

By the early 1990s, however, relational systems dominated in all large-scale data
processing applications, and as of 2015 they remain dominant: IBM DB2, Oracle, MySQL,
and Microsoft SQL Server are the top DBMS. The dominant database language standardized
SQL for the relational model, has influenced database languages for other data models.

Object databases were developed in the 1980s to overcome the inconvenience of object-
relational impedance mismatch, which led to the coining of the term "post-relational" and also
the development of hybrid object-relational databases.

The next generation of post-relational databases in the late 2000s became known as NoSQL
databases, introducing fast key-value stores and document-oriented databases. A competing
"next generation" known as NoSQL databases attempted new implementations that retained
the relational/SQL model while aiming to match the high performance of NoSQL compared to
commercially available relational DBMS.

1.1.3 PHP (HYPERTEXT PREPROCESSOR)

PHP is the most popular and widely used server side scripting language for web development.
It is used to make the Dynamic pages in websites. Rasmus Lerdorf was the creator of PHP in
1995. PHP codes are embedding in HTML source codes for making the page dynamic. PHP
can deal with most of the requirements in web development like Database, File handling, String
operations, Arrays, Graphics, File Uploads, Data processing etc. PHP can be used in any
operating system with a web server Supports PHP. Apache web server is one of the popular
web server dealing with PHP + MySQL. Moreover PHP is absolutely free to use.

1.2 PROBLEM STATEMENT

Agriculture products management system is to help farmers by providing all kinds agriculture
related information in the website. Agriculture products management system is farmer
management website application which helps farmers to give best-practice farming processes.
It helps farmers to improve their productivity and profitability. It enables farmers to sell their
productions through online and farmers can purchase tools and seeds directly from seller.
Farmer can view labors profile and they can hire labors.

CS&E Dept, B.I.E.T Davangere Page 2


Agriculture Product Management System

1.3 OBJECTIVE
The objectives of this study are summarized below:
➢ To automate the new age Agriculture Product Management System.
➢ To monitor and control the online product purchase.

➢ To provide the buyers the information of their list of selected products and the price
list.
➢ To keep the track of buyers help them to buy products directly from farmers through
the Agriculture platform.

1.4 METHODOLOGY
The methodology of management should be developed on the basis of using various methods
of scientific research, as well as taking it to the imperatives of real agricultural production.
The methodology for managing the development of the agriculture product sector should be
implemented through the use of evolutionary, systemic , anti-crisis, reproductive,
intigratation, institutional, and adaptive approaches.

CS&E Dept, B.I.E.T Davangere Page 3


Agriculture Product Management System

CHAPTER 2
LITERATRE SURVEY
2.1 Existing systems:

1. Contact-based marketing
the farmer has to go to market to sell his product, which eventually increses the cost of the
produce. it is time consuming process, but easy to sell directly to the buyer. this is the most
common way to sell the agriculture products
2. Supermarkets:
cost and unnecessary taxes These are modern approach to sell the products from the farmers.
but it has high which will not benefit the farmers
3. online markets:
This place does not ensure the products are fresh and dies not give true value to the customer.
This may include adultration of products and misusing the farmers

2.2 Proposed system:


In the proposed system, this "Agriculture product management system" which will have the
identity for farmers. they can upload the products directly to the database and the customer
can directly buy the products which are fresh from farm.

CS&E Dept, B.I.E.T Davangere Page 4


Agriculture Product Management System

Chapter 3

SYSTEM REQIUREMENTS AND SPECIFICATION

3.1 Hardware requirements:

The hardware required for the development of this project is:

• Processor: Intel Core i3


• Processor speed: 1.7 GHz
• RAM: 2 GB RAM
• System Type: 64-Bit Operating System

3.2 Software requirements:

The software required for the development of this project is:

• Framework: XAMPP
• Operating System: Windows 7 (and other higher version)
• Front End: HTML, CSS
• Programming Language: PHP, HTML, CSS, Bootstrap, jQuery
• Data Base Environment: MySQL(Ver 15.1)
• Server: Apache/2.4.41

CS&E Dept, B.I.E.T Davangere Page 5


Agriculture Product Management System

Chapter 4
SYTEM DESIGN AND IMPLEMETATION
4.1 ENTITY - RELATIONSHIP DIAGRAM

Fig 4.1: Entity Relationship Diagram of Agriculture products Management System

CS&E Dept, B.I.E.T Davangere Page 6


Agriculture Product Management System

Entity Attribute

Primary Key
Relationship Type

1 N
Cardinality ratio

4.2 DESCRIPTION :
The ER Model figure shows the proposed system. It defines the conceptual view of the
database. It works around real-world entities and the associations among them .At view level,
the ER model is considered a good option for designing databases .So, let’s see each entity.

Buyer
The entity stores the information about the customers who have been logged in to buy the
products from farmer . Through our database system.

Farmer
This entity show the information about all the farmers. The attributes are f-id , f-name ,
username , password , email , mobile and etc.

Farmer product
This entity shows the details of the products that are there in digital format.

Review
This entity shows the information about the reviews given by the customers.
My Cart
This entity shows the information about the products selected by the customer.

Transaction
This entity shows the transaction information about the transaction done by the farmer/buyer.

CS&E Dept, B.I.E.T Davangere Page 7


Agriculture Product Management System

4.3 SEVEN STEPS FOR ER TO SCHEMA CONVERSION


Step 1: Mapping of Regular Entity Types.
For each regular (strong) entity type E in the ER schema, create a relation R that includes all
the simple attributes of E. Include only the simple component attributes of a composite
attribute. Choose one of the key attributes of E as the primary key for R. If the chosen key of
E is a composite, then the set of simple attributes that form it will together form the primary
key of R. If multiple keys were identified for E during the conceptual design, the information
describing the attributes that form each additional key is kept in order to specify secondary
(unique) keys of relation R. Knowledge about keys is also kept for indexing purposes and other
types of analyses.

Step 2: Mapping of Weak Entity Types.


For each weak entity type W in the ER schema with owner entity type E, create a relation
R and include all simple attributes (or simple components of composite attributes) of was
attributes of R. In addition, include as foreign key attributes of R, the primary key attribute(s)
of the relation(s) that correspond to the owner entity type(s); this takes care of mapping the
identifying relationship type of W. The primary key of R is the combination of the primary
key(s) of the owner(s) and the partial key of the weak entity type W, if any. If there is a weak
entity type E2 whose owner is also a weak entity type E1, then E1 should be mapped before
E2 to determine its primary key first.

Step 3: Mapping of Binary 1:1 Relationship Types.


For each binary 1:1 relationship type R in the ER schema, identify the relations S and T that
correspond to the entity types participating in R. There are three possible approaches:
1. The foreign key approach.
2. The merged relationship approach, and
The first approach is the most useful and should be followed unless special conditions exist, as
we discuss below.
1. Foreign key approach:
Choose one of the relations—S, say—and include as a foreign key in S the primary key of T.
It is better to choose an entity type with total participation in R in the role of S. Include all the
simple attributes (or simple components of composite attributes) of the 1:1 relationship type R
as attributes of S.

CS&E Dept, B.I.E.T Davangere Page 8


Agriculture Product Management System

2. Merged relation approach:


An alternative mapping of a 1:1 relationship type is to merge the two entity types and the
relationship into a single relation. This is possible when both participations are total, as this
would indicate that the two tables will have the exact same number of tuples at all times.
3. Cross-reference or relationship relation approach:
The third option is to set up a third relation R for the purpose of cross-referencing the primary
keys of the two relations S and T representing the entity types. As we will see, this approach is
required for binary M:N relationships. The relation R is called a relationship relation (or
sometimes a lookup table), because each tuple in R represents a relationship instance that
relates one tuple from S with one tuple from T. The relation R will include the primary key
attributes of S and T as foreign keys to S and T. The primary key of R will be one of the two
foreign keys, and the other foreign key will be a unique key of R. The drawback is having an
extra relation, and requiring an extra join operation when combining related tuples from the
tables.

Step 4: Mapping of Binary 1:N Relationship Types.


For each regular binary 1:N relationship type R, identify the relation S that represents the
participating entity type at the N-side of the relationship type. Include as foreign key in S the
primary key of the relation T that represents the other entity type participating in R; we do this
because each entity instance on the N-side is related to at most one entity instance on the 1-side
of the relationship type. Include any simple attributes (or simple components of composite
attributes) of the 1:N relationship type as attributes of S.

Step 5: Mapping of Binary M:N Relationship Types.


For each binary M:N relationship type R, create a new relation S to represent R. Include as
foreign key attributes in S the primary keys of the relations that represent the participating
entity types; their combination will form the primary key of S. Also include any simple
attributes of the M:N relationship type (or simple components of composite attributes) as
attributes of S.
Notice that we cannot represent an M:N relationship type by a single foreign key attribute in
one of the participating relations (as we did for 1:1 or 1:N relationship types) because of the
M:N cardinality ratio; we must create a separate relationship relation S.

CS&E Dept, B.I.E.T Davangere Page 9


Agriculture Product Management System

Step 6: Mapping of Multivalued Attributes.


For each multivalued attribute A, create a new relation R. This relation R will include an
attribute corresponding to A, plus the primary key attribute K—as a foreign key in R—of the
relation that represents the entity type or relationship type that has A as a multivalued attribute.
The primary key of R is the combination of A and K. If the multivalued attribute is composite,
we include its simple components.

Step 7: Mapping of N-array Relationship Types.


For each n-array relationship type R, where n > 2, create a new relation S to represent R. Include
as foreign key attributes in S the primary keys of the relations that represent the participating
entity types. Also include any simple attributes of the n-array relationship type (or simple
components of composite attributes) as attributes of S. The primary key of S is usually a
combination of all the foreign keys that reference the relations representing the participating
entity types. However, if the cardinality constraints on any of the entity types E participating
in R is 1, then the primary key of S should not include the foreign key attribute that references
the relation E ‘corresponding to E.

CS&E Dept, B.I.E.T Davangere Page 10


Agriculture Product Management System

4.4 SCHEMA DIAGRAM

Fig 4.4 Schema Diagram of Agriculture products management system.

CS&E Dept, B.I.E.T Davangere Page 11


Agriculture Product Management System

4.5 DATABASE DESCRIPTION:


Tables:

Table 4.5.1: This figure describes about the tables present in agriculture management system

Farmer:

Table 4.5.2: This table describes the information of the farmers who have registered to our
database system

CS&E Dept, B.I.E.T Davangere Page 12


Agriculture Product Management System

Farmer products:

Table 4.5.3: This figure describes about the products uploaded by farmers.

My Cart:

Table 4.5.4: This figure describes about the products added to cart by customers

CS&E Dept, B.I.E.T Davangere Page 13


Agriculture Product Management System

Review:

Table 4.5.5: This figure describes about the reviews of products given by customers

Transaction:

Table 4.5.6: This figure describes about transaction of customers

CS&E Dept, B.I.E.T Davangere Page 14


Agriculture Product Management System

4.6 CODE

4.6.1 CONNECTION CODE FOR FRONT END TO BACK END

<?php

$serverName = "localhost";

$userName = "root";

$password = "";

$dbName = "agroculture";

$conn = mysqli_connect($serverName, $userName, $password, $dbName);

if (!$conn)

die("Connection failed: " . mysqli_connect_error());

?>

4.6.2 SQL CODE :

-- phpMyAdmin SQL

-- version 4.6.4

-- https://www.phpmyadmin.net/

-- Host: 127.0.0.1

-- Generation Time: dec26, 2020 at 07:52 AM

-- Server version: 5.7.14

-- PHP Version: 5.6.25

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

SET time_ zone = "+00:00";

CS&E Dept, B.I.E.T Davangere Page 15


Agriculture Product Management System

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT


*/;

/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION


*/;

/*!40101 SET NAMES utf8mb4 */;--

-- Database: `agroculture`

-- Table structure for table `farmer`

--CREATE TABLE `farmer` (

`fid` int(255) NOT NULL,

`fname` varchar(255) NOT NULL,

`fusername` varchar(255) NOT NULL,

`fpassword` varchar(255) NOT NULL,

`fhash` varchar(255) NOT NULL,

`femail` varchar(255) NOT NULL,

`fmobile` varchar(255) NOT NULL,

`faddress` text NOT NULL,

`factive` int(255) NOT NULL DEFAULT '0',

`frating` int(11) NOT NULL DEFAULT '0',

`picExt` varchar(255) NOT NULL DEFAULT 'png',

`picStatus` int(10) NOT NULL DEFAULT '0'

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Dumping data for table `farmer`

--INSERT INTO `farmer` (`fid`, `fname`, `fusername`, `fpassword`, `fhash`, `femail`,


`fmobile`, `faddress`, `factive`, `frating`, `picExt`, `picStatus`) VALUES

(3, 'Kavya Hemant ', 'ThePhenom',


'$2y$10$22ezmzHRa9c5ycHmVm5RpOnlT4LwFaDZar1XhmLRJQKGrcVRhPgti',

CS&E Dept, B.I.E.T Davangere Page 16


Agriculture Product Management System

'61b4a64be663682e8cb037d9719ad8cd', 'kmendki98@gmail.com', '8600611198', 'abcde', 0,


0, 'png', 0);

-- Table structure for table `fproduct`

--CREATE TABLE `fproduct` (

`fid` int(255) NOT NULL,

`pid` int(255) NOT NULL,

`product` varchar(255) NOT NULL,

`pcat` varchar(255) NOT NULL,

`pinfo` varchar(255) NOT NULL,

`price` float NOT NULL,

`pimage` varchar(255) NOT NULL DEFAULT 'blank.png',

`picStatus` int(10) NOT NULL DEFAULT '0'

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

- Dumping data for table `fproduct`

INSERT INTO `fproduct` (`fid`, `pid`, `product`, `pcat`, `pinfo`, `price`, `pimage`,
`picStatus`) VALUES

(3, 27, 'Mango', 'Fruit', '<p>Mango raseela</p>\r\n', 500, 'Mango3.jpeg', 1),

(3, 28, 'Ladyfinger', 'Vegetable', '<p>Its veggie</p>\r\n', 1000, 'Ladyfinger3.jpg', 1),

(3, 29, 'Bajra', 'Grains', '<p>bajre di rti</p>\r\n', 400, 'Bajra3.jpg', 1),

(3, 30, 'Banana', 'Fruit', '<p>Jalgaon banana</p>\r\n', 400, 'Banana3.jpg', 1);

-- Table structure for table `mycart`

--CREATE TABLE `mycart` (

`bid` int(10) NOT NULL,

`pid` int(10) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;--

-- Dumping data for table `mycart`

--INSERT INTO `mycart` (`bid`, `pid`) VALUES

CS&E Dept, B.I.E.T Davangere Page 17


Agriculture Product Management System

(3, 27),

(3, 30);

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

-- Table structure for table `review`

--CREATE TABLE `review` (

`pid` int(10) NOT NULL,

`name` varchar(255) NOT NULL,

`rating` int(10) NOT NULL,

`comment` text NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

- Table structure for table `transaction`

--CREATE TABLE `transaction` (

`tid` int(10) NOT NULL,

`bid` int(10) NOT NULL,

`pid` int(10) NOT NULL,

`name` varchar(255) NOT NULL,

`city` varchar(255) NOT NULL,

`mobile` varchar(255) NOT NULL,

`email` varchar(255) NOT NULL,

`pincode` varchar(255) NOT NULL,

`addr` varchar(255) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Dumping data for table `transaction`

--

CS&E Dept, B.I.E.T Davangere Page 18


Agriculture Product Management System

INSERT INTO `transaction` (`tid`, `bid`, `pid`, `name`, `city`, `mobile`, `email`, `pincode`,
`addr`) VALUES

(1, 3, 28, 'sa,j,cns', 'sajc', 'sajch', 'kmendki98@gmail.com', 'sacu', 'ckaskjc');

--

-- Indexes for dumped tables

-- Indexes for table `buyer`

--

ALTER TABLE `buyer`

ADD PRIMARY KEY (`bid`),

ADD UNIQUE KEY `bid` (`bid`);

--Indexes for table `farmer`

ALTER TABLE `farmer`

ADD PRIMARY KEY (`fid`),

ADD UNIQUE KEY `fid` (`fid`);

Indexes for table `fproduct`

--

ALTER TABLE `fproduct`

ADD PRIMARY KEY (`pid`);

Indexes for table `transaction`

--

ALTER TABLE `transaction`

ADD PRIMARY KEY (`tid`);

AUTO_INCREMENT for dumped tables

-- AUTO_INCREMENT for table `buyer`

--

ALTER TABLE `buyer`

MODIFY `bid` int(100) NOT NULL AUTO_INCREMENT;

CS&E Dept, B.I.E.T Davangere Page 19


Agriculture Product Management System

--

-- AUTO_INCREMENT for table `farmer`

--

ALTER TABLE `farmer`

MODIFY `fid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--

-- AUTO_INCREMENT for table `fproduct`

--

ALTER TABLE `fproduct`

MODIFY `pid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--

-- AUTO_INCREMENT for table `transaction`

--ALTER TABLE `transaction`

MODIFY `tid` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--

-- Constraints for dumped tables

-- Constraints for table `buyer`

--

ALTER TABLE `buyer`

ADD CONSTRAINT `buyer_ibfk_1` FOREIGN KEY (`bid`) REFERENCES `farmer`


(`fid`);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

CS&E Dept, B.I.E.T Davangere Page 20


Agriculture Product Management System

Chapter 5

RESULTS AND SNAPSHOTS

Fig 5.1: This figure describes the Home page where user can log in or register.

Fig 5.2 This figure describes Sign-up page where user can give details to get signed -up.

CS&E Dept, B.I.E.T Davangere Page 21


Agriculture Product Management System

Fig 5.3 This figure describes the User profile page.

5.4 This figure describes product information page where the farmer can upload their
products.

CS&E Dept, B.I.E.T Davangere Page 22


Agriculture Product Management System

Fig 5.5 This figure describes Digital market page where the products available are listed.

Fig 5.5.1 This figure describes Digital market page where the products available are listed.

CS&E Dept, B.I.E.T Davangere Page 23


Agriculture Product Management System

Fig 5.6 This figure describes the sorting of fruits page where the fruits available are listed.

Fig 5.7This figure describes the sorting vegetables page where the vegetables available are

Listed.

CS&E Dept, B.I.E.T Davangere Page 24


Agriculture Product Management System

Fig 5.8 This figure describes the sort grains page where the grains available are listed.

Fig 5.9 This figure describes the complete view of bajra product.

CS&E Dept, B.I.E.T Davangere Page 25


Agriculture Product Management System

Fig 5.10 This figure describes the complete view of wheat product.

Fig 5.11 This figure describes the complete view of massor product.

CS&E Dept, B.I.E.T Davangere Page 26


Agriculture Product Management System

Fig 5.12 This figure describes the complete view of mango product.

Fig 5.13 This figure describes the complete view of apple product.

CS&E Dept, B.I.E.T Davangere Page 27


Agriculture Product Management System

Fig 5.14 This figure describes the complete view of chikoo product.

Fig 5.15 This figure describes the complete view of ladyfinger product.

CS&E Dept, B.I.E.T Davangere Page 28


Agriculture Product Management System

Fig 5.16 This figure describes the complete view of brinjal product.

Fig 5.17 This figure describes the complete view of mushroom product.

CS&E Dept, B.I.E.T Davangere Page 29


Agriculture Product Management System

My cart:

Fig 5.18 This figure describes the products which are in customers cart.

Transaction:

Fig 5.19 This figure describes the transaction page where the user can confirm their order.

CS&E Dept, B.I.E.T Davangere Page 30


Agriculture Product Management System

CONCLUSION
This project is intended to provide a open platform where the farmers can sell or buy
products. The conventional way is very time consuming and takes a lot of effort. With this
database system we can save more time than manual method of selling/buying directly .It is
useful for farmers to get correct price for their produce. Also eliminates hidden prices of
conventional markets. The customers can get fresh from farm products. The present project
is made to fulfil the modern age requirements of conventional product transactions.

FUTURE WORK
Our project avoids the manual work and the problems concern with it. It is an easy way to know
the preferences of each an every individual. Well I and my team member have worked hard in
order to present an improved application better than the existing one’s regarding the
information about the various activities. Still, we found out that the project can be done in a
better way.

CS&E Dept, B.I.E.T Davangere Page 31


Agriculture Product Management System

BIBLIOGRAPHY
Books:

• Fundamentals of Database Systems, Ramez Elmsari and Shamkant B.Navathe, 7th


edition, 2017, Pearson.
• Database Management Systems, Ramakrishnan, and Gehrke, 3rd Edition, 2014,
McGraw Hill
• Silberschatz Korth and Sudharshan, Database System Concepts, 6th Edition, McGraw
Hill, 2013

Links:

• https://stackoverflow.com
• https://www.w3schools.com

CS&E Dept, B.I.E.T Davangere Page 32

You might also like