You are on page 1of 19

Project-Based Learning Report on

“Farm Management System”

Submitted by
Anjali Tiwari
(2100430130009)
Archit Srivastava
(2200430139001)
Pranshu Shekhar Shrivastav
(2200430139003)

For the award of degree of

Bachelor of Technology
in
Information Technology

BUNDELKHAND INSTITUTE OF ENGINEERING


AND TECHNOLOGY
(An Autonomous Institution)
Jhansi, Uttar Pradesh – 284128

Session – 2023-2024
CERTIFICATE OF DECLERATION
We hereby declare that this project-based learning report entitled “Farm Management
System” is an authenticated work carried out by us for the partial fulfilment of this report
in the Department of Information Technology (Third Year). This work has not been
submitted elsewhere for a similar purpose except to the Department of Information
Technology at Bundelkhand Institute of Engineering and Technology, Jhansi, Uttar
Pradesh – 284128.

Er. Pawan Gupta


Department of Information Technology
Bundelkhand Institute of Engineering and Technology, Jhansi
ACKNOWLEDGEMENT

It is our great pleasure to acknowledge the assistance and contribution of the individuals
who co-operated with us to complete this assignment report successfully. First and
foremost, we wish to express our deep gratitude and thanks to Dr. Yashpal Singh, Head
of Department, Information Technology for their enthusiastic guidance and
encouragement throughout the work. It is for their patience, guidance and encouragement
at all time that this work has shaped up the way it is. We would like to thank everyone
who contributed their time and efforts to help in completing the project-based learning
report.
TABLE OF CONTENTS

1 Introduction 1
2 Database Management System 2

3 What is MySQL 3

4 Software requirements 4-5

5 Source code 6-8

6 Outputs 9-11

7 Future Scope 12-13

8 Conclusion 14
9 References 15
Introduction
Welcome to the forefront of agricultural innovation with our Database Management System
(DBMS) project—dedicated to revolutionizing farm management practices through the creation of a
sophisticated and robust Farm Management System (FMS). In the rapidly evolving landscape of
modern agriculture, our project seeks to address the complexities and challenges faced by farmers
and agricultural enterprises by seamlessly integrating cutting-edge database management techniques.

The Farm Management System serves as the backbone of this endeavor, providing a centralized and
comprehensive solution to efficiently organize, store, and retrieve data related to farmers, cultivation
activities, and crop yields. Through the implementation of a well-structured database, our system
facilitates real-time monitoring, data-driven decision-making, and strategic planning for agricultural
operations.

At the heart of our project is the synergy between database management and agricultural practices,
forging a digital infrastructure that not only optimizes data organization but also empowers farmers
to make informed decisions. This initiative transcends the conventional boundaries of technology
implementation; it is a commitment to enhancing the efficiency, sustainability, and resilience of
modern farming practices.

Join us on this technological journey as we delve into the intricacies of our Farm Management System,
exploring how the convergence of database management and agriculture can usher in a new era of
precision farming. Through this project, we aim not only to streamline farm operations but also to
contribute to the broader discourse on the transformative potential of database management systems
in shaping the future of agriculture.

1
Database Management System
DBMS stands for Database Management System. We can break it like this DBMS=Database
+Management System. Database is a collection of data and Management System is a set of programs
to store and retrieve those data. Based on this we can define DBMS like this: DBMS is a collection
of inter-related data and set of programs to store and access those data in an easy and effective manner.
Database system are basically developed for large amount of data. When dealing with huge amount
of data, there are two things that require optimization: Storage of data and retrieval of data. According
to the principles of database systems, the data is stored in such a way that it acquires a lot less space
as the redundant data (duplicate data) has been removed before storage.

