0% found this document useful (0 votes)
87 views26 pages

Farm Management

The document is an acknowledgment and project report for the Farm Management System developed by Dishani Haldar, expressing gratitude to teachers, family, and online communities. The system aims to streamline agricultural activities by connecting farmers directly with buyers through a user-friendly platform built using Python and SQL. It outlines the project's objectives, system requirements, and functionalities, emphasizing its benefits in enhancing productivity and promoting fair trade.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views26 pages

Farm Management

The document is an acknowledgment and project report for the Farm Management System developed by Dishani Haldar, expressing gratitude to teachers, family, and online communities. The system aims to streamline agricultural activities by connecting farmers directly with buyers through a user-friendly platform built using Python and SQL. It outlines the project's objectives, system requirements, and functionalities, emphasizing its benefits in enhancing productivity and promoting fair trade.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 26

ACKNOWLEDGEMENT

I would like to express my sincere gratitude to everyone who contributed to the


successful completion of my project, Farm Management System.
First and foremost, I am immensely thankful to my Jayita Dutta , my class
teacher as well as my computer sir, Dipanshu Das for their invaluable guidance,
encouragement, and support throughout the development of this project. Their
constructive feedback and insights were instrumental in refining and improving
my work.
I extend my heartfelt appreciation to my family and friends for their constant
motivation and unwavering belief in my abilities. Their support provided me
with the strength and determination to complete this project.
Lastly, I am grateful to the online and open-source communities for their
resources and tools, which greatly aided me in building this system.
This project has been a rewarding learning experience, allowing me to develop
my programming skills and deepen my understanding of database management
and application development.

Dishani Haldar
12th Grade/12/2025
Delhi Public Secondary School
INDEX
S.No. Particulars Page.No. Signature Remarks
1 Introduction 3
2 Objectives 4
3 Preliminary System Analysis 05~06
4 Project Category 07~08
5 Software and Hardware Requirement 9
Specification
6 Detailed System Analysis 10~12
7 Source Code & Output 13~18
8 Conclusion 19~20
9 Bibliography 21
INTRODUCTION
The Farm Management System is a software application developed using
Python for its simplicity and versatility, and SQL for efficient database
management. This project aims to provide a streamlined and user-friendly
platform to manage farming-related activities, including user registration,
product listing, and browsing.
In today’s digital era, the agricultural sector faces challenges in managing data
and connecting farmers with buyers effectively. A farm management system
addresses these needs by offering a centralized platform to organize
information, enhance productivity, and foster better communication between
farmers and buyers.

Benefits of the Farm Management System:


1. Efficiency: Simplifies the process of product listing and browsing, saving
time for both farmers and buyers.
2. Connectivity: Bridges the gap between farmers and buyers, enabling
direct transactions and reducing dependency on intermediaries.
3. Data Management: Provides a structured way to manage user and
product information securely.
4. Accessibility: Users can easily update profiles, list products, or explore
available items with an intuitive menu-based system.
This system empowers farmers by giving them a platform to showcase their
products directly to buyers, thus promoting transparency and better pricing. For
buyers, it offers a convenient way to browse and select quality products while
supporting local farmers.
By combining Python’s robust programming capabilities with SQL’s reliable
database functionalities, this project serves as a practical solution to modernize
farming operations and enhance agricultural trade.
OBJECTIVES
• Streamline Data Management: Provide a centralized platform to
manage user and product information effectively.
• Promote Digital Transformation in Agriculture: Facilitate the adoption
of digital tools to modernize farming and trading operations.
• Enhance Communication: Create a direct connection between farmers
and buyers, eliminating the need for intermediaries.
• Simplify Product Listing: Enable farmers to easily add, update, and
manage their products with essential details like description, price, and
category.
• Improve Accessibility: Design an intuitive and user-friendly interface to
ensure ease of use for all users, regardless of technical expertise.
• Enable Secure User Management: Provide robust authentication and
profile management features to protect user data and maintain system
integrity.
• Support Role-Based Functionality: Differentiate user roles (e.g.,
farmers and buyers) to tailor the system's features according to their
needs.
• Facilitate Product Browsing: Allow buyers to explore listed products
seamlessly, with detailed information about the items and their sellers.
• Promote Fair Trade: Empower farmers to directly interact with buyers,
ensuring better pricing and transparency in transactions.
• Build a Scalable Framework: Develop a system that can be easily
expanded in the future to include advanced features like online payments,
product search, or analytics.
PRELIMINARY SYSTEM
ANALYSIS
1. Problem Definition
The agricultural sector often lacks efficient systems to manage product listings
and transactions. Farmers face challenges in showcasing their products to
potential buyers, and buyers struggle to find quality agricultural goods directly
from producers. The absence of a centralized platform leads to inefficiencies,
delays, and reliance on intermediaries, which can result in unfair pricing and
limited accessibility.

