Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 95

LIBRARY MANAGEMENT

A
PROJECT REPORT
Submitted in partial fulfillment of the Requirements
For the award of Master of Computer Application Degree

RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA


BHOPAL (M.P.)

MINOR PROJECT REPORT- I

Submitted by
Name of Candidate (Jyoti Ban) ( 0103CA173D22)
Name of Candidate (Jyoti Singh Parihar) (0103CA173D23)
Name of Candidate (Harsha Thakur) (0103CA173D19)
Name of Candidate (Mustafa Khan) (0103CA173D33.)

Group No. - ……07……………

Under the Guidance of

<Prof. Vishwa Gupta>

MASTER OF COMPUTER APPLICATION LAKSHMI NARAIN


COLLEGE OF TECHNOLOGY (MCA)
BHOPAL (JANUARY-JUNE, 2018)
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY (MCA),
BHOPAL

MASTER OF COMPUTER APPLICATION

CERTIFICATE

This is to certify that the work embodied in this Minor project-I, “Library
Management” has been satisfactorily completed by
(Jyoti Ban) ( 0103CA173D22 )
(Jyoti Singh Parihar) (0103CA173D23)
(Harsha Thakur) (0103CA173D19)

(Mustafa Khan) (0103CA173D33)

It is a bonafide piece of work, carried out under our / my guidance in the Master
of Computer Application, Lakshmi Narain College of Technology, Bhopal for
the partial fulfillment of the Master of Computer Application degree during the
academic session January-June, 2018.

Guided By

<Prof. Vishwa Gupta>


Approved By

Head of Department
Forwarded by

Director
Lakshmi Narain College of Technology (MCA), Bhopal
LAKSHMI NARAIN COLLEGE OF TECHNOLOGY (MCA),
BHOPAL

MASTER OF COMPUTER APPLICATION

CERTIFICATE OF APPROVAL

This foregoing Minor project - I is hereby approved as a creditable study of a


