Dbms Project Report: Agricultural Sales Management System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

DBMS

Project Report
AGRICULTURAL SALES
MANAGEMENT SYSTEM

Submitted by:
Saurav bansal 2k18/me/202
Saurabh agase 2k18/me/201
Abstract
Agri Sales Management Project is a Mini-DBMS Project by which we can easily
understand the concepts of Create, Read Update and Delete operations using
JavaFx and Mysql Technologies. The primary objective behind developing Agri
Sales Management Mini DBMS Project is to show Purchasing of Agriculture
related products like Vegetables, Fruits etc.. Selling those products and managing
the inventory. Modules: Agri Sales Management project consists of 5 Modules:
Seller, Customer, Purchase, Sales and Inventory.

1.
INTRODUCTION
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. By data, we mean known facts
that can be recorded and that have embedded meaning. Normally people use
software such as DBASE IV or V, Microsoft ACCESS, or EXCEL to store data in
the form of a database.
Database systems are meant to handle large collections 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.
This project is aimed at computerizing the manual process of the agricultural
selling system. Front end and backend are implemented using HTML,javafx and
MySQL respectively. Along with the JSP program to analyse the program. The
project consists of five forms(entity) namely the :
● SELLER who will sell his agricultural products.
● CUSTOMER who will buy the products.
● PURCHASE to give customers the choice to purchase the product.
● SALES keeps a record of all the sales.
● INVENTORY to manage the proper updated records of sales and all .
2.
THEORY

2.1 Introduction to 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 interrelated data and a set of programs to store and
access those data in an easy and effective manner.
Database systems are basically developed for large amounts of data. When
dealing with huge amounts 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.
Along with storing the data in an optimized and systematic manner, It is also
important that we retrieve the data quickly when needed. Database system ensures that data
is retrieved as quickly as possible.
● Applications of DBMS
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 databases
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 taking a HTML web page as a front end in order to
display the information which is 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. Browsers
do not display the HTML tags but use them to render the content of the 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 has 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.
● MySQL?
MySQL is multithreaded, multi user SQL database management System (DBMS). The
basic program runs as a server providing multi-user access to a number of databases. The
project’s source code is available under terms of the GNU General Public Licence, as well
as under a variety of property arguments. MySQL is a database. The data in a MySQL is
stored in a Database objects 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 use the MySQL database include TYP03,
MODx, Joomla, WordPress, PHPBB, MyBB and Drupal .MySQL is also used in many
high profile, large scale web sites, including Google(Though not for the searches).
● MySQL Command Syntax
As you might have observed from the simple program in the previous section,
MySQL 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 an 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 the 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 wrapped on top of a C client library.The
extensions can either use the mysql and library or libmysqlclient library. Choosing a
library is a compile time decision. The mysqland 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 libmysqlclient, so using the built in library is highly recommended. It is
recommended to use the mysqland library instead of the mysql client server. Both libraries
are supported and constantly being improved.

● Triggers:
A database trigger is procedural code that is automatically executed in response to
certain events on a particular table or view in a database. The trigger is mostly used for
maintaining the integrity of the information on the database. For example, when a new
record (representing a new worker) is added to the employees table, new records should
also be created in the tables of the taxes, vacations and salaries. Triggers can also be used
to log historical data.

● Stored procedure:
A stored procedure (also termed proc, storp, sproc, StoPro, StoredProc, StoreProc,
sp, or SP) is a subroutine available to applications that access a relational database
management system (RDBMS). Such procedures are stored in the database data
dictionary.
Uses for stored procedures include data-validation (integrated into the database) or
access-control mechanisms. Furthermore, stored procedures can consolidate and centralize
logic that was originally implemented in applications. To save time and memory, extensive
or complex processing that requires execution of several SQL statements can be saved into
stored procedures, and all applications call the procedures. One can use nested stored
procedures by executing one stored procedure from within another.