2. Objectives
• To create a digital platform for farmers to list their products and buyers to
browse and purchase them.
• To provide a role-based system for user registration, profile management,
and secure authentication.
• To reduce dependency on intermediaries, promoting direct interactions
between farmers and buyers.

3. Feasibility Study
• Technical Feasibility: The system is built using Python, a powerful and
versatile programming language, and SQL for database management.
These technologies are widely used, well-supported, and suitable for this
project.
• Operational Feasibility: The system's user-friendly interface ensures it is
accessible to users with basic computer knowledge. Farmers can easily
list products, while buyers can browse and select items.
• Economic Feasibility: The project is cost-effective, requiring minimal
resources, as it uses open-source tools and technologies.

4. System Requirements
• Hardware Requirements:
• A computer system with basic configurations.
• Adequate storage for the SQLite database.
• Software Requirements:
• Python 3.x for application development.
• SQLite for database operations.
5. Functional Requirements
• User Registration and Login:
• Farmers and buyers can register with unique credentials.
• Secure authentication using hashed passwords.
• Product Management:
• Farmers can list, update, and delete products.
• Buyers can browse available products with details.
• Profile Management:
• Users can update or delete their profiles.
• Role-Based Access:
• Farmers can list products, while buyers have browsing privileges.

6. Non-Functional Requirements
• Scalability: The system should allow the addition of more features, such
as payment gateways or advanced search filters, in the future.
• Security: User data, including passwords, must be stored securely.
• Usability: The interface should be intuitive and straightforward for all
users.
• Performance: The system should handle database queries efficiently.

7. Benefits of the System


• Empowers farmers by providing a platform to showcase their products
directly to buyers.
• Ensures fair pricing and reduces reliance on intermediaries.
• Simplifies the process of finding and purchasing agricultural products for
buyers.
• Promotes the digitalization of agricultural operations, enhancing
productivity and efficiency.

8. Limitations
• Limited to basic product listing and browsing functionalities in the current
version.
• No integration with advanced features like payment gateways or delivery
tracking.
• Requires internet access for future scalability to a cloud-based system.

Project Category
A category of project is web-based application named “Library Management
System”. Login Form and Main Window are designed by using Python
language with Tkinter module. MySQL are used for the database connection
with python. Programming Language and Database Connectivity Used In
Project:

Python:- Python is an interpreted, object-oriented, high-level programming


language with dynamic semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic binding, make it very attractive for
Rapid Application Development, as well as for use as a scripting or glue
language to connect existing components together. Python's simple, easy to
learn syntax emphasizes readability and therefore reduces the cost of program
maintenance. Python supports modules and packages, which encourages
program modularity and code reuse. The Python interpreter and the extensive
standard library are available in source or binary form without charge for all
major platforms, and can be freely distributed. The Python installers for the
Windows platform usually include the entire standard library and often also
include many additional components. For Unix-like operating systems Python
is normally provided as a collection of packages, so it may be necessary to use
the packaging tools provided with the operating system to obtain some or all of
the optional components. Guido van Rossum began working on Python in the
late 1980s as a successor to the ABC programming language and first released
it in 1991 as Python 0.9.0. Python 2.0 was released in 2000 and introduced new
features such as list comprehension, cycledetecting garbage collection,
reference counting, and Unicode support. Python 3.0, 20 released in 2008, was
a major revision that is not completely backward-compatible with earlier
versions. Python 2 was discontinued with version 2.7.18 in 2020. Python
consistently ranks as one of the most popular programming languages.

MySQL:- MySQL is a Relational Database Management System (RDBMS)


developed by Oracle that is based on Structured Query Language (SQL).
MySQL is one of the most recognizable technologies in the modern big data
ecosystem. Often called the most popular database and currently enjoying
widespread, effective use regardless of industry, it’s clear that anyone involved
with enterprise data or general IT should at least aim for a basic familiarity of
MySQL. With MySQL, even those new to relational systems can immediately
build fast, powerful, and secure data storage systems. MySQL’s programmatic
syntax and interfaces are also perfect gateways into the wide world of other
popular query languages and structured data stores. A database is a structured
collection of data. It may be anything from a simple shopping list to a picture
gallery or a place to hold the vast amounts of information in a corporate
network. In particular, a relational database is a digital store collecting data and
organizing it according to the relational model. In this model, tables consist of
rows and columns, and relationships between data elements all follow a strict
logical structure. An RDBMS is simply the set of software tools used to actually
implement, manage, and query such a database. MySQL is integral to many of
the most popular software stacks for building and maintaining everything from
customer-facing web applications to powerful, datadriven B2B services. Its
open-source nature, stability, and rich feature set, paired with ongoing
development and support from Oracle, have meant that internet-critical
organizations such as Facebook, Twitter, Wikipedia, and YouTube all employ
MySQL backends.