Computer Application Subject carried out and presented in a manner satisfactory to
warranty its acceptance as a prerequisite to the degree for which it has been
submitted. It is understood that by this approval the undersigned do not necessarily
endorse or approve any statement made, opinion expressed or conclusion drawn
therein, but approve the thesis only for the purpose for which it has been
submitted. (

(Internal Examiner) (External Examiner)


LAKSHMI NARAIN COLLEGE OF TECHNOLOGY (MCA),
BHOPAL (16)

MASTER OF COMPUTER APPLICATION (14)

DECLARATION (16)

We, <name of the students with enrollment no>, the student of Master of
Computer Application, Lakshmi Narain College of Technology , Bhopal hereby
declare that the work presented in this Minor Project – I is outcome of our own
work, is bonafide, correct to the best of our knowledge and this work has been
carried out taking care of Engineering Ethics. The work presented does not infringe
any patented work and has not been submitted to any University for the award of
any degree or any professional diploma.

<Jyoti Ban> (0103CA173D22) < >

<Jyoti Singh Parihar> (0103CA173D23) < >

<Harsha Thakur> (0103CA173D19) < >

<Mustafa Khan> (0103CA173D33) < >


CONTENTS
i
Certificate
ii
Certificate of Approval
iii
Declaration
iv
Acknowledgment
Chapter 1. Introduction
1.1 Project Overview.
1.2 Purpose/ Objective of project.
1.3 Problems in existing system.
1.4 Solution of these problems.
Chapter 2. System Analysis
2.1 Waterfall Model.
2.2 Spiral Model.
2.3 Prototype Model.
2.4 Rapid Application Development Model.
2.5 Agile Methodology.
Chapter 3. Software and Hardware Requirement Specification
3.1 Introduction of Backend and Frontend.
 Mysql.
 Java Script.
 Jquery.
Chapter 4. System Design
4.1 Introduction.
4.2 E-R Diagram.
4.3 Database description (Normalized).
Chapter 5. Graphic User Interface Design
5.1 Introduction.
5.2 Input Forms.
5.3 Output Forms.
5.4 Reports.
BIBLIOGRAPHY
Chapter 1. Introduction
1.1 Project Overview :-
Online Library Management System
Much of the functioning of a library could be automated using the available
technologies. Instead of dealing with files (papers) the use of a good Database
together with a proper front end would not only reduce the operating cost but
also make the task of the Librarian easier. The most important thing is that an
automated system of this sort can be customized to suit the needs of the patrons
or users and provide good service to them.
Aim of the project is to develop software which would automate the functioning
of a library over a network, be it Internet or Intranet
Overview
The idea of providing online automation finds its major use in the case of
members of a City Libray wherein they might have to go there to find to their
disappointment that the book that they are looking for isn't available. The system
automates all the basic tasks like keeping record of all the book issuals, returns
and fining etc.

Features
 Maintaining the catalogue of the books and periodicals available in the library.
 Keeping track of issue and return of books including the fine for the defaulters.
 Enabling the users / librarian to search for the books based on author name,
title etc.
 Notify the librarian about the user�s suggestions and requests for new books.
 Reservation of books which are limited in number.
 Presenting the up-to-date status to the librarian.

Project Implementation
This system was develped using :-
 MySQL as the database.
.
Application
Can be widely used to automate College Libraries. With a little development this
system can be used for bigger libraries too.
1.2 Purpose/Objective of Project
 The system excludes the use of paper work by managing
all the book information electronically.
 Admin can keep updating the system by providing the
new books arrival in system and their availability thus
students need not to go to library for issuing purpose.
 The system has books well organized and systematically
arranged in different categories in the system so that user
can easily search and find the book.
 Thus, it saves human efforts and resources.

1.3 Problems in Existing System


The activities of the library in the schools or colleges. We can
simply say that the system has been running totally in a paper
based. They does not have any online system to enable
students to access the library resources.manual library system
for handling different

Main Features Of The Existing System:


This LMS (Library Management System) can hold
limited number of information and data regarding
books, students, and dates when students borrow the
books. As mentioned earlier this system is a manual
system which manages all this information in the
paper based book known as register.

Issue Procedure:
While issuing the book to the students and/or teachers, first of
all one of the college staffs working as a librarian asked the
students to show the library card that has already been made
by the college for each and every students. If the student does
not have library card, then they never issue the book to that
particular one. The librarian takes the library card and hold it
until the students return the book. In the register, all the
information related to the students as well as the book such as
accession number, student's name and contact details, book
title, book author, issue date, return date etc. It is impossible to
reserve the book from home.

Book Return Procedure:


There is a certain procedure that has to be followed by the
students and librarian while returning the book. Within the due
date, the student is required to return the book. Otherwise, the
student has to pay certain amounts as a fine. The book
borrowed by the student is being handed over to the librarian
and now it is the duty of the librarian to issue the library card
to the respective student by declaring that the student is no
longer holding that book with him/her.

Addition Of New Book:


The student can fill a small request form named 'Request
Form For New Book' in order to get a desired book which is
not available in the college. If more than 8 students are
demanding for the same book then only the college meeting
is held to discuss how to obtain the book in the library.

To keep record of the new book, the library staff needs to fill
a form named 'Add New Book' in which there are number of
headings to be filled up such as 'Name of Book', 'Date of
Delivery', 'Book Title', 'Author Name', 'Published Date',
'Published Year', 'Edition', 'Book Category', etc. They need to
keep a catalogue and a notice is stick on the library notice
board noticing that a particular book is available in the
library.

Fine System:
The librarian is working on keeping the record of penalty paid
by the student on not giving back the book on time. Librarian
finds out the issue date and return date of the book and if the
student fails to return that book within the return date of the
book, then he/she has to pay £1/day as a fine. The fine may get
high in the case when the book has been lost or damage by the
student.

Deletion Procedure:
The book record is deleted from the library register book
when the book has been lost or totally damaged by the user.

Problems With The Current System:


1. Hard to maintain backup because of large and duplication of
data.

2. Data analysis and access to database is tiresome.

3. Difficult to obtain book status rapidly.

4. Updating the details of student/book is a longer process.

5. Students have to visit the college with an appointment to


initialize the process of reservation and/or borrowing.

6. It is very difficult work to sort the book manually. Data


inconsistency may arise in the case of several entries of the
same book and in addition whenever a new book is added in
the library system. Adding a new book, updating the details of
the book and students, and sorting them in a systemic way is
somehow impossible.

7. Due to tear and loss of issue cards, it is required to make a


new library card as soon as possible. Again it is time consuming
task to find out the information about that particular book.
1.4 Solution of these Problems
As a solution, the project titled "Library Management System
(LMS)" is a web-based online system for supervising and
managing the transactions in a library. The project "Library
Management System (LMS)" is built up in PHP and backed up
with MySQL, which mainly concentrates on basic operations in
a library including but not limited to adding/updating members,
adding/deleting books, reserving/borrowing books and
renewing and returning books all processed online.

The proposed system has following advantages.

Easy to handle and feasible

Fast retrieve to database

A smaller amount of error

Easy access to all information

Look and Feel Environment

Rapid transaction

Cost reduction

All the manual complications in controlling the Library have


been rectified by implementing this computerization system.
The system has been developed to control the behavior, jobs
and requirements of each individual category of users. The
users are categorized as students, teachers and staffs. Students
and teachers are active members of book users whereas the
staffs control the distribution and maintenance of library books.
Chapter 2. System Analysis
Different development methodologies can be adopted to develop the system. The
following common methodologies are:

2.1 Waterfall Model


The waterfall model was initiated as a first sequential design process in which
progress is downward. It is also called as a traditional model. There is no upward
flow. That is why it is named as waterfall. It is a linear software development
lifecycle model.

Requirements/ Analysis

Design

Implementation

Coding

Testing

Waterfall Model
The waterfall model has been prepared on numerous phases particularly to
improve the system. By following this technique, the system will be divided into
several phases thus reducing out the whole process. For instance you are in the
Phase I, it would not go to the next phase i.e. Phase II until the Phase I has done
completely. In the same process, you will go to the next phase like as waterfall.
Once you go to the next phase, you cannot turn back.

Advantages
The Waterfall model is simple and easy to use.

Easy to manage because of the inflexibility of the model - each phase has a review
process.

All the phases are developed and completed sequentially i.e. one by one.

It works fine for minor systems having well-understood requirements.


Strong documentation is obtainable because a lot of paper work is done in
waterfall model.

Disadvantages
Modifying scope at some point in the life cycle can destroy the system.

There are high amount of risk and insecurity.

A lot of time is wasted.

When to use the waterfall model:


Requirements are extremely well known, clearly understood and fixed.

The organization has knowledge of alike projects.

Tools and techniques are understood.

There are no vague needs.

The project is short.

2.2 Spiral Model


Spiral model is one of the best model for software development which merge
both prototyping and designing in different stages of the development process. It
is like designing the first prototype of the concept, its requirements and plan at
the end of the first stage. Likewise we create another prototype which consists of
drafting the requirements, validating and testing it in another stage. Similarly
whole development process runs similarly throughout the entire process of
software development which is called spiral model of software development.

This model also used the features of the both prototyping and waterfall model
which makes it very efficient and effective software development model. This also
the main reason that software engineer uses this model to develop very complex
and sophisticated software.

It is basically used in military, future combat, scientific research and so on.


Individual consequent spirals develops on the baseline spiral. During the planning
phase, all the requirements needed are collected. Risk and solution are identified
in the risk analysis phase where a process is undertaken. Finally, a prototype is
produced. The next phase is the evaluation phase where the clients are given the
project to evaluate the outcomes before it goes on to the next spiral.

Advantages
It minimizes risk because of high level of risk analysis in the different stages of the
development process.

It is highly recommended to those projects which are very complex and


sophisticated.

Unlike other model, this model is quiet flexible which means that if we want add
some functionality at a later date then we can do so.

Disadvantages
It requires very highly skilled manpower to analyze and identify the risk.

This model is expensive than other models because of the expertise it requires to
develop and analyze the system.

Main success of the project is highly depends upon the analysis stage which
means beginning of the stage.

This model is not effective and efficient for the small projects.

2.3 Prototype Model


Prototyping model is such types of model which is used to develop sample of the
product including all the requirements in the early stage of software
development. This model basically follows the simple concept of test and trail for
the precise development of the product. First, we design the concept, built its
prototype and then we test that prototype. If there is any problem in that
prototype then we go back to our design, makes some changes; after that again
we design another prototype and then we test it. In this way whole process runs
throughout the period until or unless we get the final product. This is how
prototyping model works.
It is mostly used in development of webpage based systems. It is especially used
to develop e-commerce sites, shopping sites, catalogue page and product order
page etc.

Advantages
Early development of prototype gives an idea of how the final product looks like.

Early development of prototype allows us to find problems in our system in early


stage so it reduces time to develop final product.

It is one of the costs effective software development process.

It also allows active participation between its user and producer of the product.

Disadvantages
It is vulnerable if there are lots of end users as well as it might take long time to
develop the product.

It might not combine overall needs of the organization as a whole.

It is not suitable for development of large products.

Structure and design of the system could go other way than that of the original
design.

When to use Prototype model:


Prototype model should be used when the desired system needs to have a lot of
interaction with the end users.

Typically, online systems, web interfaces have a very high amount of interaction
with end users, are best suited for Prototype model. It might take a while for a
system to be built that allows ease of use and needs minimal training for the end
user.

Prototyping ensures that the end users constantly work with the system and
provide a feedback which is incorporated in the prototype to result in a useable
system. They are excellent for designing good human computer interface systems.
2.4 Rapid Application Development Model (RAD)
As its name implies, Rapid Application Development is one of the fastest ways of
developing software. It uses minimal planning for its prototype which makes it
easier to develop software much faster. Instead of wasting time for planning and
design, they simply merge planning with construction phase. It means that
planning and construction goes together which ultimately makes it more flexible
to changes of the requirement in the middle of the construction. We can call it as
an incremental process model that insistences a small development phase.

This approach is mostly used in such types of environment which needs fast
response. Similarly, when the system is needed than early set development time
then this approach is suitable to provide a fast response. It is specially used to
developed systems for share markets, IT (Information technology) companies and
so on.

Advantages
It reduces the time while developing the software.

Different components can be reused.

It provides higher customer satisfaction due to active involvement during


software development.

It supports the feedback of the customer.

It helps to improve integration issue as well.

Disadvantages
It depends upon the highly qualified team and developers to identify the
requirements.

It is costly method due to cost of modeling and automated generation coding.

It requires highly-skilled manpower.

RAD can only develop those system which can be modularized.

When to use Prototype Model:


It should be used if the requirements are well identified.
It should be used if there is enough high-skilled manpower and the high amount
of cost that needed for the entire project.

It should be used that can be modularized in a short period of time.

It should be used if there is availability of the user involved during the entire life
cycle of the system development.

2.5 Agile Methodology


Agile is one of the rapid ways of developing software. It is also one of the main
types of incremental model where different results of different phases were
merged together and send for through testing. After that, these results are use for
application development. Because of incremental model, small software produces
with quick phases. It is cooperative as well because the developers and clients are
working frequently together with good communication. It is straightforward due
to its well documentation, simple, and easy to learn. It is also well adaptive in
nature. At any time, changes can be made easily without difficulty. There are
different organization that are using this approach as for example, General
Electronics (GE), British Airways, NYSE Euronext and several other agencies.

Type of Agile Methodology:


Extreme Programming

Scrum

Crystal family of methodologies

Feature Driven Development

Rational Unified Process

Dynamic Systems Development Method

Adaptive Software Development

Open Source Software Development

Other Agile Methods

Agile Modeling
Pragmatic Programming

Advantages
It is a rapid way of development of software so client satisfaction is high.

Client satisfaction is emphasize that means interaction with client is high so less
chance of product failure.

There is a good communication between developers and clients.

It is very flexible that even late changes in requirements are adopted without any
problems.

Disadvantages
If organization representative is not sure about the specific requirement for the
organization then whole software development process will be on jeopardy.

When developing a large product for large organization it will be very difficult to
achieve and measure the requirements needed for the development of
application.

It gives less emphasis to design and process of the requirements.

It requires very highly experienced manpower which will often make this process
quite expensive.

When to use Agile Methodology:


It should be used if the system needs some certain changes in the middle of time.
These changes are possible with a minimum amount of cost.

It should be used if you want to make a good communications between the


clients and developers so that client gets fully satisfaction with no error.

It should be used if the system needs a good design and technical excellence.
Out of the above methodologies, I have chosen Rational Unified Process (RUP). In
my project, I have implemented Rational Unified Process as a methodology where
Joint Application Development is possible and inception, elaboration,
construction, and transition phases are overlapped so that feedback from the
client can be effectively implemented in my system.

When to use Agile Methodology:


It should be used if the system needs some certain changes in the middle of time.
These changes are possible with a minimum amount of cost.

It should be used if you want to make a good communications between the


clients and developers so that client gets fully satisfaction with no error.

It should be used if the system needs a good design and technical excellence.

Out of the above methodologies, I have chosen Rational Unified


Process (RUP). In my project, I have implemented Rational Unified
Process as a methodology where Joint Application Development is
possible and inception, elaboration, construction, and transition
phases are overlapped so that feedback from the client can be
effectively implemented in my system.
Chapter 3. Software & Hardware Requirement Specifications

Tools and Technologies Used


MySQL
It is one of most famous open source relational database management
system which is based on Structured Query Language. It can support
multiple accesses in its database, which makes it one of the most
famous database management systems for development of web based
systems. MySQL is used in different kinds of application including data
warehousing, e-commerce, web databases, logging and distribution
application and so on.

JavaScript
JavaScript is a client side decoded scripting language developed by
Netscape to build interactive sites. It is basically used to do different
tasks like trigger a linked to a page to generate popup windows,
trigger a graphic images and text and so on. It is also used in
validation of the form and authentication of information provided in
the web pages by the end users.

jQuery
It is an open source JavaScript Library that fulfill the gap between
different tools used for the development of web. It helps to abridges
outcome management HTML file negotiating, animating and Ajax
interfaces for a web development. It is another way of writing
JavaScript.
Chapter 4. System Design

4.1 Introduction

This report will provide a detailed account of the processes our group used to
design and implement a database that can be used to manage a library system.
Each subsection of the report corresponds to an important feature of database
design.

4.2 ER DESIGN

It clear that the physical objects from the previous section – the customers,
employees, cards, media, and library branches – correspond to entities in the
Entity-Relationship model, and the operations to be done on those entities –
holds, checkouts, and so on – correspond to relationships. However, a good
design will minimize redundancy and attempt to store all the required
information in as small a space as possible. After some consideration, we have
decided on the following design is
4.3 Database Description (Normalized)

The next step was to create the physical database and input some
sample data. In order to turn the relational design into a database.

<?xml version="1.0" encoding="UTF-8"?>


<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***

For the purpose of easier reading the script


is divided into following sections:

- initialization
- compilation
- jar
- execution
- debugging
- javadoc
- junit compilation
- junit execution
- junit debugging
- applet
- cleanup
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1"
xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3"
xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default"
name="Library_management-impl">
<target depends="test,jar,javadoc" description="Build and test whole project."
name="default"/>
<!--
======================
INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init" name="-init-private">
<property file="nbproject/private/config.properties"/>
<property file="nbproject/private/configs/${config}.properties"/>
<property file="nbproject/private/private.properties"/>
</target>
<target depends="-pre-init,-init-private" name="-init-user">
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
<property file="nbproject/configs/${config}.properties"/>
<property file="nbproject/project.properties"/>
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property"
name="-do-init">
<available file="${manifest.file}" property="manifest.available"/>
<condition property="manifest.available+main.class">
<and>
<isset property="manifest.available"/>
<isset property="main.class"/>
<not>
<equals arg1="${main.class}" arg2="" trim="true"/>
</not>
</and>
</condition>
<condition property="manifest.available+main.class+mkdist.available">
<and>
<istrue value="${manifest.available+main.class}"/>
<isset property="libs.CopyLibs.classpath"/>
</and>
</condition>
<condition property="have.tests">
<or>
<available file="${test.src.dir}"/>
</or>
</condition>
<condition property="have.sources">
<or>
<available file="${src.dir}"/>
</or>
</condition>
<condition property="netbeans.home+have.tests">
<and>
<isset property="netbeans.home"/>
<isset property="have.tests"/>
</and>
</condition>
<condition property="no.javadoc.preview">
<and>
<isset property="javadoc.preview"/>
<isfalse value="${javadoc.preview}"/>
</and>
</condition>
<property name="run.jvmargs" value=""/>
<property name="javac.compilerargs" value=""/>
<property name="work.dir" value="${basedir}"/>
<condition property="no.deps">
<and>
<istrue value="${no.dependencies}"/>
</and>
</condition>
<property name="javac.debug" value="true"/>
<property name="javadoc.preview" value="true"/>
<property name="application.args" value=""/>
<property name="source.encoding" value="${file.encoding}"/>
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
<and>
<isset property="javadoc.encoding"/>
<not>
<equals arg1="${javadoc.encoding}" arg2=""/>
</not>
</and>
</condition>
<property name="javadoc.encoding.used" value="${source.encoding}"/>
<property name="includes" value="**"/>
<property name="excludes" value=""/>
<property name="do.depend" value="false"/>
<condition property="do.depend.true">
<istrue value="${do.depend}"/>
</condition>
<condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='$
{jaxws.endorsed.dir}'">
<and>
<isset property="jaxws.endorsed.dir"/>
<available file="nbproject/jaxws-build.xml"/>
</and>
</condition>
</target>
<target name="-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
<fail unless="dist.jar">Must set dist.jar</fail>
</target>
<target name="-init-macrodef-property">
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-javac">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="${javac.debug}" name="debug"/>
<attribute default="/does/not/exist" name="sourcepath"/>
<element name="customize" optional="true"/>
<sequential>
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}"
encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false"
includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}"
srcdir="@{srcdir}" target="${javac.target}">
<classpath>
<path path="@{classpath}"/>
</classpath>
<compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
<customize/>
</javac>
</sequential>
</macrodef>
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<sequential>
<depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}"
includes="${includes}" srcdir="@{srcdir}">
<classpath>
<path path="@{classpath}"/>
</classpath>
</depend>
</sequential>
</macrodef>
<macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${build.classes.dir}" name="destdir"/>
<sequential>
<fail unless="javac.includes">Must set javac.includes</fail>
<pathconvert pathsep="," property="javac.includes.binary">
<path>
<filelist dir="@{destdir}" files="${javac.includes}"/>
</path>
<globmapper from="*.java" to="*.class"/>
</pathconvert>
<delete>
<files includes="${javac.includes.binary}"/>
</delete>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-junit">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<sequential>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed"
fork="true" showoutput="true">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}"
includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
</batchtest>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg line="${run.jvmargs}"/>
</junit>
</sequential>
</macrodef>
</target>
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${main.class}" name="name"/>
<attribute default="${debug.classpath}" name="classpath"/>
<attribute default="" name="stopclassname"/>
<sequential>
<nbjpdastart addressproperty="jpda.address" name="@{name}"
stopclassname="@{stopclassname}" transport="${debug-transport}">
<classpath>
<path path="@{classpath}"/>
</classpath>
</nbjpdastart>
</sequential>
</macrodef>
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${build.classes.dir}" name="dir"/>
<sequential>
<nbjpdareload>
<fileset dir="@{dir}" includes="${fix.classes}">
<include name="${fix.includes}*.class"/>
</fileset>
</nbjpdareload>
</sequential>
</macrodef>
</target>
<target name="-init-debug-args">
<property name="version-output" value="java version &quot;${ant.java.version}"/>
<condition property="have-jdk-older-than-1.4">
<or>
<contains string="${version-output}" substring="java version &quot;1.0"/>
<contains string="${version-output}" substring="java version &quot;1.1"/>
<contains string="${version-output}" substring="java version &quot;1.2"/>
<contains string="${version-output}" substring="java version &quot;1.3"/>
</or>
</condition>
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent
-Djava.compiler=none">
<istrue value="${have-jdk-older-than-1.4}"/>
</condition>
<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
<os family="windows"/>
</condition>
<condition else="${debug-transport-by-os}" property="debug-transport" value="$
{debug.transport}">
<isset property="debug.transport"/>
</condition>
</target>
<target depends="-init-debug-args" name="-init-macrodef-debug">
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${main.class}" name="classname"/>
<attribute default="${debug.classpath}" name="classpath"/>
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=$
{jpda.address}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-java">
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${main.class}" name="classname"/>
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="${run.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
<jar compress="${jar.compress}" jarfile="${dist.jar}">
<j2seproject1:fileset dir="${build.classes.dir}"/>
</jar>
</presetdef>
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-
init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-
macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
<!--
===================
COMPILATION SECTION
===================
-->
<target depends="init" name="deps-jar" unless="no.deps"/>
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-
automatic-build"/>
<target depends="init" name="-check-automatic-build">
<available file="${build.classes.dir}/.netbeans_automatic_build"
property="netbeans.automatic.build"/>
</target>
<target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
<antcall target="clean"/>
</target>
<target depends="init,deps-jar" name="-pre-pre-compile">
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="-pre-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="do.depend.true" name="-compile-depend">
<j2seproject3:depend/>
</target>
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend"
if="have.sources" name="-do-compile">
<j2seproject3:javac/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="$
{includes}"/>
</copy>
</target>
<target name="-post-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-
compile,-post-compile" description="Compile project." name="compile"/>
<target name="-pre-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:force-recompile/>
<j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
</target>
<target name="-post-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-
do-compile-single,-post-compile-single" name="compile-single"/>
<!--
====================
JAR BUILDING SECTION
====================
-->
<target depends="init" name="-pre-pre-jar">
<dirname file="${dist.jar}" property="dist.jar.dir"/>
<mkdir dir="${dist.jar.dir}"/>
</target>
<target name="-pre-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest"
unless="manifest.available">
<j2seproject1:jar/>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-
with-manifest" unless="manifest.available+main.class">
<j2seproject1:jar manifest="${manifest.file}"/>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class"
name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
<j2seproject1:jar manifest="${manifest.file}">
<j2seproject1:manifest>
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
</j2seproject1:manifest>
</j2seproject1:jar>
<echo>To run this application from the command line without Ant, try:</echo>
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<pathconvert property="run.classpath.with.dist.jar">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
</pathconvert>
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar"
if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to=""/>
</pathconvert>
<pathconvert pathsep=" " property="jar.classpath">
<path path="${run.classpath.without.build.classes.dir}"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs"
classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}"
runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</copylibs>
<echo>To run this application from the command line without Ant, try:</echo>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<echo>java -jar "${dist.jar.resolved}"</echo>
</target>
<target name="-post-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-
jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
<!--
=================
EXECUTION SECTION
=================
-->
<target depends="init,compile" description="Run a main class." name="run">
<j2seproject1:java>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject1:java>
</target>
<target name="-do-not-recompile">
<property name="javac.includes.binary" value=""/>
</target>
<target depends="init,-do-not-recompile,compile-single" name="run-single">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}"/>
</target>
<!--
=================
DEBUGGING SECTION
=================
-->
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
<j2seproject1:nbjpdastart name="${debug.class}"/>
</target>
<target depends="init,compile" name="-debug-start-debuggee">
<j2seproject3:debug>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject3:debug>
</target>
<target depends="init,compile,-debug-start-debugger,-debug-start-debuggee"
description="Debug project in IDE." if="netbeans.home" name="debug"/>
<target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
</target>
<target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"
if="netbeans.home" name="debug-stepinto"/>
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-
single">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}"/>
</target>
<target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-
debuggee-single" if="netbeans.home" name="debug-single"/>
<target depends="init" name="-pre-debug-fix">
<fail unless="fix.includes">Must set fix.includes</fail>
<property name="javac.includes" value="${fix.includes}.java"/>
</target>
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-
fix">
<j2seproject1:nbjpdareload/>
</target>
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
<!--
===============
JAVADOC SECTION
===============
-->
<target depends="init" name="-javadoc-build">
<mkdir dir="${dist.javadoc.dir}"/>
oc.windowtitle}">
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse"
unless="no.javadoc.preview">
< <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}"
charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="$
{javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="$
{javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="$
{javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true"
version="${javadoc.version}" windowtitle="${javad
nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."
name="javadoc"/>
<!--
=========================
JUNIT COMPILATION SECTION
=========================
-->
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
<mkdir dir="${build.test.classes.dir}"/>
</target>
<target name="-pre-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="do.depend.true" name="-compile-test-depend">
<j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}"
srcdir="${test.src.dir}"/>
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-
depend" if="have.tests" name="-do-compile-test">
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="$
{build.test.classes.dir}" srcdir="${test.src.dir}"/>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="$
{includes}"/>
</copy>
</target>
<target name="-post-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-
post-compile-test" name="compile-test"/>
<target name="-pre-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests"
name="-do-compile-test-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
<j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="$
{build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}"
srcdir="${test.src.dir}"/>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="$
{includes}"/>
</copy>
</target>
<target name="-post-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-
test-single,-post-compile-test-single" name="compile-test-single"/>
<!--
=======================
JUNIT EXECUTION SECTION
=======================
-->
<target depends="init" if="have.tests" name="-pre-test-run">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
<j2seproject3:junit testincludes="**/*Test.java"/>
</target>
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-
test-run">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
<target depends="init" if="have.tests" name="test-report"/>
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-
browse" description="Run unit tests." name="test"/>
<target depends="init" if="have.tests" name="-pre-test-run-single">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-
test-run-single">
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
<j2seproject3:junit excludes="" includes="${test.includes}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single"
if="have.tests" name="-post-test-run-single">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
<target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-
run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
<!--
=======================
JUNIT DEBUGGING SECTION
=======================
-->
<target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
<property location="${build.test.results.dir}/TEST-${test.class}.xml"
name="test.report.file"/>
<delete file="${test.report.file}"/>
<mkdir dir="${build.test.results.dir}"/>
<j2seproject3:debug
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="$
{ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
<customize>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<arg value="${test.class}"/>
<arg value="showoutput=true"/>
<arg
value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
<arg
value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,$
{test.report.file}"/>
</customize>
</j2seproject3:debug>
</target>
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-
debugger-test">
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
</target>
<target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-
debug-start-debuggee-test" name="debug-test"/>
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-
debug-fix-test">
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
</target>
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-
fix-test"/>
<!--
=========================
APPLET EXECUTION SECTION
=========================
-->
<target depends="init,compile-single" name="run-applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject1:java classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject1:java>
</target>
<!--
=========================
APPLET DEBUGGING SECTION
=========================
-->
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-
applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject3:debug classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject3:debug>
</target>
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"
if="netbeans.home" name="debug-applet"/>
<!--
===============
CLEANUP SECTION
===============
-->
<target depends="init" name="deps-clean" unless="no.deps"/>
<target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."
name="clean"/>
</project>

As stated earlier, the tables in this database are in the Third Normal Form (3 NF.) In order to
decompose the relationships into this form, we had to split Status table from the Media table.
Each Media object has a status code, and each status code has an associated description. It
would be redundant to store both codes and descriptions in the Media object, so we created a
dedicated Status table with the code as the primary key. The other tables were designed with
optimization in mind. The Card entity, for instance, was separated from the Customer entity to
avoid a functional dependency (since the "num" attribute of the Card entity determines the
"fines" attribute.)
4.4 Implementation

During this semester, our group has designed and implemented a database for
managing a library system with multiple locations, the ability to store videos as
well as books, and separate functions for customers and librarians. Furthermore,
we were able to keep the system's logic abstracted from both the end users and
the DBMS by using JDBC to create a third-tier architecture. Finally, we used CSS
and JSP to design an Internet-based GUI for remotely accessing the database. The
database design supports more operations than are currently implemented by the
GUI. For example, the "hold" relationship can store a waiting list of customers
who want to check out a particular media item; there is also the possibility of a
customer having multiple library cards. If we were to continue with this project,
we would implement the above features, and also improve the account
management and search features.
Chapter 5. Graphical User Interface Design

5.1 Introduction

The main aim of this project to illustrate the requirements needed for the library
management system. The project gives a view about both functional and non-
functional requirements chosen by the client. The project is developed using Edraw
Tool, JAVA, MS-ACCESS database, SQL. This application has a search facility
the admin can search by book or name. The admin can add or remove users or
book from database.

Scope :

The library transactions like issue, return and renewal of members. It can be used
in various fields like :
 In an educational institute, college giving description about content and the author.
 It can used in libraries for easily maintain the books and their details.

Conventions used:

 Admin: a person who has admin access privileges can login with his id and
password.
 User: The user can login into his account by the assigned login id and with
his password.
 Clients: They are nothing but intended users.
 SQL: It is used to retrieve the data from data base.
 SQL server: It used to store data in an order.
 Unique key: It is used for the differentiation of table entries.

Product features:

 Admin is the librarian.


 Student can access his account through online
  To the Librarian can issue a book to the student.
 Admin/user can view different books available in library.
 Admin can the books information or edit them.
 Admin check issued books and can view the details of student accounts.
 Student can request a new book from library
 Student can view the previous books that he was taken.
 Student can search all the books available in library.

Data-Base Tables :-

 Books database
 Borrowers database
 Users database
 Category database
5.2 Input Forms

DESIGN OF LIBRARY MANAGEMENT

import java.sql.*;
import javax.swing.table.DefaultTableModel;
public class Pavan extends javax.swing.JFrame {
public Pavan() {

initComponents();
}
@SuppressWarnings("unchecked")
private void PavanButton2ActionPerformed(java.awt.event.ActionEvent evt) {
PavanOptionPane1.showMessageDialog(null,"Thanks for using Library
Managment");
System.exit(0);

private void PavanButton4ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanschool.dispose();
Pavan a=new Pavan ();
a.setVisible(true);
PavanOptionPane1.showMessageDialog(null,"Thanks for using School Library");
}

private void PavanButton4ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanschool.dispose();
Pavan a=new Pavan ();
a.setVisible(true);
PavanOptionPane1.showMessageDialog(null,"Thanks for using School Library");
}
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
PavanRegistration.setVisible(false);
Pavanschool.setVisible(true);
PavanjTextField1.setText("");
PavanjTextArea1.setText("");
PavanjTextField2.setText("");
}

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {


int ans = PavanOptionPane1.showConfirmDialog(null,"Surely wanna submit record");
if ( ans==PavanOptionPane1.YES_OPTION)
{
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String a =PavanjTextField1.getText();
String b=(String) PavanjComboBox1.getSelectedItem();
String c=(String) jComboBox2.getSelectedItem();

long e =Long.parseLong(PavanjTextField2.getText());
String query ="INSERT INTO REGISTRATION VALUES( '"+a+"',"+b+",'"+c+"',"+e+");";
stmt.executeUpdate(query);
PavanOptionPane1.showMessageDialog(null,"Record succesfully submitted");
} catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"You have given wrong data");
}
t rs = stmt.executeQuery(query);
if (rs.next())
{
String dno =rs.getString("Student_Name");
String u =rs.getString("Student_Class");
String k =rs.getString("Section") ;
String m =rs.getString("Phone_No") ;
PavanjTextField5.setText(u);
PavanjTextField6.setText(k);
PavanjTextField7.setText(m);
PavanjTextField5.setEnabled(true);
PavanjTextField6.setEnabled(true);
PavanjTextField7.setEnabled(true);

}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
int aa = PavanOptionPane1.showConfirmDialog(null,"Surely wanna Delete "+a);
if ( aa== PavanOptionPane1.YES_OPTION)
{
String taaa =(String) PavanjComboBox11.getSelectedItem();
PavanjComboBox11.removeItem(taaa);
PavanjComboBox26.removeItem(taaa);
try
{
Class.forName("java.sql.Driver");
Connection conA =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtA = conA.createStatement();
String c =(String) PavanjComboBox11.getSelectedItem();
String query ="delete from REGISTRATION where Student_Name = '"+taaa+"' ;";
stmtA.executeUpdate(query);
PavanOptionPane1.showMessageDialog(null,"Record Deleted");
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
}
PavanjTextField5.setText("");
PavanjTextField6.setText("");
PavanjTextField7.setText("");
Pavanschool.setVisible(true);
Pavandeletestudentrecord.setVisible(false);
}

private void PavanjButton14ActionPerformed(java.awt.event.ActionEvent evt) {


Pavandeletestudentrecord.setVisible(false);
Pavanregisteredstudent.setVisible(true);
PavanjTextField5.setText("");
PavanjTextField6.setText("");
PavanjTextField7.setText("");
}

private void PavanRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {


int p=PavanjTable1.getRowCount();
while(p>0)
{ DefaultTableModel table =(DefaultTableModel)PavanjTable1.getModel();
table.removeRow(0);
}
Pavanregisteredstudent.setVisible(true);
DefaultTableModel registration =(DefaultTableModel) PavanjTable1.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM registration ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String a =rs.getString(1);
String b =rs.getString(2);
String c =rs.getString(3);
String d =rs.getString(4);
registration.addRow(new Object[] { a,b,c, d});
}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
Pavanschool.setVisible(false);
}

private void PavanjRadioButton8ActionPerformed(java.awt.event.ActionEvent evt) {


PavanjTextField13.setText("");
int p=PavanjTable4.getRowCount();
while(p>0)
{
DefaultTableModel table =(DefaultTableModel)PavanjTable4.getModel();
table.removeRow(0);
}
Pavansearchofbook.setVisible(true);
Pavanavailablebook.setVisible(false);
}

private void PavanjButton16ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanavailablebook.setVisible(false);
Pavanschool.setVisible(true);
}