● JSP :
Java Server Pages (JSP) is a technology that helps software developers create
dynamically generated web pages based on HTML, XML, or other document types.
Released in 1999 by Sun Microsystems, JSP is similar to PHP and ASP, but it uses the
Java programming language.To deploy and run Java Server Pages, a compatible web
server with a servlet container, such as Apache Tomcat or Jetty, is required
3.
ANALYSIS & REQUIREMENT
SPECIFICATION
● Purpose
The purpose of this project is to outline Wedding data and requirements, to recommend
data management solutions and to provide information regarding the wedding. The purpose
of this project is to develop a data management system to consolidate, organize, document,
store and distribute information related to the wedding management system.
A centralized database created to consolidate data,allowing integrated,long term
analyses, and dynamic search ability with user friendly query tools to be performed to
support adaptive management. Many data collection, analysis and presentation software
programs that are currently being used must be able to interface with any new data
management system. Continuity with consistent data collection methodology is enforced by
a common database system,allowing for standardized format for forms and reports between
projects.

● Scope
The scope of the project is managing consistency and storage of data by dedicated data
administrators. It provides most of the features that a Database Management System should
have. It is developed by using MySQL database. It has been implemented in the WINDOWS
platform.

● Functional Requirements:
Three modules are used in this project namely Admin, user, seller;
• Admin: can insert,analyse the table’s
• User: can register their information
● Seller: can sell the agricultural items.
● Non Functional Requirements
● HARDWARE REQUIREMENTS:

⮚ System : Pentium Dual Core.


⮚ Hard Disk : 120 GB.
⮚ Ram : 1 GB

● SOFTWARE REQUIREMENTS:

⮚ Operating system : Windows XP/7/10.


⮚ Coding Language : JAVA/J2EE
⮚ Tool : Netbeans 8.2
⮚ Database : MYSQL
4.
DESIGN OF THE PROJECT
This project has been developed using MySQL software which is queries oriented.
Changes at the queries and the way in which it uses a system state may cause anticipated
changes in the behaviour of other results.

STRATEGY OF DESIGN
A good system design strategy is to organize the program modules in such a way that are
easy to develop and later to, change. Structured design techniques help developers to deal
with the size and complexity of programs. Analysts create instructions for the developers
about how code should be written and how pieces of code should fit together to form a
program.
● BOTTOM UP DESIGN
These approaches lead to a design where we decide how to combine these modules to
provide larger ones; to combine those to provide larger ones, and so on, till we arrive at
one big module which is the whole of the desired program. The set of these modules form
a hierarchy. This is a cross-linked tree structure in which each module is subordinate to
those in which it is used.
Since the design progressed from bottom layer upwards, the method is called bottom-up
design. This method has one terrible weakness; we need to use a lot of intuition to design
exactly what functionality a module should provide. If we get it wrong, then at higher
level, we will find that it is not as per requirements; then we have to redesign at a lower
level.
● TOP- DOWN DESIGN
A top design approach starts by identifying the major modules of the system,
decomposing them into lower level and iterating until the desired level of detail is
achieved. This is a stepwise refinement; starting from an abstract design, in each step the
design is refined to a more concrete level, until we reach a level where no refinement is
needed and the design can be implemented directly. Most design methodologies based on
this approach are suitable, if the specifications are clear and development is from the
scratch.
● HYBRID DESIGN
Hybrid approach has really become popular after the acceptance of reusability of
modules. Standard libraries, Microsoft foundation classes, object oriented concepts are
steps in this direction. We may soon have internationally acceptable standards for
reusability.

● SYSTEM DESIGN

The systems objectives outlined during the feasibility study serve as the basis from which
the work of system design is initiated. Much of the activities involved at this stage is of
technical nature requiring a certain degree of experience in designing systems, sound
knowledge of computer related technology and thorough understanding of computers
available in the market and the various facilities provided by the vendors.

● System Design Considerations:


The system design process is not a step-by-step adherence of clear procedures and
guidelines. Though, certain clear procedures and guidelines have emerged in recent days,
but still much of design work depends on knowledge and experience of the designer.
When a designer starts working on system design, he will face different types of
problems. Many of these will be due to constraints imposed by the user or limitations of
the hardware and software available in the market. However, following considerations
should be kept in mind during the system-designing phase:
The primary objective of the design:
➢ Practicality:
➢ Efficiency:
➢ Cost:
➢ Flexibility:
➢ Security:
Processing Techniques:
The processing options available to the designer are:
⮚ Batch processing
⮚ Real-time processing
⮚ On-line processing
⮚ A combination of all the above
● STRUCTURED DESIGN
Structured design is a data flow based methodology. The approach begins with a system
specification that identifies inputs and outputs and describes the functional aspects of the
system. The specifications then are used as a basis for the graphic representation. The
next step is the definition of the modules and their relationships to one another in a form
called a structure chart, using a data dictionary and other structured tools.

