agriconnect_dbms_project
agriconnect_dbms_project
AGRI-CONNECT
Submitted by
LOKESHGOWDA R R (U03NM21T029023)
VIDHATHRI (U03NM21T029068)
MITHUN G M (U03NM22T064004)
VI SEM, B. TECH (CSE)
Dec-2024
BANGALORE UNIVERSITY
BANGALORE UNIVERSITY
CERTIFICATE
Examiners:
1. ………………………… 2. ...……………………….
ACKNOWLEDGEMENT
I would like to thank Dr. Subhasish Tripathy, Director, UVCE, for providing us all
the facilities to work on this project. I am indebted to him for being my pillar of
strength and inspiration.
I also thank my parents and friends for their continuous support and encouragement.
LOKESHGOWDA R R
(U03NM21T029023)
ABSTRACT
Title Page No
1. Introduction 1
2. Literature Review 7
3. Proposed Work 12
4. Result 16
Conclusion 21
Bibliography 22
Introduction
CHAPTER 1
INTRODUCTION
This chapter will discuss the various features and aim of this application.
1.2 Objective
The objective of this project is to develop Agri-Connect, a web application that can
effectively manage agricultural operations. The system aims to simplify the process
of tracking vendors, buyers, products, orders, payments, and logistics. Additionally,
the system is designed to provide an easy-to-use interface for different user roles,
making it simple to input, manage, and retrieve data. The end goal is to create a
powerful tool that enhances operational efficiency and provides valuable insights for
all stakeholders.
structure ensures strong access control over database queries by assigning specific
permissions to each type of user.
The user interface aims to provide the following views for users:
Admin Dashboard: Accessible only to ‘Admin’ users, this dashboard allows for
the efficient creation, reading, updating, and deletion of any data in the database.
Admins can manage users, oversee transactions, and handle product and order
records.
Buyer Dashboard: Designed for ‘buyer’ this dashboard allows buyer to browse
products, place, reschedule, or cancel orders, view order status, and make payments.
This interface aims to improve the buyer experience by providing an easy and
efficient way to purchase products.
Product Management : Displays all available products and allows for easy
management of these items.
1.3 Functionality
Admin
Vendor
Products
Orders
Payments
DBMS is a collection of programs that enables users to create and maintain a database
The DBMS is a general-purpose software system that facilitates the processes of
defining, constructing, manipulating and sharing databases among various users and
applications. It also provides protection and the security to the database. In case of
multiple users, it also maintain the data consistency.
A Relational database is a database that has a collection of tables of data items, all of
which is formally described and organized according to the relational model. Data in a
single table represents a relation, from which the name of the database type comes.
Relation does not contain the duplicate tuples and the tuples of a relation have no
specific order. In typical solutions, tables may have additionally defined relationships
with each other. In the relational model, each table schema must identify a column or
group of columns, called the primary key, to uniquely identify each row. A
relationship can then be established between each row in the table and a row in
another table by creating a foreign key, a column or group of columns in one table
that points to the primary key of another table.
1.5 PostgreSQL
PostgreSQL is a powerful, open source object-relational database system that uses and
extends the SQL language combined with many features that safely store and scale
the most complicated data workloads. The origins of PostgreSQL date back to 1986 as
part of the POSTGRES project at the University of California at Berkeley and has
more than 35 years of active development on the core platform.
PostgreSQL is known for its strict adherence to SQL standards and provides a rich set
of features, including advanced data types, window functions, common table
expressions (CTEs), and full support for ACID (Atomicity, Consistency, Isolation,
Durability) transactions.
PostgreSQL offers a wide range of built-in data types, including arrays, JSON,
JSONB (binary JSON), geometric types, and custom user-defined types. This makes
PostgreSQL more suitable for handling complex data structures and diverse data
types.
Generally known for its reliability, data integrity, and advanced features rather than
raw performance. While PostgreSQL's performance has improved significantly over
the years, it may not always match the speed of MySQL in certain scenarios.
It is known for its strong and passionate community of developers and users, who
contribute to its continuous development and improvement. PostgreSQL also has a
thriving ecosystem of extensions, plugins, and tools, including PostGIS for
geographic information systems and TimescaleDB for time-series data.
1. CREATE
This command is used to create a table or view by giving it a name and specifying its
attributes and constraints. The attributes are specified first, and each attribute is given
a name, a data type to specify its domain values, and any attribute constraints such as
NOT NULL.
Syntax: CREATE TABLE <TNAME> (ATR1 TYP1 CONST1, ATR2 TYP2
CONST2,…)
2. ALTER
The definition of a base table can be altered by ALTER command which is a Schema
Evolution command. The possible ALTER TABLE includes adding or dropping a
column (attribute), changing a column definition, and adding or dropping table
constraints.
Example: ALTER TABLE STUDENT ADD NAME VARCHAR (12)
3. DROP
If a whole schema is not needed any more, the DROP SCHEMA command can be
used. There are two drop behaviour options: CASCADE and RESTRICT.
CASCADE option is used to remove the database schema and all its tables, domains
and other elements.
If the RESTRICT option is chosen in place of CASCADE, the schema is dropped
only it has no elements in it; otherwise, the DROP command will not be executed.
Syntax: DROP TABLE STUDENT CASCADE
CHAPTER 2
LITERATURE REVIEW
This chapter focuses on the already existing systems for the management of crops
and establish the software requirements for the project.
Disadvantages
More human power: Manual processes require more staff, leading to higher
operational costs.
Repetition of same procedure: Redundant tasks increase the chance of errors and
decrease productivity.
Low security: Paper-based records and basic digital files are vulnerable to
unauthorized access and data breaches.
Developed System
In this project, we utilize the Node.js framework to develop the back-end of the
Agri-Connect system, along with MySQL as the database management system.
Node.js is a powerful JavaScript runtime environment known for its event-driven
architecture and non-blocking I/O operations, which make it suitable for building
scalable network applications. MySQL is a widely-used relational database
management system known for its reliability, ease of use, and robust performance.
2.2.1 Frontend:
The front end is an interface between the user and the back end. The front and back
ends may be distributed amongst one or more systems. In network computing, front
end can refer to any hardware that optimizes or protects network traffic. It is called
application front-end hardware because it is placed on the network's outward-facing
front end or boundary. Network traffic passes through the front-end hardware before
entering the network. In compilers, the front end translates a computer programming
source code into an intermediate representation, and the back end works with the
intermediate representation to produce code in a computer output language.
1. HTML
2. CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the look
and formatting of a document written in a mark-up language. While most often used
to style web pages and user interfaces written in HTML and XHTML, the language
can be applied to any kind of XML document, including plain XML, SVG and XUL.
CSS is a cornerstone specification of the web and almost all web pages’ use CSS style
sheets to describe their presentation.
3. Bootstrap
2.2.2 Backend:
Node.js
Node.js is a powerful, open-source JavaScript runtime environment that allows
developers to execute JavaScript code server-side. Built on the V8 JavaScript
engine, Node.js is renowned for its high performance, event-driven architecture, and
nonblocking I/O operations, which make it particularly suitable for building scalable
network applications and real-time applications.
Key features of Node.js include its ability to handle a large number of simultaneous
connections with high throughput, making it ideal for data-intensive applications
that require real-time updates. Node.js uses an event loop to manage asynchronous
operations, which ensures efficient utilization of resources and enhances
performance. This makes Node.js particularly effective for applications such as chat
servers, online gaming, and collaborative tools.
Node.js also has a rich ecosystem of libraries and frameworks, accessible via the
Node Package Manager (NPM). NPM provides access to thousands of reusable
modules, significantly speeding up the development process. Additionally, Node.js
supports microservices architecture, allowing developers to build modular and
maintainable applications.
Express.js
Express.js is a minimal and flexible Node.js web application framework that
provides a robust set of features for web and mobile applications. Known for its
simplicity and lightweight nature, Express.js facilitates the development of server-
side applications by offering a variety of HTTP utility methods and middleware
functions.
MySQL
Key features of MySQL include its adherence to the SQL standard and support for a
broad range of SQL queries, enabling developers to perform complex data
manipulations and retrievals. MySQL supports various storage engines, including
InnoDB and MyISAM, allowing developers to choose the best option based on their
specific requirements for transaction support and performance.
MySQL's ACID compliance ensures data integrity and reliability, even in high
concurrency environments. It supports features such as transactions, foreign keys,
and indexing, which contribute to efficient data management and retrieval. MySQL
also offers replication and clustering capabilities, enhancing scalability and high
availability for large-scale applications.
CHAPTER 3
PROPOSED WORK
This chapter will discuss the proposed work for the Agri-Connect.
Crop: Represents the crops grown by farmers. Each crop entry includes details
such as crop name, description, quantity available, price, and the address where the
crop is located. It is linked to the farmer entity to track which farmer grows which
crop.
Order: Records the purchase of crops by vendors. Each order entry includes
details such as vendor ID, crop ID, order quantity, total price, and order date. It links
to both the vendor and crop entities to track which vendor purchased which crop.
Transaction: Records payment details for orders. Each transaction entry includes
the order ID, payment method, and transaction date. It links to the order entity to
track the payment details for each order.
Explanation of Relationships:
Farmers and Crops: Each crop is grown by a specific farmer. The Crops table
includes a foreign key (FID) referencing the Farmers table.
Vendors and Orders: Each order is placed by a specific vendor. The Orders table
includes a foreign key (VID) referencing the Vendors table.
Crops and Orders: Each order includes a specific crop. The Orders table includes a
foreign key (CID) referencing the Crops table.
Orders and Transactions: Each transaction is associated with a specific order. The
Transactions table includes a foreign key (OID) referencing the Orders table.
The following is the relational model for the proposed management system:
3.3 Normalization
The following is a normalization report for the Agri-Connect project:
1st Normal Form (1NF): All the entities in the system such as Farmer,
Vendor, Orders, Crops and Transactions are in 1NF, as each record has a
unique primary key and each field contains atomic (indivisible) values.
2nd Normal Form (2NF): All the entities in the system are in 2NF, as all
non-primary key fields are functionally dependent on the primary key. This
means that each field in the table is dependent on the primary key and not on
any other non-primary key field.
3rd Normal Form (3NF): All the entities in the system are in 3NF, as there
are no transitive dependencies between non-primary key fields. This means
that all nonprimary key fields are directly dependent on the primary key, and
there are no dependencies between non-primary key fields. For example, The
Farmer entity is represented in 3NF as follows:
Contains attributes directly related to the farmer entity, such as FID, FNAME,
CONTACTNO and FLOCATION.
The FID serves as the primary key, uniquely identifying each farmer record. Other
attributes, such as FNAME, FLOCATION, CONTACTNO, are functionally
dependent on the fid, ensuring data integrity and eliminating redundant information.
CHAPTER 4
RESULT
At the core of Agri-Connect lies its ability to centralize and streamline agricultural
activities. Farmers leverage the platform to register detailed profiles, manage
multiple
details
4.1 Screenshots
Report page
BIBLIOGRAPHY
[1] Ramez Elmasri and Shamkant B Navathe, Fundamental of Database Systems, 6th
ed. Addison Wesley, 2009
[2] https://bootstrap.com
[3] https://www.geeksforgeeks.org/mysql-tutorial/
[4] https://www.postgresql.org/docs/