private void PavanjButton17ActionPerformed(java.awt.event.ActionEvent evt) {


int ans = PavanOptionPane1.showConfirmDialog(null,"Surely wanna Add record");
if ( ans==PavanOptionPane1.YES_OPTION)
{
try {
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String a =PavanjTextField8.getText();
String b=(String) PavanjComboBox5.getSelectedItem();
String c =PavanjTextField9.getText();
String d =PavanjTextField10.getText();
String e =PavanjTextField11.getText();
String f =PavanjTextField12.getText();
String query ="INSERT INTO book VALUES( '"+a+"',"+b+","+c+","+d+",'"+e+"',"+f+");";
stmt.executeUpdate(query);
PavanOptionPane1.showMessageDialog(null,"Record Succesfully Added");
} catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"You Have Given Wrong Data");
}
}
{
String q=PavanjTextField8.getText();
int i=0;
int length =PavanjComboBox27.getItemCount();
boolean exists=false;
for(;i<length;++i)
{
String item =(String)PavanjComboBox27.getItemAt(i);
if(item.equals(q))
{
exists=true;
break;
}
}
if(exists==false)
PavanjComboBox27.addItem(q);
}
{
String q=PavanjTextField8.getText();
int i=0;
int length =PavanjComboBox28.getItemCount();
boolean exists=false;
for(;i<length;++i)
{
String item =(String)PavanjComboBox28.getItemAt(i);
if(item.equals(q))
{
exists=true;
break;
}
}
if(exists==false)
PavanjComboBox28.addItem(q);
}
PavanjTextField8.setText("");
PavanjTextField9.setText("");
PavanjTextField10.setText("");
PavanjTextField11.setText("");
PavanjTextField12.setText("");
Pavanaddnewbook.setVisible(false);
Pavanschool.setVisible(true);
}