Applications of DBMS
The development of computer graphics
The development of computer graphics has been driven both by the needs of the user
community and by the advances in hardware and software. The applications of database are many
and varied; it can be divided into four major areas:
1. Hierarchical and network system
2. Flexibility with relational database
3.Object oriented application.
4.Interchanging the data on the web for e-commerce
Display information
In this particular project, we are taken HTML web page as a front end in order to display the
information which are stored in the backend database called MySQL. HTML stands for Hyper Text
Markup Language.HTML describes the structure of web pages using markup.HTML elements are the
building blocks of HTML pages. Browser do not display the HTML tags but use them to render the
content of page.
Design
Professions such as engineering and architecture are concerned with design. Starting with a
set of specification engineers and architects seek a cost effective and esthetic solutions that satisfies
the specifications.
Design is an iterative process rarely in the real world is a problem specified such that there is a unique
optimal solution. Thus, the designer works iteratively.
User Interfaces
Our interactions with computers have become dominated by a visual paradigm that includes
windows, icons, menus, pointing device, such as a mouse. Although we are familiar with the syntax
of MySQL, advances in MySQL have made possible other forms of advantages.

2
What is MySQL?
MySQL is multithreaded, multi user SQL database management System (DBMS). The basic
program run as server providing multiuser access to a number
of databases. The project’s source code is available under terms of the GNU General
Public License, as well as under a variety of property arguments. MySQL is a database. The data in
a MySQL is stored in a Database object called tables. A table is a collection of related data entries
and it consists of columns and rows. The databases are useful when storing information
categorically.

MySQL is a central component of the LAMP open source, web application software stack (and
other “AMP” stacks). LAMP is an acronym for Linux, Apache, MySQL, Perl/PHP/ Python.
Application that uses the MySQL database include TYP03, MODx, Joomla, WordPress, PHPBB,
My BB and Drupal. MySQL is also used in many high profile and large scale websites, including
Google (Though not for the searches).

MySQL Command Syntax


As you might have observed from the simple program in the previous section, MySQL uses
mainly uses six commands in which SELECT is used to retrieve rows selected from one or more
tables. FROM refers to the table from which we need to select the attributes. WHERE clause, if given,
indicates condition or conditions that rows must satisfy to be selected. where_ condition is expression
that evaluates to true for each row to be selected. This statement selects all rows if there is no Where
clause. GROUP BY clause used to group the values of the attributes provided that values must be
same. HAVING clause is applied nearly last, just before items are sent to the client, with no
optimization. If the HAVING clause refers to a column that is ambiguous, warning occurs. ORDER
BY clause is used for the purpose of sorting the values of the attributes in a result. If you use GROUP
BY, output rows are sorted according to GROUP BY columns as if you had an ORDER BY for the
same columns.

MySQL-related Libraries
The MySQL PHP extensions are lightweight wrappers on top of a C client library. The
extensions can either use the MySQL and library or lib MySQL client library. Choosing a library is a
compile time decision. The MySQL and library is part of the PHP distribution since 5.3.0. It offers
features like lazy connections and query caching, features that are not available with the lib MySQL
client, so using the built in library is highly recommended. It is recommended to use the MySQL and
library instead of the MySQL client server. Both libraries are supported and constantly being
improved.

3
Software Requirements

The software requirements for a Farm Management System (FMS) project, particularly one
that involves database management, can be extensive. Below is a list of key software components and
technologies that may be required for such a project:

1. Database Management System (DBMS):


- MySQL, PostgreSQL, Oracle, or another relational database management system to store and
manage farm-related data.

2. Server-Side Scripting:
- PHP, Python, Node.js, or another server-side scripting language to handle server-side logic and
interact with the database.

3. Web Development:
- HTML5, CSS3, JavaScript for building the user interface of the web application.
- A front-end framework such as React, Angular, or Vue.js for dynamic and responsive user
interfaces.

4. Web Server:
- Apache, Nginx, or another web server to host and serve the web application.

5. Version Control:
- Git for version control to manage and track changes in the source code.

6. Integrated Development Environment (IDE):


- Visual Studio Code, PhpStorm, Eclipse, or another suitable IDE for coding and development.

7. Database Design Tool:


- MySQL Workbench, DB Designer, or another tool for designing and managing the database
schema.
4
8. Security Tools:
- Security measures, including SSL certificates for secure communication, and practices to prevent
common web vulnerabilities (SQL injection, cross-site scripting, etc.).

9. Documentation Tools:
- Tools such as Swagger for API documentation or other documentation tools to maintain project
documentation.