TABLE SCHEMA ( ER MODEL)OF THE DATABASE:


5.

IMPLEMENTATION

The project is implemented using MySQL database along with PHP and HTML. In this project,
we use the below mentioned concepts for implementing different types of effects like HTML
pages to demonstrate on a web page as a stand-alone or web based application.

● Implementation of Table Creation

CREATE TABLE CustomerTable(

`Id` INT NOT NULL AUTO_INCREMENT,

`Name` VARCHAR(30) NOT NULL,

`Contact` VARCHAR(30) NOT NULL,

`Address` VARCHAR (200) NOT NULL,

PRIMARY KEY (`Id`));

● Implementation of Database Connection;

public class DBConnection {

private static Connection conn;

public static String url = "jdbc:mysql://localhost:3306/agriSales?useSSL=false";

private static String user = "root";//Username of database

public static Connection connect() throws SQLException{

try{
Class.forName("com.mysql.jdbc.Driver").newInstance();

}catch(ClassNotFoundException cnfe){

System.err.println("Error: "+cnfe.getMessage());

}catch(InstantiationException ie){

System.err.println("Error: "+ie.getMessage());

}catch(IllegalAccessException iae){

System.err.println("Error: "+iae.getMessage());

conn = DriverManager.getConnection(url,user,"");

// System.out.println(url);

return conn;

● Implementation of product items ;

public void setAmount(String amount) {

this.amount = amount;

public Items(String pName, String pType, double qty, String amount) {

this.pName = pName;

this.pType = pType;

this.qty = qty;
this.amount = amount;

String pName;

String pType;

double qty;

String amount }

● Implementation of CSS Style ;

#toggle { -fx-background-color:

linear-gradient(#f2f2f2, #d6d6d6),

linear-gradient(#fcfcfc 0%, #d9d9d9 20%, #d6d6d6 100%),

linear-gradient(#dddddd 0%, #f6f6f6 50%);

-fx-background-radius: 8,7,6;

-fx-background-insets: 0,1,2;

-fx-text-fill: black;

-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );

#toggle:selected {

-fx-background-color:

#c3c4c4,

linear-gradient(#d6d6d6 50%, white 100%),

radial-gradient(center 50% -40%, radius 200%, #e6e6e6 45%, rgba(230,230,230,0)


50%);

-fx-background-radius: 30;
-fx-background-insets: 0,1,1;

-fx-text-fill: black;

-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 3, 0.0 , 0 , 1 );

….. …. …………… …….. …… … ……. ……. ……… ..

So, these are just the few sets of codes used in the programming of this database
and framework of it with CSS as style and make it look beautiful….

Sincere efforts were taken for the implementation of the following goals.
⮚ Maximizing the output reliability

⮚ Maximizing the source test readability

⮚ Minimizing the development time.


6.
SCREENSHOTS

1. NEW SELLER CREATION

2. NEW CUSTOMER INFORMATION


3.PURCHASING AN ITEM

4. SALE COUNTER RECORDS


5. UPDATION

6. CHANGES AFTER UPDATION


7.
CONCLUSION
In this project we have created one application which is easy to access and user friendly.
The application keeps a backup of the Agri sales management data which includes their
details.

With this project we learnt the full use of mysql as dbms software and learning how to
implement its features of creating table ,deleting and updating values etcc..,. Along with
this extra features of html and css with javafx and implementing them to get a good
desirable working system.

8.
FUTURE SCOPE
● THE CSS can be used to add extra advanced features to make the site look more
attractive and appealing
● User interface can be developed further to greater extent
● Advanced java features can be used to create more such complex databases with a
good er model of tables and implementing them in MYSQL

9. REFERENCES
[1] http://www.w3schools.com/howto/howto_css_login_form.asp

[2] http://www.roseindia.com/css/css3_button.asp

[3] http://www.stackoverflow.com/tags/javascript/info

[4] http://wikipedia.com/wiki/JSP

[5] Database Systems Models,Languages,Design and Application Programming,


RamezElmasri and Shamkant B. Navathe, 7th Edition, 2017, Pearson.

You might also like