private void PavanjButton18ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanavailablebook.setVisible(true);
Pavanaddnewbook.setVisible(false);
PavanjTextField8.setText("");
PavanjTextField9.setText("");
PavanjTextField10.setText("");
PavanjTextField11.setText("");
PavanjTextField12.setText("");
}

private void PavanjButton19ActionPerformed(java.awt.event.ActionEvent evt) {


int p=PavanjTable4.getRowCount();
while(p>0)
{ DefaultTableModel table =(DefaultTableModel)PavanjTable4.getModel();
table.removeRow(0);
}
}
private void PavanjButton20ActionPerformed(java.awt.event.ActionEvent evt) {
int p=PavanjTable4.getRowCount();
while(p>0)
{ DefaultTableModel table =(DefaultTableModel)PavanjTable4.getModel();
table.removeRow(0);
}
DefaultTableModel dept =(DefaultTableModel) PavanjTable4.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String textfield =PavanjTextField13.getText();
String name=(String) PavanjComboBox6.getSelectedItem();
String sign=(String) jComboBox7.getSelectedItem();
String query ="SELECT * FROM book where " +name+" "+sign+" '"+textfield+ "' ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String dno =rs.getString(1);
String dName =rs.getString(2);
String d =rs.getString(3) ;
String da =rs.getString(4);
String daa =rs.getString(5);
String daaa =rs.getString(6);

dept.addRow(new Object[] { dno,dName,d,da,daa,daaa});


}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
}