SOFTWARE AND HARDWARE


REQUIREMENT SPECIFICATION
Hardware: Hardware is a term that refers to all the physical parts that make
up a computer. The internal hardware devices that make up the computer.
Various devices which are essentials to form a hardware is called as
components. Following are the hardware specifications that is required to
develop this project is as follows:
1. Computer components like Monitor, Keyboard, Mouse, CPU, Keyboard.
2. 2. Minimum 1 GB ram for smooth working of application.
3. 3. 250 GB Hard Disk or More. CD ROM Drive.

Software: Computer software, or simply software, is a collection of data or


computer instructions that tell the computer how to work. This is in contrast to
physical hardware, from which the system is build and actually performs the
work.
 Front End- Python
 Back End- MySQL Workbench
 Text Editors- VS Code Editor Operating System

Operating System:
 Windows10

Detailed System
Analysis
 Modules used in Project:

import sqlite3

from getpass import getpass

Data Structures and Tables:


1) Registration: This is a VS code interface showing the registration of my
farm management system..
2) Login: This is a VS code interface showing the login of my farm
management system..
Source Code
import sqlite3
from getpass import getpass

# Database setup
connection = sqlite3.connect('farm_management1.db')
cursor = connection.cursor()

# Create tables
cursor.execute('''CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
role TEXT NOT NULL
)''')

cursor.execute('''CREATE TABLE IF NOT EXISTS products (


id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
description TEXT NOT NULL,
category TEXT NOT NULL,
price REAL NOT NULL,
farmer_id INTEGER,
FOREIGN KEY (farmer_id) REFERENCES users (id)
)''')

connection.commit()

# Helper Functions
def hash_password(password):
"""Simple password hashing."""
return password[::-1] # Reverse the password (for
simplicity)

def check_password(hashed_password, input_password):


"""Check if the password matches."""
return hashed_password == input_password[::-1]

# User Authentication
def register_user():
print("\n--- Register ---")
name = input("Enter your name: ")
email = input("Enter your email: ")
password = input("Enter your password: ") # Visible
password input
role = input("Enter your role (farmer/buyer): ").lower()

try:
cursor.execute("INSERT INTO users (name, email,
password, role) VALUES (?, ?, ?, ?)",
(name, email, hash_password(password), role))
connection.commit()
print("Registration successful!")
except sqlite3.IntegrityError:
print("Error: Email already exists.")

def login_user():
print("\n--- Login ---")
email = input("Enter your email: ")
password = input("Enter your password: ") # Visible
password input

cursor.execute("SELECT * FROM users WHERE email = ?",


(email,))
user = cursor.fetchone()

if user and check_password(user[3], password):


print(f"Welcome back, {user[1]}!")
return user
else:
print("Invalid email or password.")
return None

# User Operations
def update_profile(user):
print("\n--- Update Profile ---")
name = input(f"Enter your new name (current: {user[1]}): ")
or user[1]
email = input(f"Enter your new email (current: {user[2]}): ")
or user[2]