10. Testing Frameworks:


- PHP Unit for PHP, Jest for JavaScript, or other testing frameworks for automated testing of the
code.
Ensure that the versions of these tools are compatible with each other, and consider the specific
requirements and preferences of your development team.

5
Source code
Index:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Farm Management System</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Farm Management System</h1>

<form action="add_Farmer.php" method="post">


<label for="Farmer_name">Farmer Name:</label>
<input type="text" name="name" required>

<label for="Farmer_add">Address:</label>
<input type="text" name="address" required>

<button type="submit">Add Farmer</button>


</form>

<form action="add_Crop.php" method="post">


<label for="Farmer_id">Farmer:</label>
<select name="Farmer_id" required>
<!-- Populate this dropdown from the database -->
</select>

<label for="Crop_name">Crop Name:</label>


<input type="text" name="Crop_name" required>

<label for="Quantity">Quantity:</label>
<input type="number" name="Quantity" required>

<button type="submit">Add Crop</button>


</form>
</div>
</body>
</html>

6
add_crop.php:

<?php
$servername = "127.0.0.1:3306";
$username = "root";
$password = "842360";
$dbname = "farm_management_system";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$farmer_id = $_POST['farmer_id'];
$name = $_POST['name'];
$quantity = $_POST['quantity'];

$sql = "INSERT INTO crops (farmer_id, name, quantity) VALUES ('$farmer_id', '$name', '$quantity')";