private void PavanjButton21ActionPerformed(java.awt.event.ActionEvent evt) {


Pavansearchofbook.setVisible(false);
Pavanavailablebook.setVisible(true);
PavanjTextField13.setText("");
int p=PavanjTable4.getRowCount();
while(p>0)
{ DefaultTableModel table =(DefaultTableModel)PavanjTable4.getModel();
table.removeRow(0);
}
}

private void PavanjButton22ActionPerformed(java.awt.event.ActionEvent evt) {


PavanjTextField15.setText("");
PavanjTextField16.setText("");
jTextField17.setText("");
PavanjTextField18.setText("");
PavanjTextField19.setText("");
Pavandeletebook.setVisible(false);
Pavanschool.setVisible(true);
}

private void PavanjButton23ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
Class.forName("java.sql.Driver");
Connection conw =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtw = conw.createStatement();
String t =(String) PavanjComboBox27.getSelectedItem();
String query =" SELECT * FROM book WHERE Book_Name = '" +t+ " ' ;" ;
ResultSet rsw = stmtw.executeQuery(query);
if (rsw.next())
{
String dnoa =rsw.getString("Book_Name");
String ua =rsw.getString("book_Class");
String ka =rsw.getString("Book_No") ;
String maa =rsw.getString("Pages") ;
String mq =rsw.getString("Author") ;
String ma=rsw.getString("Eddition") ;
PavanjTextField15.setText(ua);
PavanjTextField16.setText(ka);
jTextField17.setText(maa);
PavanjTextField18.setText(mq);
PavanjTextField19.setText(ma);
PavanjTextField15.setEnabled(true);
PavanjTextField16.setEnabled(true);
jTextField17.setEnabled(true);
PavanjTextField18.setEnabled(true);
PavanjTextField19.setEnabled(true);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
int aa = PavanOptionPane1.showConfirmDialog(null,"Surely wanna Delete records");
if( aa== PavanOptionPane1.YES_OPTION)
{
String taaa =(String) PavanjComboBox27.getSelectedItem();
PavanjComboBox27.removeItem(taaa);
PavanjComboBox28.removeItem(taaa);
try
{
Class.forName("java.sql.Driver");
Connection conA =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtA = conA.createStatement();
String c =(String) PavanjComboBox27.getSelectedItem();
String query ="delete from book where Book_Name = '"+taaa+"' ;";
stmtA.executeUpdate(query);
PavanOptionPane1.showMessageDialog(null,"Record Deleted");
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
}
PavanjTextField15.setText("");
PavanjTextField16.setText("");
jTextField17.setText("");
PavanjTextField18.setText("");
PavanjTextField19.setText("");
Pavanschool.setVisible(true);
Pavandeletebook.setVisible(false);
}

private void PavanjButton24ActionPerformed(java.awt.event.ActionEvent evt) {


String qaa=(String)PavanjComboBox26.getSelectedItem();
String qssc=(String)PavanjComboBox28.getSelectedItem();
String idate=(String)PavanjComboBox12.getSelectedItem();
String imonth=(String)PavanjComboBox15.getSelectedItem();
int inumericmonth=0;
if(imonth=="January")
{
inumericmonth=1;
}
if(imonth=="Februry")
{
inumericmonth=2;
}
if(imonth=="March")
{
inumericmonth=3;
}
if(imonth=="April")
{
inumericmonth=4;
}
if(imonth=="May")
{
inumericmonth=5;
}
if(imonth=="June")
{
inumericmonth=6;
}
if(imonth=="July")
{
inumericmonth=7;
}
if(imonth=="August")
{
inumericmonth=8;
}
if(imonth=="September")
{
inumericmonth=9;
}
if(imonth=="October")
{
inumericmonth=10;
}
if(imonth=="November")
{
inumericmonth=11;
}
if(imonth=="December")
{
inumericmonth=12;
}
String iyear=(String)PavanjComboBox16.getSelectedItem();
String issuedate=(String) (iyear+"-"+inumericmonth+"-"+idate);
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String t =(String)PavanjComboBox26.getSelectedItem();
String query =" SELECT * FROM registration WHERE Student_Name ='" +t+ "';" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String dno =rs.getString("Student_Name");
String dNa =rs.getString("Student_Class");
String d =rs.getString("Section") ;
String da =rs.getString("Phone_No") ;
PavanjTextField21.setText(dNa);
PavanjTextField24.setText(d);
PavanjTextField25.setText(da);
PavanjTextField21.setEnabled(true);
PavanjTextField24.setEnabled(true);
PavanjTextField25.setEnabled(true);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String ta =(String)PavanjComboBox28.getSelectedItem();
String query =" SELECT * FROM book WHERE book_Name ='" +ta+ "';" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String dno =rs.getString("Book_Name");
String dNa =rs.getString("Book_Class");
String d =rs.getString("Book_No") ;
String da =rs.getString("Pages") ;
String daa =rs.getString("author") ;
String daq =rs.getString("Eddition") ;
PavanjTextField23.setText(dNa);
jTextField26.setText(d);
PavanjTextField27.setText(da);
jTextField28.setText(daa);
PavanjTextField29.setText(daq);
PavanjTextField23.setEnabled(true);
jTextField26.setEnabled(true);
PavanjTextField27.setEnabled(true);
jTextField28.setEnabled(true);
PavanjTextField29.setEnabled(true);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String a =PAVANjTextField49.getText();
long b =Long.parseLong(PAVANjTextField50.getText());
long c =Long.parseLong(jTextField59.getText());
String d =PAVANjTextField60.getText();
long e =Long.parseLong(PAVANjTextField61.getText());
String query ="insert into publicavailablebook values
( '"+a+"','"+b+"','"+c+"','"+d+"','"+e+"');";
stmt.executeUpdate(query);
{
String q=PAVANjTextField49.getText();
int i=0;
int length =PAVANjComboBox33.getItemCount();
boolean exists=false;
for(;i<length;++i)
{
String item =(String)PAVANjComboBox33.getItemAt(i);
if(item.equals(q))
{
exists=true;
break;
}
}
if(exists==false)
PAVANjComboBox33.addItem(q);
}
{
String q=PAVANjTextField49.getText();
int i=0;
int length =PAVANjComboBox34.getItemCount();
boolean exists=false;
for(;i<length;++i)
{
String item =(String)PAVANjComboBox34.getItemAt(i);
if(item.equals(q))
{
exists=true;
break;
}
}
if(exists==false)
PAVANjComboBox34.addItem(q);
}
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"You Have Given Wrong Data");
}
Pavanpublicadddnewbook.setVisible(false);
Pavanpubliclibrary.setVisible(true);
PAVANjTextField49.setText("");
PAVANjTextField50.setText("");
jTextField59.setText("");
PAVANjTextField60.setText("");
PAVANjTextField61.setText("");
}
private void PAVANjButton46ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpublicadddnewbook.setVisible(false);
Pavanpubliclibrary.setVisible(true);
PAVANjTextField49.setText("");
PAVANjTextField50.setText("");
jTextField59.setText("");
PAVANjTextField60.setText("");
PAVANjTextField61.setText("");
}

