1BG19CS009 aAKSHAT SAXENA DBMS REPORT Final 2
1BG19CS009 aAKSHAT SAXENA DBMS REPORT Final 2
1BG19CS009 aAKSHAT SAXENA DBMS REPORT Final 2
Mini Project
Report on
AGRICULTURE BASED MANAGEMENT SYSTEM
Bachelor of
Engineering in
COMPUTER SCIENCE AND ENGINEERING
Submitted by
1BG19CS009 AKSHAT SAXENA
V SEMESTER
Dr. Sreevidya R C
Associate Professor, Dept. of CSE
BNMIT,Bengaluru
CERTIFICATE
Certified that the mini project work entitled Agriculture based Management System carried out by
year 2021-22. It is certified that all corrections / suggestions indicated for Internal Assessment have
been incorporated in the report deposited in the departmental library. The project report has been
approved as it satisfies the academic requirements in respect of mini project work prescribed for the
said degree.
Examiner 2:
ABSTRACT
Khet Express: An Agriculture based Management System is an online website that helps buyers
to shop for their desired Fruits and vegetables sitting comfortably at home along with their
family. These days people want to explore as many options and are mostly interested in getting
things delivered at home without them going outside. Buyers would not want to face external
factors or buy bad products from any vegetable seller, customers rather feel buying fresh
products online is better than offline. So, this management system works as a boon to both the
farmer and the customer. The sellers can put up all the available products online along with the
required details, buyers can make orders, know what they have ordered, etc. On the other side, it
allows the users to have their own accounts where they can log into or register into the website
and check the products, add it to the cart, place order, view the cart in order to decide about it
again, and logout safely when they are done. Khet Express System will make better connection
among Farmers and Buyers ensure quality food. It will also Standardize and increase efficiency
of Agro-culture process
The completion of this project brings with a sense of satisfaction, but it is never complete without
thanking the persons responsible for its successful completion.
I take this opportunity to express our profound gratitude to Shri. Narayan Rao R Maanay, Secretary,
BNMIT, Bengaluru for his constant support and encouragement. I would like to express my special
thanks to Prof. T. J. Rama Murthy, director, BNMIT, Bengaluru and S Y Kulkarni, Additional
Director, BNMIT, Bengaluru for their constantguidance towards our goals and professions. I extend
my deep sense of sincere gratitude to Dr. Krishnamurthy G.N, Principal, BNMIT, Bengaluru, for
providing us facilities required for the project. I would also like to thank Prof Eishwar Maanay,
Dean Administration, BNMIT,Bengaluru, for providing us useful suggestions required for the project.
I express my in-depth, heartfelt, sincere gratitude to Dr. Sahana D. Gowda, Professor and HOD,
Department of Computer Science and Engineering, BNMIT, Bengaluru, for her valuable suggestions
and support.I extend my heartfelt, sincere gratitude to Dr. Sreevidya R C, Associate Professor,
Department of Computer Science and Engineering, BNMIT, Bengaluru, for completion of the project.
Finally, I would like to thank all the faculty members of Department of ComputerScience and
Engineering, BNMIT, Bengaluru, for their support. I would like to thank our family and friends for
their unfailing moral support and encouragement.
AKSHAT SAXENA
1BG19CS009
CONTENTS PAGE NO.
ABSTRACT I
ACKNOWLEDGEMENT II
1. INTRODUCTION 1
1.1 Overview of Database Management System 1
1.2 Problem Statement 2
1.3 Objectives of the Project 2
1.4 Background Study 2
2. Software Requirement Specifications 3
2.1 Hardware Requirements 3
2.2 Software Requirements 3
2.3 Front-end Tools 3
2.4 Back-end Tools 3
3. SYSTEM DESIGN 4
3.1 Schema Diagram 4
3.2 ER Diagram 5
3.3 Overview of GUI 5
3.4 Normalization 6
4. IMPLEMENTATION 8
4.1 Table creation 8
4.2 Description of Table 12
4.3 Populated Tables 15
4.4 SQL Triggers & Stored Procedures 17
4.5 Database connectivity 18
4.6 Modules 20
5 RESULTS 22
6 CONCLUSION AND FUTURE ENHANCEMENTS 30
FIG NO. FIGURE NAME PAGE NO.
3.1 Schema Diagram 4
3.2 E-R Diagram of KhetExpress 5
4.1 Description of Blogdata table 12
4.2 Description of BlogFeedback table 12
4.3 Description of Buyer table 13
4.4 Description of Farmer table 13
4.5 Description of Fproduct table 14
4.6 Description of Likes table 14
4.7 Description of mycart table 15
4.8 Description of Transaction table 15
4.9 Values of Blogdata table 15
4.10 Values of BlogFeedback table 16
4.11 Values of Buyer table 16
4.12 Values of Farmer table 16
4.13 Values of Fproduct table 16
4.14 Values of Likes table 17
4.15 Values of Transaction table 17
4.16 Trigger Implementation 18
4.17 Workflow of System 20
4.18 Modules of Khet Express 21
5.1 Home Page 22
5.2 Registration Page 22
5.3 Login Page 23
5.4 Profile Page 23
5.5 Add product Page 24
5.6 Update profile Page 24
5.7 Home2 Page 25
5.8 About Page 25
5.9 Catalogue Page 26
5.10 My cart Page 26
5.11 Transaction Page 27
5.12 Transaction successful Page 27
5.13 Blog View Page 28
5.14 Blog Write Page 28
5.15 Logout Page 29
INTRODUCTION
A Database is a collection of related data organized in a way that data can be easily accessed,
managed and updated. Any piece of information can be a data, for example name of your school.
Database is actually a place where related piece of information is stored and various operations
can be performed on it. A DBMS is a software that allows creation, definition and manipulation
of database. DBMS also provides protection and security to database. It maintains data
consistency in case of multiple users. The database system can be divided into four components:
● The database system can be divided into System developer and End users.
● Database application: Database application may be Personal, Departmental, Enterprise
and Internal.
● DBMS: Software that allow users to define, create and manages database access.
● Database: Collection of logical data. Functions of database management system:
1. Provides Recovery services.
2. Provides utility.
3. Provides data Independence.
4. Provides a clear and logical view of the process that manipulates data.
Advantages of DBMS: ● Segregation of application program ● Minimal data duplicity ●
Reduced development time and maintenance need ● Easy retrieval of data
Khet Express is the farmer system where they can plan, monitor and analyze the activity of the
farmers production system. It manages farmer operation with one system and organizes data in
one place. It helps smart farmers become even smarter. This creates in partnership with growers
and buyers. It inspires farmer to produce and buyers to consume fresh goods. Khet Express
System will make better connection among Farmers and Buyers ensure quality food. It will also
Standardize and increase efficiency of Agro culture process.
1.2 PROBLEM STATEMENT
Design a project where farmers and buyers can create their accounts, they can buy or sell the
products including fruits, vegetables, and grains using this website. They can also review the
products and add a brief/blog regarding the same.
Hardware requirements:
Software requirements:
● Oracle SQL*Plus Release 11.1.0.6.0/MYSQL.
● Visual Studio Code IDE.
● Windows 7 or higher.
● Google chrome Browser (Chrome has an extensive compatibility list with many modules
and hence is preferred by many web developers)
● PhpMyAdmin.
● Chrome dev tools (for inspections and verifications of element placement).
System design is the process of defining the architecture, modules, interfaces and data for a
system to satisfy specific requirements. System design could be seen as the application of system
theory to product development. There is some overlap with the disciplines of systems analysis,
systems architecture and systems engineering.
GUI is a program interface that takes advantage of the computer's graphics capabilities to make
the program easier to use. Well-designed graphical user interfaces can free the user from learning
complex command languages. On the other hand, many users find that they work more
effectively with a command-driven interface, especially if they already know the command
language.
Hypertext Markup Language (HTML) is the standard markup language for creating web pages
and web applications. With JavaScript it forms a triad of cornerstone technologies for the World
Wide Web. Web browsers receive HTML documents from a web server or from local storage and
render them into multimedia web pages. HTML describes the structure of a web page
semantically and originally included cues for the appearance of the document.
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a
document written in a markup language like HTML. CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript. CSS is designed to enable the separation of
presentation and content, including layout, colors, and fonts. This separation can improve content
accessibility, provide more flexibility and control in the specification of presentation
characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in
a separate .css file, and reduce complexity and repetition in the structural content.
3.4 Normalization
Normalization is a process of analyzing the given relation schema based on their functional
dependencies and primary key to achieve desirable properties of minimizing redundancy and
minimizing insert, delete, update anomaly. The normalization process takes a relation schema
through a series of tests to certify whether it satisfies a certain normal form. The normal form of
a relation refers to the highest normal form condition that it meets, and hence the degree to which
it has been normalized.
Normalization rules are divided into the following normal form:
1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. Boyce-Codd Normal Form
3.4.1 First Normal Form
The first normal form states that the domain of an attribute must include only atomic (simple,
individual) values and that the value of any attribute in a tuple must be a single value from the
domain of the attribute. Consider the relations of the Khet Express System, all the relations are in
1NF as they have neither any multivalued attributes nor composite attributes. Hence the relations
are said to be in 1NF.
3.4.2 Second Normal Form
Second normal from is based on the concept of full functional dependency. A functional
dependency X -> Y is a full functional dependency if removal of any attribute A from X means
that the dependency does not hold anymore. A relation schema R is in 2NF if every nonprime
attribute A in R is fully functionally dependenton the primary key of R.
3.4.3 Third Normal Form
The third normal form is based on the concept of transitive dependency. A relation schema R is
in 3NF if it satisfies 2NF and no non-prime attribute of R is transitively dependent on the
primary key. A relation schema R is in 3NF if every nonprime attribute of R meets both of the
following conditions:
● It is fully functionally dependent on every key of R.
● It is non-transitively dependent on every key of R.
The relations used in this database are fully functionally dependent on its key attribute and do not
hold any transitive dependencies. Hence all the relations are in 3NF.
4.1 Table Creation
In the tables, data is organized in row and column format. The rows represent a unique record
and the columns represent the attributes of a given table. The tables provide the overall structure
of the different tables that are used; showcasing the various attributes and the respective data
types.
ALTERTABLE`fproduct`
ADD PRIMARY KEY (`pid`),
ADD KEY `fid` (`fid`);
ALTERTABLE`transactio
n` ADD PRIMARY KEY
(`tid`),
ADD KEY `f4` (`bid`),
ADD KEY `f5` (`pid`);
ALTER TABLE `farmer`
MODIFY `fid` int(255) NOT NULL AUTO_INCREMENT;
Desc blogdata;
In the above figure, the structure of the Blogdata table is given to provide the details regarding
the blog written by the user of the website.
Desc buyer;
In the above figure, the structure of the Buyer table is given to provide the buyer personal details
like Name, Username, Password, Email, Mobile number, Contact Address.
desc farmer;
In the above figure, the structure of the Farmer table is given to provide the Farmer personal
details like Name, Username, Password, Email, obile number, Contact Address.
desc fproduct;
In the above figure, the structure of the Fproduct table is given to provide the Product details like
Name of the product, Category of the product, Price, Description and the Image of the product.
desc mycart;
Desc mycart;
In the above figure,the structure of the mycart table is given to provide the cart details
In the above figure, the structure of the mycart table is given to provide the cart details.
Desc transaction;
In the above figure, the structure of the Transaction table is given to provide the Checkout details of
the transaction like the Buyer Id, Product Id, Name of the buyer, Mobile, Email and Address where
the products are to be delivered.
PHP CODE
<?php
session_start()
//1. Create a database connection
$conn=mysql_connect('localhost','root','');
if($conn) echo "Connection Successful";
//2. Select a database to use
$db=mysql_select_db(‘KhetExpress’,$conn);
If($db) echo "Database selected!";
//3. Perform database query
$sql="Select * from buyer";
If(mysql_query($sql,$conn) echo "Rows selected";
$result = mysql_query($sql,$conn);
//4. Use returned data
While($row=mysql_fetch_array($result)
{
echo $row['username']; echo $row['email'];
}
//5. Close the
connection
mysql_close($conn);
?>
4.6 Modules
The below flowchart explains how the system runs in the real world. The system can be easily
implemented under various situations. Reusability is possible as and when required in this
application. There is flexibility in all the modules which makes the task of the user easier.
The first-time users are required to register to this site else the user will not be able to access the
features of the site. After successful registration, the user can log in to his account and view the
Catalogue and place orders
RESULTS
Home Page: The below figure of the home page shows the first page of the application. The user
can go straight into the login page using this screen or go straight to registration using the
register tab.
SignUp: The below figure of the starting of registration page shows the various options the user
can register under like as a buyer or as a farmer.
Login Page: The below figure of the Login page shows the Username and Password fields for
which the user has to provide his/her credentials in order to login to the platform.
Profile Page: : The below figure of the Profile shows the various options the user can use to
Update their profiles, Access the main menu or Upload the Product in the Database.
Add product Page: The below figure of the Product addition page shows the various details to be
given in order to Upload the Product in the Database.
Update Profile Page: The below figure of the Update profile page shows the various details to be
given in order to update the Profile in the Database.
Home2 page: This is alternative to the main index page.
View Cart Page: The below figure shows the MyCart page which gives us the brief of the
products user added in his/her cart
.
Transaction Page: The below figure shows the transaction page where the Delivery details are to
be updated.
Transaction Successful Page: The below figure shows that the transaction is done successfully.
Blog View Page: In the below figure, the structure is given to provide the details regarding the
blog written by the user of the website. Users can give the blogs either upvotes or comments.
Blog Write Page: The below figure shows the Blog Write page where people can write the blogs
and upload it in the database.
Logout Page: The below figure shows that user got logged out successfully.
CONCLUSION AND FUTURE ENHANCEMENTS
Conclusion
The proposed Management System provides a user-friendly and helpful means of booking and
purchasing Agro-products online without any confusion or problems that might occur usually.
Thus, the site modifies the usual way of service booking and thus creates a new platform for the
people to utilize and reap the benefits offered. This project reduces the efforts of both buyer and
farmer. This is also a more trustable and accurate way of handling data as there is a high risk of
data loss or data corruption in keeping offline records, thus improving data redundancy. Thus, we
can say our project is a very trustable and accurate type of data management for Agriculture data
management and will be very helpful in the real world.
The project teaches us the essential skills like:
● Understanding database handling and query processing.
● Implement, analyze and evaluate the project developed for an application.
● Demonstrate the working of different concepts of DBMS.
Future Enhancements
Due to time constraints, some features are not implemented yet and will be implemented soon.
We have not yet included a Billing System and Payment Gateway. A feedback module can be
incorporated in order provide feedback of the vegetables, fruits or cereals purchased by a buyer.
Furthermore, we are providing services on web platforms. The app version of the system might
come in near future. The bill details have to be entered by admin manually, we will automate this
in the future versions. There is also going to be some improvement in our user interface and we
are going to make it more user-friendly and attractive.