if ($conn->query($sql) === TRUE) {


echo "Crop added successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();
?>
add_farmer.php:

<?php
$servername = "127.0.0.1:3306";
$username = "root";
$password = "842360";
$dbname = "farm_management_system";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$farmer_id = $_POST['farmer_id'];
$name = $_POST['name'];
$quantity = $_POST['quantity'];
7
$sql = "INSERT INTO crops (farmer_id, name, quantity) VALUES ('$farmer_id', '$name', '$quantity')";

if ($conn->query($sql) === TRUE) {


echo "Crop added successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();
?>

Database Query:

-- Create the database if it does not exist


CREATE DATABASE IF NOT EXISTS farm_management_system;

-- Use the created database


USE farm_management_system;

-- Create the Farmer table


CREATE TABLE IF NOT EXISTS Farmers (
Farmer_id INT AUTO_INCREMENT PRIMARY KEY,
Farmer_name VARCHAR(100) NOT NULL,
Farmer_add VARCHAR(255) NOT NULL
);

-- Create the Crop table


CREATE TABLE IF NOT EXISTS Crop (
Crop_id INT AUTO_INCREMENT PRIMARY KEY,
Farmer_id INT,
Crop_name VARCHAR(100) NOT NULL,
Quantity INT NOT NULL,
FOREIGN KEY (Farmer_id) REFERENCES Farmers(Farmer_id) ON DELETE CASCADE
);

8
Output 1

9
Output 2

10
Output 3

11
Future Scope
The Farm Management System (FMS) project, with its integration of database management
and agricultural practices, presents a robust foundation for future enhancements and expansions. The
future scope of this project is broad and can include the following aspects:

1. Advanced Analytics and Decision Support:


- Integration of advanced analytics tools to analyze historical data, predict trends, and provide
farmers with actionable insights for better decision-making.

2. IoT Integration:
- Implementation of Internet of Things (IoT) devices for real-time monitoring of environmental
conditions, crop health, and equipment status. This would enhance precision farming and resource
optimization.

3. Mobile Application Development:


- Creation of mobile applications to allow farmers to access and manage their data on the go,
facilitating remote monitoring and control of farm activities.

4. Supply Chain Integration:


- Expansion of the system to incorporate supply chain management features, enabling farmers to
track the entire lifecycle of their products from cultivation to distribution.

5. Machine Learning for Crop Prediction:


- Integration of machine learning algorithms to predict crop yields based on historical data,
environmental factors, and crop management practices.

6. Drones and Satellite Imagery:


- Utilization of drone technology and satellite imagery to provide farmers with high-resolution data
for crop monitoring, disease detection, and yield estimation.

7. Weather Integration:

12
- Integration with weather APIs to provide real-time weather updates and forecasts, helping farmers
make informed decisions based on current and future weather conditions.

8. Financial Management:
- Addition of financial management features to track expenses, revenue, and profitability, providing
a comprehensive financial overview for farmers and stakeholders.

9. Collaborative Features:
- Implementation of collaborative tools and features to facilitate communication and knowledge-
sharing among farmers, agricultural experts, and stakeholders.

10. Blockchain for Traceability:


- Integration of blockchain technology to enhance traceability and transparency in the agricultural
supply chain, ensuring the authenticity of farm-to-table information.

11. Remote Sensing Technologies:


- Incorporation of remote sensing technologies to monitor soil health, irrigation efficiency, and
overall farm productivity.

12. Customizable Reports and Dashboards:


- Development of customizable reporting tools and dashboards to allow users to generate and
visualize data reports tailored to their specific needs.

13. Multi-language Support:


- Inclusion of multi-language support to make the system accessible to a broader range of farmers
globally.
The future scope of the Farm Management System project is dynamic and can be adapted to
accommodate emerging technologies and evolving agricultural practices, ensuring its continued
relevance and impact in the agricultural sector.

13
Conclusion
The Farm Management System utilizing a Database Management System (DBMS) is a pivotal
tool in modernizing and enhancing agricultural practices. This project report outlines the development
and implementation of a system that effectively manages farm-related data, ensuring data integrity,
security, and streamlined processes.
In conclusion, the Farm Management System contributes significantly to the agricultural sector by:
Digitizing Agricultural Operations: The system eliminates paper-based record-keeping, providing
a centralized digital platform for managing information related to farmers, crops, and other crucial
aspects of agriculture.
Enhancing Data Integrity and Security: By utilizing a relational DBMS, the system ensures the
integrity of the stored data. The use of foreign keys and relationships between tables establishes a
structured and secure environment for data management.
Improving Workflow Efficiency: The system facilitates efficient workflows by automating
processes such as form creation, submission, and approval. This not only saves time but also reduces
the likelihood of errors in manual processes.
Enabling Informed Decision-Making: Through the organized storage and retrieval of data,
stakeholders in the agricultural sector can make informed decisions regarding crop management,
resource allocation, and overall farm productivity.
Promoting Transparency and Accountability: The inclusion of features like audit trails and version
control ensures transparency in the system's operations. Users can trace the history of form
submissions and modifications, promoting accountability in data management.
Facilitating Scalability and Adaptability: The project provides a foundation for future
enhancements, such as integration with external systems and mobile accessibility. This scalability
ensures that the system can adapt to the evolving needs of the agricultural industry.
In summary, the Farm Management System is not just a database application; it is a transformative
tool that modernizes agricultural practices, making them more efficient, secure, and conducive to
informed decision-making in the ever-evolving landscape of farming.

14
References
 https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://dev.mysql.c
om/doc/refman/8.0/en/what-is-
mysql.html&ved=2ahUKEwiJq9b3jeeCAxU01DQHHdpdBq8QFnoECD0QAQ&usg=AOvVa
w1S4AT_ItA8MuOXEz-E93VF
 https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.ibm.c
om/docs/en/zos-basic-skills%3Ftopic%3Dzos-what-is-database-management-
system&ved=2ahUKEwimlNaRjueCAxW4sVYBHSg1C3EQFnoECBwQAQ&usg=AOvVaw1
0y21zu5hAwEUG6-Xhvj2j
 https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://docs.devart.
com/studio-for-sql-server/getting-started/connect-to-sql-
database.html&ved=2ahUKEwih6bSnjueCAxVhk1YBHfRCCjwQFnoECB0QAQ&usg=AOv
Vaw3IG4GvEf7pM99emS8GUQcq
 https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.oracle
.com/in/database/what-is-database/&ved=2ahUKEwi0nejwjueCAxVutlYBHUR-
BBcQFnoECDkQAQ&usg=AOvVaw2OSCB7rUGCTcKlUqw4Hsc5
 https://www.javatpoint.com/what-is-database
 https://www.javatpoint.com/sql-tutorial

15

You might also like