private void PAVANjButton50ActionPerformed(java.awt.event.ActionEvent evt) {


int pq=PAVANjTable10.getRowCount();
while(pq>0)
{ DefaultTableModel table =(DefaultTableModel)PAVANjTable10.getModel();
table.removeRow(0);
}
}
private void PAVANjButton51ActionPerformed(java.awt.event.ActionEvent evt) {
int pq=PAVANjTable10.getRowCount();
while(pq>0)
{ DefaultTableModel table =(DefaultTableModel)PAVANjTable10.getModel();
table.removeRow(0);
}
DefaultTableModel studentsearchtablea =(DefaultTableModel) PAVANjTable10.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String textfield =jTPAVANextField63.getText();
String name=(String) PAVANjComboBox13.getSelectedItem();
String sign=(String) jComboBox14.getSelectedItem();
String query ="SELECT * FROM publicavailablebook where " +name+" "+sign+"
'"+textfield+ "' ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String dno =rs.getString(1);
String dName =rs.getString(2);
String d =rs.getString(3) ;
String dq=rs.getString(4) ;
String da =rs.getString(5) ;
studentsearchtablea.addRow(new Object[] { dno,dName,d,dq,da});
}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in search");
}
}

private void PAVANjButton52ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanpublicbooksearch.setVisible(false);
Pavanpublicavailablebook.setVisible(true);
jTPAVANextField63.setText("");
int pu=PAVANjTable10.getRowCount();
while(pu>0)
{ DefaultTableModel table =(DefaultTableModel)PAVANjTable10.getModel();
table.removeRow(0);
}
}
private void PAVANjButton53ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpublicbookdelete.setVisible(false);
Pavanpubliclibrary.setVisible(true);
PAVANjTextField65.setText("");
PAVANjTextField66.setText("");
PAVANjTextField67.setText("");
PAVANjTextField68.setText("");
}

private void PAVANjButton54ActionPerformed(java.awt.event.ActionEvent evt) {


try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String t =(String) PAVANjComboBox33.getSelectedItem();
String query =" SELECT * FROM publicavailablebook WHERE Book_Name = '" +t+ " ' ;" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String a =rs.getString("Book_Name");
String b =rs.getString("Book_No");
String c =rs.getString("Pages") ;
String d =rs.getString("Author") ;
String e =rs.getString("Eddition") ;
PAVANjTextField65.setText(b);
PAVANjTextField66.setText(c);
PAVANjTextField67.setText(d);
PAVANjTextField68.setText(e);
PAVANjTextField65.setEnabled(true);
PAVANjTextField66.setEnabled(true);
PAVANjTextField67.setEnabled(true);
PAVANjTextField68.setEnabled(true);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in loading");
}
int aa = PavanOptionPane1.showConfirmDialog(null,"Surely wanna Delete records");
if ( aa== PavanOptionPane1.YES_OPTION)
{
String q=(String) PAVANjComboBox33.getSelectedItem();
PAVANjComboBox33.removeItem(q);
PAVANjComboBox34.removeItem(q);
try
{
Class.forName("java.sql.Driver");
Connection conA =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtA = conA.createStatement();
String query ="delete from publicavailablebook where Book_Name = '"+q+"' ;";
stmtA.executeUpdate(query);
PavanOptionPane1.showMessageDialog(null,"Record Deleted");
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in deleting");
}
}
PAVANjTextField65.setText("");
PAVANjTextField66.setText("");
PAVANjTextField67.setText("");
PAVANjTextField68.setText("");
Pavanpubliclibrary.setVisible(true);
Pavanpublicbookdelete.setVisible(false);
}
private void PAVANjButton55ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpublicissuedbooks.setVisible(false);
Pavanpubliclibrary.setVisible(true);
}

private void PAVANjButton47ActionPerformed(java.awt.event.ActionEvent evt) {


String q=(String) PAVANjComboBox35.getSelectedItem();
String qa=(String) PAVANjComboBox36.getSelectedItem();
String name=(String)PAVANjComboBox35.getSelectedItem();
String namebook=(String)PAVANjComboBox36.getSelectedItem();
int i=0;
int lengthss =PAVANjComboBox32.getItemCount();
boolean exists=false;
for(;i<lengthss;++i)
{
String item =(String)PAVANjComboBox32.getItemAt(i);
if(item.equals(name))
{
exists=true;
break;
}
}
if(exists==false)
PAVANjComboBox32.addItem(name);
int ii=0;
int lengthaa =PAVANjComboBox34.getItemCount();
boolean existsa=false;
for(;(ii)<lengthaa;++(ii))
{
String itemaa =(String)PAVANjComboBox34.getItemAt(ii);
if(itemaa.equals(namebook))
{
existsa=true;
break;
}
}
if(existsa==false)
PAVANjComboBox34.addItem(namebook);
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String t =(String) PAVANjComboBox35.getSelectedItem();
String ta =(String) PAVANjComboBox36.getSelectedItem();
String query =" SELECT * FROM publicissuedbook WHERE Name = '" +t+ "' and
Book_Name = '"+ta+"' ;" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String a =rs.getString("Name");
String b =rs.getString("phone_No");
String e =rs.getString("Book_Name") ;
String g =rs.getString("Book_No") ;
String h =rs.getString("Pages") ;
String iq =rs.getString("author") ;
String j =rs.getString("Eddition") ;
String k =rs.getString("pdoib") ;
PAVANjTextField70.setText(b);
PAVANjTextField69.setText(g);
PAVANjTextField71.setText(h);
PAVANjTextField72.setText(iq);
PAVANjTextField73.setText(j);
PAVANjTextField78.setText(k);
PAVANjTextField69.setEnabled(true);
PAVANjTextField70.setEnabled(true);
PAVANjTextField71.setEnabled(true);
PAVANjTextField72.setEnabled(true);
PAVANjTextField73.setEnabled(true);
PAVANjTextField78.setEnabled(true);

}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error for load");
}

{
try
{
Class.forName("java.sql.Driver");
Connection cona =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmta = cona.createStatement();
String ca =(String) PAVANjComboBox35.getSelectedItem();
String query ="delete from publicissuedbook where Name = '"+ca+"';";
stmta.executeUpdate(query);

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error for delete");
}
}
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
long b =Long.parseLong(PAVANjTextField70.getText());
String a =(String) PAVANjComboBox35.getSelectedItem();

String query ="insert into publicregistration values ( '"+a+"','"+b+"');";


stmt.executeUpdate(query);
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error to insert into publicregistration");
}
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String aaa =(String) PAVANjComboBox36.getSelectedItem();
long c =Long.parseLong(PAVANjTextField71.getText());
int b =Integer.parseInt(PAVANjTextField69.getText());
String d =PAVANjTextField72.getText();
int e =Integer.parseInt(PAVANjTextField73.getText());
String query ="insert into PUBLICAVAILABLEBOOK values
( '"+aaa+"','"+b+"','"+c+"','"+d+"','"+e+"');";
stmt.executeUpdate(query);
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error to insert into book");
}
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String taa =(String) PAVANjComboBox35.getSelectedItem();
String query =" SELECT * FROM publicsid WHERE name ='" +taa+ "';" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String dno =rs.getString("name");
String dNa =rs.getString("date");
String d =rs.getString("month") ;
String ds =rs.getString("year") ;
jTextField58.setText(dNa);
jTextField79.setText(d);
jTextField77.setText(ds);
jTextField82.setText(dno);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in loading sid table");
}
String rrimonth=(String)PAVANjComboBox24.getSelectedItem();
int rrm = 0 ;
if(rrimonth=="January")
{
rrm=1;
}
if(rrimonth=="Februry")
{
rrm=2;
}
if(rrimonth=="March")
{
rrm=3;
}
if(rrimonth=="April")
{
rrm=4;
}
if(rrimonth=="May")
{
rrm=5;
}
if(rrimonth=="June")
{
rrm=6;
}
if(rrimonth=="July")
{
rrm=7;
}
if(rrimonth=="August")
{
rrm=8;
}
if(rrimonth=="September")
{
rrm=9;
}
if(rrimonth=="October")
{
rrm=10;
}
if(rrimonth=="November")
{
rrm=11;
}
if(rrimonth=="December")
{
rrm=12;
}
int iida=Integer.parseInt(jTextField58.getText());
int iima=Integer.parseInt(jTextField79.getText());
int iiya=Integer.parseInt(jTextField77.getText());
String rrd=(String)(PAVANjComboBox23.getSelectedItem());
String RRY=(String)(PAVANjComboBox25.getSelectedItem());
jTextField80.setText(rrd);
jTextField81.setText(RRY);
int rrrda=Integer.parseInt(jTextField80.getText());
int rrrya=Integer.parseInt(jTextField81.getText());

String id = (String) (iiya+"-"+iima+"-"+iida) ;


String rd = (String) (rrrya+"-"+rrm+"-"+rrrda) ;

int dfa =0;