try:
cursor.execute("UPDATE users SET name = ?, email = ?
WHERE id = ?", (name, email, user[0]))
connection.commit()
print("Profile updated successfully!")
except sqlite3.IntegrityError:
print("Error: Email already exists.")

def delete_profile(user):
print("\n--- Delete Profile ---")
confirmation = input("Are you sure you want to delete your
account? (yes/no): ").lower()
if confirmation == "yes":
cursor.execute("DELETE FROM users WHERE id = ?",
(user[0],))
connection.commit()
print("Your account has been deleted successfully.")
return True
else:
print("Account deletion canceled.")
return False

# Product Operations
def list_product(user):
print("\n--- List a Product ---")
name = input("Enter product name: ")
description = input("Enter product description: ")
category = input("Enter product category: ")
price = float(input("Enter product price: "))

cursor.execute("INSERT INTO products (name, description,


category, price, farmer_id) VALUES (?, ?, ?, ?, ?)",
(name, description, category, price, user[0]))
connection.commit()
print("Product listed successfully!")

def browse_products():
print("\n--- Browse Products ---")
cursor.execute("SELECT p.id, p.name, p.description,
p.category, p.price, u.name FROM products p JOIN users u ON
p.farmer_id = u.id")
products = cursor.fetchall()

if products:
for product in products:
print(f"ID: {product[0]}, Name: {product[1]},
Description: {product[2]}, Category: {product[3]}, Price:
{product[4]}, Farmer: {product[5]}")
else:
print("No products available.")

# Main Application Loop


def main():
print("Welcome to the Farm Management System!")
user = None

while True:
print("\nOptions:")
print("1. Register")
print("2. Login")
print("3. Update Profile")
print("4. Delete Profile")
print("5. List a Product")
print("6. Browse Products")
print("7. Logout")
print("8. Exit")

choice = input("Enter your choice: ")

if choice == "1":
register_user()
elif choice == "2":
user = login_user()
elif choice == "3" and user:
update_profile(user)
elif choice == "4" and user:
if delete_profile(user):
user = None
elif choice == "5" and user and user[4] == "farmer":
list_product(user)
elif choice == "6":
browse_products()
elif choice == "7" and user:
print(f"Goodbye, {user[1]}!")
user = None
elif choice == "8":
print("Exiting the system. Goodbye!")
break
else:
print("Invalid choice or action not allowed. Please try
again.")

if __name__ == "__main__":
main()

OUTPUT
1) Listing Products: The farmer(user) can list their product in this way:
2) Browsing Products: The farmer or the buyer can browse their
products in this way:

3) Updating Profile : The user can update their profiles in this way:
4) Deleting Profile: The user can delete their profile in this way:

CONCLUSION
The Farm Management System is a comprehensive software application
designed to address the challenges faced by farmers and buyers in the
agricultural sector. By utilizing Python for programming and SQL for database
management, this project successfully integrates modern technology into a
traditionally manual and fragmented industry. The system facilitates better
connectivity between farmers and buyers, allowing for efficient product listing,
browsing, and transactions.
The project demonstrates the potential of digital transformation in agriculture
by creating a streamlined and user-friendly platform. Farmers now have an
accessible tool to showcase their products directly to buyers, eliminating
intermediaries and ensuring fair pricing. This empowers farmers, providing
them with better control over their products and fostering transparency in
transactions. For buyers, the system simplifies the process of sourcing
agricultural goods by offering detailed product descriptions and direct access to
farmers.

Key Outcomes
1. Enhanced Accessibility: Both farmers and buyers benefit from an
intuitive interface that simplifies the complexities of product listing and
browsing.
2. Improved Efficiency: The system reduces time and effort required for
managing farming operations and purchasing activities.
3. Data Security: Secure authentication and database management ensure
user information is protected.
4. Role-Based Functionality: The system caters to the specific needs of
farmers and buyers, making it versatile and adaptable.
Through this project, a significant step has been taken toward modernizing
agricultural practices. The combination of Python's robust programming
capabilities and SQL's efficient data management ensures that the system is
reliable, scalable, and maintainable. Moreover, the system's architecture
provides a foundation for future enhancements, such as incorporating payment
gateways, delivery tracking, and analytics.

Benefits to Stakeholders
• Farmers: Gain a platform to market their products directly, reducing
dependency on middlemen and increasing profitability.
• Buyers: Access a wide range of agricultural goods directly from
producers, ensuring quality and transparency.
• Community: Promotes local trade and strengthens the agricultural
ecosystem.

Future Scope
While the current system offers essential functionalities, there is immense
potential for expansion. Features like product search filters, advanced analytics
for farmers, online payment integration, and logistics support can significantly
enhance the system. Additionally, transitioning to a web-based or mobile
application format would increase accessibility and reach a larger audience.

Learning and Impact


This project has been an enriching learning experience, providing insights into
software development, database management, and real-world problem-solving.
It has highlighted the importance of user-centric design and the role of
technology in addressing societal challenges. The Farm Management System is
not just a technical accomplishment but also a step toward empowering a vital
sector of the economy.
In conclusion, the Farm Management System is a practical, scalable, and
impactful solution that leverages technology to improve agricultural operations.
By addressing the needs of farmers and buyers, it lays the groundwork for a
sustainable and connected agricultural ecosystem. With continued development
and adoption, such systems can significantly contribute to the digital
transformation of the farming industry.

BIBLIOGRAPHY
 Websites References:

https://www.tutorialspoint.com/index.htm

https://www.javatpoint.com
https://www.w3schools.com

 Books References:

Head First Python: A Brain-Friendly Guide

Programming Python: Powerful Object-Oriented Programming

You might also like