int pavan =0;

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/MENAGERIE","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT dayofyear(' "+rd+"') - dayofyear(' "+id+ "') as pavan ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
dfa = rs.getInt("pavan");
pavan = dfa;
if (dfa>=0)
{
jLabel1.setText(""+dfa);
}
else
{
dfa=dfa+365;
jLabel1.setText(""+dfa);
}
}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in date difference ");
}

int fine =0;


if(pavan<0)
{
PavanOptionPane1.showMessageDialog(null,"You have given wrong return date");
{
try
{
Class.forName("java.sql.Driver");
Connection conf =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtf = conf.createStatement();
String ch =(String) PAVANjComboBox35.getSelectedItem();
String query ="delete from publicregistration where Name = '"+ch+"';";
stmtf.executeUpdate(query);
stmtf.close();
conf.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error ");
}
}
{
try
{
Class.forName("java.sql.Driver");
Connection confa =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmtfa = confa.createStatement();
String cha =(String) PAVANjComboBox36.getSelectedItem();
String query ="delete from publicavailablebook where Book_Name = '"+cha+"';";
stmtfa.executeUpdate(query);
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error ");
}
}
{
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String a =(String) PAVANjComboBox35.getSelectedItem();
long b =Long.parseLong(PAVANjTextField70.getText());
String c =(String) PAVANjComboBox36.getSelectedItem();
int d =Integer.parseInt(PAVANjTextField69.getText());
int ea =Integer.parseInt(PAVANjTextField71.getText());
String f =PAVANjTextField72.getText();
int g =Integer.parseInt(PAVANjTextField73.getText());
String pdate =PAVANjTextField78.getText();
String query ="insert into publicissuedbook values
( '"+a+"','"+b+"','"+c+"','"+d+"','"+ea+"','"+f+"','"+g+"','"+pdate+"');";
stmt.executeUpdate(query);
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error ");
}
}
}
if(pavan >=0)
{
if((dfa>(-1))&&(dfa<11))
{
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book");
}
if((dfa>10)&&(dfa<16))
{
int late=dfa-10;
fine=20;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 30 Rs.");
}
if((dfa>15)&&(dfa<21))
{ int late=dfa-10;
fine=30;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 50 Rs.");
}
if((dfa>20)&&(dfa<31))
{ int late=dfa-10;
fine=50;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 80 Rs.");
}
if((dfa>30)&&(dfa<61))
{ int late=dfa-10;
fine=80;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 100 Rs.");
}
if((dfa>60)&&(dfa<111))
{int late=dfa-10;
fine=100;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 120 Rs.");
}
if((dfa>110)&&(dfa<211))
{ int late=dfa-10;
fine=120;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 150 Rs.");
}
if((dfa>210)&&(dfa<366))
{ int late=dfa-10;
fine=150;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 200 Rs.");
}
if(dfa>365)
{ int late=dfa-10;
fine=200;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 250 Rs.");
}

Pavanpublicreturnbook.setVisible(false);
Pavanpubliclibrary.setVisible(true);
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String c =jTextField82.getText();
String query ="delete from publicsid where name = '"+c+"';";
stmt.executeUpdate(query);

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
PAVANjComboBox35.removeItem(q);
PAVANjComboBox36.removeItem(qa);
jTextField58.setText("");
jTextField79.setText("");
jTextField77.setText("");
jTextField81.setText("");
PAVANjTextField78.setText("");
jTextField80.setText("");
PAVANjTextField70.setText("");
PAVANjTextField69.setText("");
PAVANjTextField71.setText("");
PAVANjTextField72.setText("");
PAVANjTextField73.setText("");
}
private void PAVANjButton48ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpublicreturnbook.setVisible(false);
Pavanpubliclibrary.setVisible(true);
PAVANjTextField70.setText("");
PAVANjTextField69.setText("");
PAVANjTextField71.setText("");
PAVANjTextField72.setText("");
PAVANjTextField73.setText("");
}

private void PAVANjTextField70ActionPerformed(java.awt.event.ActionEvent evt) {

private void PAVANjTextField51ActionPerformed(java.awt.event.ActionEvent evt) {

private void PavanRadioButton6ActionPerformed(java.awt.event.ActionEvent evt) {


Pavaninstruction.setVisible(true);
Pavanschool.setVisible(false);
}

private void PavanRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanschool.setVisible(true);
this.setVisible(false);
}
private void PavanRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
Pavanpubliclibrary.setVisible(true);
}
private void PavanRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {
{
int p=PavanjTable3.getRowCount();
while(p>0)
{
DefaultTableModel table =(DefaultTableModel)PavanjTable3.getModel();
table.removeRow(0);
}
Pavanavailablebook.setVisible(true);
Pavanschool.setVisible(false);
DefaultTableModel dep =(DefaultTableModel) PavanjTable3.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM book ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String dno =rs.getString(1);
String dName =rs.getString(2);
String d =rs.getString(3);
String da =rs.getString(4);
String daa =rs.getString(5);
String daaa =rs.getString(6);
dep.addRow(new Object[] { dno,dName, d,da,daa,daaa});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
}
}

private void PavanRadioButton13ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanissuebook.setVisible(true);
Pavanschool.setVisible(false);
PavanjTextField21.setText("");
PavanjTextField24.setText("");
PavanjTextField25.setText("");
PavanjTextField23.setText("");
jTextField26.setText("");
PavanjTextField27.setText("");
jTextField28.setText("");
PavanjTextField29.setText("");
}
private void PavanRadioButton14ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanschool.setVisible(false);
Pavanreturnbook.setVisible(true);
PavanjTextField32.setText("");
PavanjTextField33.setText("");
PavanjTextField34.setText("");
PavanjTextField36.setText("");
PavanjTextField37.setText("");
PavanjTextField38.setText("");
jTextField39.setText("");
PavanjTextField40.setText("");
PavanjTextField42.setText("");
}
private void PavanRadioButton7ActionPerformed(java.awt.event.ActionEvent evt) {
{
int p=PavanjTable5.getRowCount();
while(p>0)
{
DefaultTableModel table =(DefaultTableModel)PavanjTable5.getModel();
table.removeRow(0);
}
Pavanissuedbooks.setVisible(true);
DefaultTableModel registration =(DefaultTableModel) PavanjTable5.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM issuedbook ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String a =rs.getString(1);
String b =rs.getString(2);
String c =rs.getString(3);
String d =rs.getString(4);
String e =rs.getString(5);
String f =rs.getString(6);
String g =rs.getString(7);
String i =rs.getString(8);
String j =rs.getString(9);
String k =rs.getString(10);
String ka =rs.getString(11);
registration.addRow(new Object[] { a,b,c, d,e,f,g,i,j,k,ka});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
Pavanschool.setVisible(false);
}
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
long b =Long.parseLong(PAVANjTextField70.getText());
String a =(String) PAVANjComboBox35.getSelectedItem();

String query ="insert into publicregistration values ( '"+a+"','"+b+"');";


stmt.executeUpdate(query);
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error to insert into publicregistration");
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String aaa =(String) PAVANjComboBox36.getSelectedItem();
long c =Long.parseLong(PAVANjTextField71.getText());
int b =Integer.parseInt(PAVANjTextField69.getText());
String d =PAVANjTextField72.getText();
int e =Integer.parseInt(PAVANjTextField73.getText());
String query ="insert into PUBLICAVAILABLEBOOK values
( '"+aaa+"','"+b+"','"+c+"','"+d+"','"+e+"');";
stmt.executeUpdate(query);
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error to insert into book");
}
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String taa =(String) PAVANjComboBox35.getSelectedItem();
String query =" SELECT * FROM publicsid WHERE name ='" +taa+ "';" ;
ResultSet rs = stmt.executeQuery(query);
if (rs.next())
{
String dno =rs.getString("name");
String dNa =rs.getString("date");
String d =rs.getString("month") ;
String ds =rs.getString("year") ;
jTextField58.setText(dNa);
jTextField79.setText(d);
jTextField77.setText(ds);
jTextField82.setText(dno);
}
else
{
PavanOptionPane1.showMessageDialog(null,"No such records found");
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in loading sid table");
}
String rrimonth=(String)PAVANjComboBox24.getSelectedItem();
int rrm = 0 ;
if(rrimonth=="January")
{
rrm=1;
}
if(rrimonth=="Februry")
{
rrm=2;
}
if(rrimonth=="March")
{
rrm=3;
}
if(rrimonth=="April")
{
rrm=4;
}
if(rrimonth=="May")
{
rrm=5;
}
if(rrimonth=="June")
{
rrm=6;
}
if(rrimonth=="July")
{
rrm=7;
}
if(rrimonth=="August")
{
rrm=8;
}
if(rrimonth=="September")
{
rrm=9;
}
if(rrimonth=="October")
{
rrm=10;
}
if(rrimonth=="November")
{
rrm=11;
}
if(rrimonth=="December")
{
rrm=12;
}
int iida=Integer.parseInt(jTextField58.getText());
int iima=Integer.parseInt(jTextField79.getText());
int iiya=Integer.parseInt(jTextField77.getText());
String rrd=(String)(PAVANjComboBox23.getSelectedItem());
String RRY=(String)(PAVANjComboBox25.getSelectedItem());
jTextField80.setText(rrd);
jTextField81.setText(RRY);
int rrrda=Integer.parseInt(jTextField80.getText());
int rrrya=Integer.parseInt(jTextField81.getText());

String id = (String) (iiya+"-"+iima+"-"+iida) ;


String rd = (String) (rrrya+"-"+rrm+"-"+rrrda) ;

int dfa =0;


int pavan =0;

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/MENAGERIE","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT dayofyear(' "+rd+"') - dayofyear(' "+id+ "') as pavan ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
dfa = rs.getInt("pavan");
pavan = dfa;
if (dfa>=0)
{
jLabel1.setText(""+dfa);
}
else
{
dfa=dfa+365;
jLabel1.setText(""+dfa);
}
}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in date difference ");
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String a =(String) PAVANjComboBox35.getSelectedItem();
long b =Long.parseLong(PAVANjTextField70.getText());
String c =(String) PAVANjComboBox36.getSelectedItem();
int d =Integer.parseInt(PAVANjTextField69.getText());
int ea =Integer.parseInt(PAVANjTextField71.getText());
String f =PAVANjTextField72.getText();
int g =Integer.parseInt(PAVANjTextField73.getText());
String pdate =PAVANjTextField78.getText();
String query ="insert into publicissuedbook values
( '"+a+"','"+b+"','"+c+"','"+d+"','"+ea+"','"+f+"','"+g+"','"+pdate+"');";
stmt.executeUpdate(query);
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error ");
}
}
}

if(pavan >=0)
{
if((dfa>(-1))&&(dfa<11))
{
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book");
}
if((dfa>10)&&(dfa<16))
{
int late=dfa-10;
fine=20;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 30 Rs.");
}
if((dfa>15)&&(dfa<21))
{ int late=dfa-10;
fine=30;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 50 Rs.");
}
if((dfa>20)&&(dfa<31))
{ int late=dfa-10;
fine=50;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 80 Rs.");
}
if((dfa>30)&&(dfa<61))
{ int late=dfa-10;
fine=80;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you
have Returned Book "+late+" Days late,You have been fined 100 Rs.");
}
if((dfa>60)&&(dfa<111))
{int late=dfa-10;
fine=100;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 120 Rs.");
}
if((dfa>110)&&(dfa<211))
{ int late=dfa-10;
fine=120;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 150 Rs.");
}
if((dfa>210)&&(dfa<366))
{ int late=dfa-10;
fine=150;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 200 Rs.");
}
if(dfa>365)
{ int late=dfa-10;
fine=200;
PavanOptionPane1.showMessageDialog(null,"Thanks for Returning the Book,But As you have
Returned Book "+late+" Days late,You have been fined 250 Rs.} }
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String c =jTextField82.getText();
String query ="delete from publicsid where name = '"+c+"';";
stmt.executeUpdate(query);

}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
PAVANjComboBox35.removeItem(q);
PAVANjComboBox36.removeItem(qa);
jTextField58.setText("");
jTextField79.setText("");
jTextField77.setText("");
jTextField81.setText("");
PAVANjTextField78.setText("");
jTextField80.setText("");
PAVANjTextField70.setText("");
PAVANjTextField69.setText("");
PAVANjTextField71.setText("");
PAVANjTextField72.setText("");
PAVANjTextField73.setText("");
}

private void PAVANjButton48ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanpublicreturnbook.setVisible(false);
Pavanpubliclibrary.setVisible(true);
PAVANjTextField70.setText("");
PAVANjTextField69.setText("");
PAVANjTextField71.setText("");
PAVANjTextField72.setText("");
PAVANjTextField73.setText("");
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM issuedbook ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String a =rs.getString(1);
String b =rs.getString(2);
String c =rs.getString(3);
String d =rs.getString(4);
String e =rs.getString(5);
String f =rs.getString(6);
String g =rs.getString(7);
String i =rs.getString(8);
String j =rs.getString(9);
String k =rs.getString(10);
String ka =rs.getString(11);
registration.addRow(new Object[] { a,b,c, d,e,f,g,i,j,k,ka});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
Pavanschool.setVisible(false);
}
}

private void PavanjRadioButton16ActionPerformed(java.awt.event.ActionEvent evt) {


PavanRegistration.setVisible(true);
Pavanregisteredstudent.setVisible(false);
}
private void PavanjRadioButton17ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanissuebook.setVisible(true);
Pavanregisteredstudent.setVisible(false);
PavanjTextField21.setText("");
PavanjTextField24.setText("");
PavanjTextField25.setText("");
PavanjTextField23.setText("");
jTextField26.setText("");
PavanjTextField27.setText("");
jTextField28.setText("");
PavanjTextField29.setText("");
}

try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM publicavailablebook ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String pavan1 =rs.getString(1);
String pavan2 =rs.getString(2);
String pavan3 =rs.getString(3);
String pavan4 =rs.getString(4);
String pavan5 =rs.getString(5);

dept.addRow(new Object[] {pavan1,pavan2,pavan3,pavan4,pavan5});


}
rs.close();
stmt.close();
con.close();
}catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error in bringing data from mysql");
}
Pavanpubliclibrary.setVisible(false);
Pavanpublicavailablebook.setVisible(true);

}
private void PavanjRadioButton24ActionPerformed(java.awt.event.ActionEvent evt) {
int ps=PAVANjTable8.getRowCount();
while(ps>0)
{ DefaultTableModel table =(DefaultTableModel)PAVANjTable8.getModel();
table.removeRow(0);
}
Pavanpubliclibrary.setVisible(false);
Pavanpublicissuebook.setVisible(true);
PAVANjTextField51.setText("");
PAVANjTextField53.setText("");
PAVANjTextField55.setText("");
PAVANjTextField56.setText("");
}
private void PavanjRadioButton25ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpubliclibrary.setVisible(false);
Pavanpublicreturnbook.setVisible(true);
}
private void PavanjRadioButton21ActionPerformed(java.awt.event.ActionEvent evt) {
int pa=PAVANjTable11.getRowCount();
while(pa>0)
{
DefaultTableModel table =(DefaultTableModel)PAVANjTable11.getModel();
table.removeRow(0);
}
Pavanpubliclibrary.setVisible(false);
Pavanpublicissuedbooks.setVisible(true);
DefaultTableModel dept =(DefaultTableModel) PAVANjTable11.getModel();
try
{
Class.forName("java.sql.Driver");
Connection con =DriverManager.getConnection
("jdbc:mysql://localhost/LIBRARY_MANAGMENT","root","SJSSS");
Statement stmt = con.createStatement();
String query ="SELECT * FROM publicissuedbook ;";
ResultSet rs = stmt.executeQuery (query);
while (rs.next())
{
String dno =rs.getString(1);
String dName =rs.getString(2);
String d =rs.getString(3);
String d1 =rs.getString(4);
String d2=rs.getString(5);
String d3 =rs.getString(6);
String d4=rs.getString(7);
String d5=rs.getString(8);
dept.addRow(new Object[] { dno,dName, d,d1,d2,d3,d4,d5});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
PavanOptionPane1.showMessageDialog(null,"error");
}
}
private void PavanjRadioButton27ActionPerformed(java.awt.event.ActionEvent evt) {
Pavanpublicregistration.setVisible(true);
Pavanpublicregisteredmembers.setVisible(false);
PavanjTextField43.setText("");
PavanjTextArea2.setText("");
PavanjTextField44.setText("");
}

private void PavanjRadioButton26ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanpublicregisteredmembers.setVisible(false);
Pavanpublicissuebook.setVisible(true);
PAVANjTextField51.setText("");
PAVANjTextField53.setText("");
jTextField54.setText("");
PAVANjTextField55.setText("");
PAVANjTextField56.setText("");
}

private void PAVANjRadioButton32ActionPerformed(java.awt.event.ActionEvent evt) {


Pavanpublicavailablebook.setVisible(false);
Pavanpublicadddnewbook.setVisible(true);
}

PavanOptionPane1.showMessageDialog(null,"Thanks for using Library Managment");


System.exit(0);
5.3 Output Forms

1.

2.
3.

4.
5.4 Reports

After we have completed the project we are sure the problems in the existing
system would overcome. The “LIBRARY MANAGEMENT SYSTEM” process made
computerized to reduce human errors and to increase the efficiency. The main
focus of this project is to lessen human efforts. The maintenance of the records is
made efficient, as all the records are stored in the ACCESS database, through
which data can be retrieved easily. The navigation control is provided in all the
forms to navigate through the large amount of records. If the numbers of records
are very large then user has to just type in the search string and user gets the
results immediately. The editing is also made simpler. The user has to just type in
the required field and press the update button to update the desired field.
 

The Books and Students are given a particular unique id no.  So that they can be
accessed correctly and without errors. Our main aim of the project is to get the
correct information about a particular student and books available in the library.

The problems, which existed in the earlier system, have been removed to a large
extent. And it is expected that this project will go a long way in satisfying users
requirements. The computerization of the Library Management will not only
improves the efficiency but will also reduce human stress thereby indirectly
improving human recourses.
BIBLIOGRAPHY

Websites:

 www.programmer2programmer.net

 www.wikipedia.org

 www.php.net

 www.w3schools.com

 www.tutorialspoint.com

 www.tutorialsteacher.com

 www.mysqltutorial.org

Books

1. Deitel (2004): "Java How to Program", Fifth Edition. Pearson Education, 2004.


2. R. Ramakrishnan (1998): “Database Management Systems”, McGraw Hill, International
Editions, 1998.
3. S. Harrington (1987): “Computer Graphics - a Programming approach”, 2nd ed.
McGrawhill, New York, 1987.
4. Jeffrey R. Shapiro (2002): “The Complete Reference Visual Basic .NET”, Tata Mcgraw Hill,
2002.
5. Chris Ullman and Kauffman (2003): “Beg ASP.NET1.1 with VC#.NET 2003”, Wiley Dream
tech., 2003.

You might also like