You are on page 1of 60

Project Title Library Management System

1.INTERDUCTION

1.1 MOTIVATION
In today’s world most of the things are automated like bank operations and college
management process etc. In the digital world the library process still maintain the
bookkeeping manual. It is providing through library card for issuing books and maintains the
record in books. It’s a time consuming for the librarian as well as library users. This gives us
a chance to develop software for library management.
1.2 ABSTRCTION/PROBLEM DESCRIPTION
Today most of the library is using either manual system for tracking the day to day activity or
they are using spread sheet like MS Excel application to manage the day to day activity. In
this proposed Library Management System it will run in system mode and user can check the
book availability, they can search the books, library staff can issue, receive book, and
management can check the report. System will store historical data. Management can anytime
view the total book status, library card status.
eLibrary is a complete library solution make this complicated function look much easier. The
software is user-friendly, with user-definable preferences like Book category and extensive
and search facilities, huge library of periodical data to analyze the trend of issue and receive
of books.
1.3 Scope and Features
The Library Management System is designed & developed for a receipt and issuance of
books in the library along with the student’s details. The books received in the library are
entered in Books Entry form and the new student is entered in the student entry form. When
the student wants to get the desired book the same is issued on the availability basis to the
student. The issuance and due date for the returning of the book is also entered into the Book
Issue form under third menu Book Issue. The student has to pay the fine if any on the basis of
no. of days delayed deposit of the book in the library.
Any education institute can make use of it for providing information about author, content of
the available books. It can be used in offices and modifications can be easily done according
to requirements

Vikarama Simhapur University Page 1


Project Title Library Management System

From an end-user perspective, the Library Management System Project consists of two
functional elements: Master and Transaction Module.

1.4 REQUIREMENT SPECIFICATION


To be used efficiently, all computer software needs certain hardware components or
other resources to be present on a computer. These prerequisites are known as system
requirements
Software Requirements:
Language : JDK (1.7.0)
Frontend : Swings
Backend : MySql
IDE : Netbeans 8.0
Operating System : windows XP

Hardware Requirements:
Processor : Pentium IV
Hard Disk : 160GB
RAM : 2GB

Vikarama Simhapur University Page 2


Project Title Library Management System

SYSTEM ANALYSIS
2.1 Existing System:
The current system is manual where the librarian maintains the records of books in
bookkeeping form. He provides the cards to the each student. User maintains the transaction
entries.
Some of the problems being faced in manual system are as follows:
1. Fast report generation is not possible.
2. Manual process of issuing books and maintaining the records.
3. It is time taking procedure.

2.2 Proposed System:


Proposed system provides with following solutions:

1. It provides "better and efficient" service to members.

2. It provides good access to books by id and name.

3. It maintains the transactions of book issues process and receving.

Vikarama Simhapur University Page 3


Project Title Library Management System

FEASIBILITY ANALYSIS
Whatever we think need not be feasible. It is wise to think about the feasibility of any
problem we undertake. Feasibility is the study of impact, which happens in the organization
by the development of a system. The impact can be either positive or negative. When the
positives nominate the negatives, then the system is considered feasible. Here the feasibility
study can be performed in two ways such as technical feasibility and economical feasibility.
3.1 TECHNICAL FEASIBILITY
We can says that it is technically feasible, since there will not be much difficulty in getting
required resources for the development and maintain the system as well. All the resources
needed for the development of the software as well as the maintenance of the same is
available in the organization here we are utilizing the resources which are available already.

3.2 ECONOMICALLY FEASIBILITY


Development of this application is highly economically feasible. The organization needed not
spend much money for the development of the system already available. The only thing is to
be done making an environment for the development with an effective supervision. If we are
doing so, we can attain the maximum usability of the corresponding resources. Even after the
development, the organization will not be in a condition to invest more in the organization.
Therefore, the system is economically feasible.

SOFTWARE DESCRIPTION

4.1 PHP

PHP: Hypertext Preprocessor, is a widely used, general-purpose scripting language that was
originally designed for web development, to produce dynamic web pages. It can be
embedded into HTML and generally runs on a web server, which needs to be configured to
process PHP code and create web page content from it. It can be deployed on most web
servers and on almost every operating system and platform free of charge.

PHP was originally created by Rasmus Lerdorf in 1995 and has been in continuous
development ever since. The main implementation of PHP is now produced by The PHP
Group and serves as the de facto standard for PHP as there is no formal specification.PHP is

Vikarama Simhapur University Page 4


Project Title Library Management System

free software released under the PHP License, which is incompatible with the GNU General
Public License (GPL) because of restrictions on the use of the term PHP

PHP has evolved to include a command line interface capability and can also be used in
standalone graphical applications.

USAGE

PHP is a general-purpose scripting language that is especially suited for web development.
PHP generally runs on a web server. Any PHP code in a requested file is executed by the PHP
runtime, usually to create dynamic web page content. It can also be used for command-line
scripting and client-side GUI applications. PHP can be deployed on most web servers, many
operating systems and platforms, and can be used with many relational database management
systems. It is available free of charge, and the PHP Group provides the complete source code
for users to build, customize and extend for their own use.

PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP
instructions and outputs another stream of data; most commonly the output will be HTML.
Since PHP 4, the PHP parser compiles input to produce byte code for processing by the Zend
Engine, giving improved performance over its interpreter predecessor

Originally designed to create dynamic web pages, PHP now focuses mainly on server-side
scripting, and it is similar to other server-side scripting languages that provide dynamic
content from a web server to a client, such as Microsoft's Active Server Pages, Sun
Microsystems' JavaServer Pages and mod_perl. PHP has also attracted the development of
many frameworks that provide building blocks and a design structure to promote rapid
application development (RAD). Some of these include CakePHP, Symfony, CodeIgniter,
and Zend Framework, offering features similar to other web application frameworks.

About HTML

HTML, which stands for Hyper Text Markup Language, is the predominant markup language
for web pages. It provides a means to create structured documents by denoting structural
semantics for text such as headings, paragraphs, lists etc as well as for links, quotes, and other
items. It allows images and objects to be embedded and can be used to create interactive
forms. It is written in the form of HTML elements consisting of "tags" surrounded by angle
brackets within the web page content. It can include or can load scripts in languages such as
JavaScript which affect the behavior of HTML processors like Web browsers; and Cascading
Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C,

Vikarama Simhapur University Page 5


Project Title Library Management System

maintainer of both HTML and CSS standards, encourages the use of CSS over explicit
presentational markup.

Hyper Text Markup Language(HTML) is the encoding scheme used to create and format a
web document. A user need not be an expert programmer to make use of HTML for creating
hypertext documents that can be put on the internet.

Most graphical e-mail clients allow the use of a subset of HTML (often ill-defined) to provide
formatting and semantic markup not available with plain text. This may include typographic
information like coloured headings, emphasized and quoted text, inline images and diagrams.
Many such clients include both a GUI editor for composing HTML e-mail messages and a
rendering engine for displaying them. Use of HTML in e-mail is controversial because of
compatibility issues, because it can help disguise phishing attacks, because it can confuse
spam filters and because the message size is larger than plain text.

NAMING CONVENTIONS

The most common filename extension for files containing HTML is .html. A common
abbreviation of this is .htm, which originated because some early operating systems and file
systems, such as DOS and FAT, limited file extensions to three letters.

HTML APPLICATION

An HTML Application is a Microsoft Windows application that uses HTML and Dynamic
HTML in a browser to provide the application's graphical interface. A regular HTML file is
confined to the security model of the web browser, communicating only to web servers and
manipulating only webpage objects and site cookies. An HTA runs as a fully trusted
application and therefore has more privileges, like creation/editing/removal of files and
Windows Registry entries. Because they operate outside the browser's security model, HTAs
cannot be executed via HTTP, but must be downloaded (just like an EXE file) and executed
from local file system

ABOUT JAVASCRIPT

JavaScript is an object-oriented scripting language used to enable programmatic access to


objects within both the client application and other applications. It is primarily used in the
form of client-side JavaScript, implemented as an integrated component of the web browser,
allowing the development of enhanced user interfaces and dynamic websites. JavaScript is a
dialect of the ECMAScript standard and is characterized as a dynamic, weakly typed,
prototype-based language with first-class functions. JavaScript was influenced by many
languages and was designed to look like Java, but to be easier for non-programmers to work
with.

PROTOTYPE-BASED

Vikarama Simhapur University Page 6


Project Title Library Management System

JavaScript uses prototypes instead of classes for inheritance. It is possible to simulate many
class-based features with prototypes in JavaScript.

Functions double as object constructors along with their typical role. Prefixing a function call
with new creates a new object and calls that function with its local this keyword bound to that
object for that invocation. The constructor's prototype property determines the object used for
the new object's internal prototype. JavaScript's built-in constructors, such as Array, also have
prototypes that can be modified.

Unlike many object-oriented languages, there is no distinction between a function definition


and a method definition. Rather, the distinction occurs during function calling; a function can
be called as a method. When a function is called as a method of an object, the function's local
this keyword is bound to that object for that invocation.

USAGE

The primary use of JavaScript is to write functions that are embedded in or included from
HTML pages and interact with the Document Object Model (DOM) of the page.

Because JavaScript code can run locally in a user's browser (rather than on a remote server) it
can respond to user actions quickly, making an application feel more responsive.
Furthermore, JavaScript code can detect user actions which HTML alone cannot, such as
individual keystrokes. Applications such as Gmail take advantage of this: much of the user-
interface logic is written in JavaScript, and JavaScript dispatches requests for information
(such as the content of an e-mail message) to the server. The wider trend of Ajax
programming similarly exploits this strength.

A JavaScript engine (also known as JavaScript interpreter or JavaScript implementation) is an


interpreter that interprets JavaScript source code and executes the script accordingly. The first
JavaScript engine was created by Brendan Eich at Netscape Communications Corporation,
for the Netscape Navigator web browser. A web browser is by far the most common host
environment for JavaScript. Web browsers typically use the public API to create "host
objects" responsible for reflecting the DOM into JavaScript.

4.4 MySQL:

Overview of the MySQL Database Management System

What is MySQL?

Vikarama Simhapur University Page 7


Project Title Library Management System

MySQL, the most popular Open Source SQL database management system, is
developed, distributed, and supported by Oracle Corporation.

The MySQL Web site (http://www.mysql.com/) provides the latest information


about MySQL software.

 MySQL is a database management system.

A database is a structured collection of data. It may be anything from a simple


shopping list to a picture gallery or the vast amounts of information in a corporate
network. To add, access, and process data stored in a computer database, you need a
database management system such as MySQL Server. Since computers are very
good at handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other applications.

 MySQL databases are relational


A relational database stores data in separate tables rather than putting all the data in
one big storeroom. The database structures are organized into physical files
optimized for speed. The logical model, with objects such as databases, tables,
views, rows, and columns, offers a flexible programming environment. You set up
rules governing the relationships between different data fields, such as one-to-one,
one-to-many, unique, required or optional, and “pointers” between different tables.
The database enforces these rules, so that with a well-designed database, your
application never sees inconsistent, duplicate, orphan, out-of-date, or missing data.

The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the
most common standardized language used to access databases. Depending on your
programming environment, you might enter SQL directly (for example, to generate
reports), embed SQL statements into code written in another language, or use a
language-specific API that hides the SQL syntax.

SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been
evolving since 1986 and several versions exist. In this manual, “SQL-92” refers to
the standard released in 1992, “SQL:1999” refers to the standard released in 1999,
and “SQL:2003” refers to the current version of the standard. We use the

Vikarama Simhapur University Page 8


Project Title Library Management System

phrase “the SQL standard” to mean the current version of the SQL Standard at any
time.

 MySQL software is Open Source.


Open Source means that it is possible for anyone to use and modify the software.
Anybody can download the MySQL software from the Internet and use it without
paying anything. If you wish, you may study the source code and change it to suit
your needs. The MySQL software uses the GPL (GNU General Public
License),http://www.fsf.org/licenses/, to define what you may and may not do with
the software in different situations. If you feel uncomfortable with the GPL or need
to embed MySQL code into a commercial application, you can buy a commercially
licensed version from us. See the MySQL Licensing Overview for more information
(http://www.mysql.com/company/legal/licensing/).

 The MySQL Database Server is very fast, reliable, scalable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server can run
comfortably on a desktop or laptop, alongside your other applications, web servers,
and so on, requiring little or no attention. If you dedicate an entire machine to
MySQL, you can adjust the settings to take advantage of all the memory, CPU
power, and I/O capacity available. MySQL can also scale up to clusters of machines,
networked together.

You can find a performance comparison of MySQL Server with other database
managers on our benchmark page.

MySQL Server was originally developed to handle large databases much faster than
existing solutions and has been successfully used in highly demanding production
environments for several years. Although under constant development, MySQL
Server today offers a rich and useful set of functions. Its connectivity, speed, and
security make MySQL Server highly suited for accessing databases on the Internet.

 MySQL Server works in client/server or embedded systems.


The MySQL Database Software is a client/server system that consists of a multi-
threaded SQL server that supports different backends, several different client
programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs).

Vikarama Simhapur University Page 9


Project Title Library Management System

We also provide MySQL Server as an embedded multi-threaded library that you can
link into your application to get a smaller, faster, easier-to-manage standalone
product.

 A large amount of contributed MySQL software is available.


MySQL Server has a practical set of features developed in close cooperation with
our users. It is very likely that your favorite application or language supports the
MySQL Database Server.

The official way to pronounce “MySQL” is “My Ess Que Ell” (not “my sequel”),
but we do not mind if you pronounce it as “my sequel” or in some other localized
way.

Internals and Portability

Written in C and C++.

Tested with a broad range of different compilers.

Works on many different platforms.

For portability, uses CMake in MySQL 5.5 and up. Previous series use GNU
Automake, Autoconf, and Libtool.

Tested with Purify (a commercial memory leakage detector) as well as with


Valgrind, a GPL tool (http://developer.kde.org/~sewardj/).

Uses multi-layered server design with independent modules.

Designed to be fully multi-threaded using kernel threads, to easily use multiple


CPUs if they are available.

Provides transactional and nontransactional storage engines.

Uses very fast B-tree disk tables (MyISAM) with index compression.

Designed to make it relatively easy to add other storage engines. This is useful if
you want to provide an SQL interface for an in-house database.

Uses a very fast thread-based memory allocation system.

Vikarama Simhapur University Page 10


Project Title Library Management System

Executes very fast joins using an optimized nested-loop join.

Implements in-memory hash tables, which are used as temporary tables.

Implements SQL functions using a highly optimized class library that should be as
fast as possible. Usually there is no memory allocation at all after query
initialization.

Provides the server as a separate program for use in a client/server networked


environment, and as a library that can be embedded (linked) into standalone
applications. Such applications can be used in isolation or in environments where no
network is available.

Data Types
Many data types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes
long, FLOAT, DOUBLE, CHAR, VARCHAR, BINARY,VARBINARY, TEXT, BL
OB, DATE, TIME, DATETIME, TIMESTAMP, YEAR, SET, ENUM, and
OpenGIS spatial types. SeeChapter 11, Data Types.

Fixed-length and variable-length string types.

Statements and Functions

Full operator and function support in the SELECT list and WHERE clause of
queries. For example:

mysql> SELECT CONCAT(first_name, ' ', last_name)

-> FROM citizen

-> WHERE income/dependents > 10000 AND age > 30;

Full support for SQL GROUP BY and ORDER BY clauses. Support for group
functions(COUNT(), AVG(), STD(),SUM(), MAX(), MIN(),
and GROUP_CONCAT()).

Support for LEFT OUTER JOIN and RIGHT OUTER JOIN with both standard
SQL and ODBC syntax.

Support for aliases on tables and columns as required by standard SQL.

Vikarama Simhapur University Page 11


Project Title Library Management System

Support for DELETE, INSERT, REPLACE, and UPDATE to return the number of
rows that were changed (affected), or to return the number of rows matched instead
by setting a flag when connecting to the server.

Support for MySQL-specific SHOW statements that retrieve information about


databases, storage engines, tables, and indexes. MySQL 5.0 adds support for
the INFORMATION_SCHEMA database, implemented according to standard SQL.

An EXPLAIN statement to show how the optimizer resolves a query.

Independence of function names from table or column names. For example, ABS is
a valid column name. The only restriction is that for a function call, no spaces are
permitted between the function name and the “(” that follows it.

You can refer to tables from different databases in the same statement.

Security

A privilege and password system that is very flexible and secure, and that enables
host-based verification.

Password security by encryption of all password traffic when you connect to a


server.

Scalability and Limits

Support for large databases. We use MySQL Server with databases that contain 50
million records. We also know of users who use MySQL Server with 200,000 tables
and about 5,000,000,000 rows.

Support for up to 64 indexes per table (32 before MySQL 4.1.2). Each index may
consist of 1 to 16 columns or parts of columns. The maximum index width is 767
bytes for InnoDB tables, or 1000 for MyISAM; before MySQL 4.1.2, the limit is
500 bytes. An index may use a prefix of a column for CHAR, VARCHAR, BLOB,
or TEXT column types.

Connectivity

Clients can connect to MySQL Server using several protocols:

Vikarama Simhapur University Page 12


Project Title Library Management System

Clients can connect using TCP/IP sockets on any platform.

On Windows systems in the NT family (NT, 2000, XP, 2003, or Vista), clients can
connect using named pipes if the server is started with the --enable-named-
pipe option. In MySQL 4.1 and higher, Windows servers also support shared-
memory connections if started with the --shared-memory option. Clients can
connect through shared memory by using the --protocol=memory option.

On Unix systems, clients can connect using Unix domain socket files.

MySQL client programs can be written in many languages. A client library written
in C is available for clients written in C or C++, or for any language that provides C
bindings.

APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available,
enabling MySQL clients to be written in many languages.

The Connector/ODBC (MyODBC) interface provides MySQL support for client


programs that use ODBC (Open Database Connectivity) connections. For example,
you can use MS Access to connect to your MySQL server. Clients can be run on
Windows or Unix. Connector/ODBC source is available. All ODBC 2.5 functions
are supported, as are many others.

The Connector/J interface provides MySQL support for Java client programs that
use JDBC connections. Clients can be run on Windows or Unix. Connector/J source
is available.

MySQL Connector/Net enables developers to easily create .NET applications that


require secure, high-performance data connectivity with MySQL. It implements the
required ADO.NET interfaces and integrates into ADO.NET aware tools.
Developers can build applications using their choice of .NET languages. MySQL
Connector/Net is a fully managed ADO.NET driver written in 100% pure C#.

Localization

The server can provide error messages to clients in many languages. Full support for
several different character sets, including latin1 (cp1252), german, big5, ujis, and

Vikarama Simhapur University Page 13


Project Title Library Management System

more. For example, the Scandinavian characters “å”, “ä” and “ö” are permitted in
table and column names. Unicode support is available as of MySQL 4.1.

All data is saved in the chosen character set.

Sorting and comparisons are done according to the chosen character set and
collation (using latin1 and Swedish collation by default). It is possible to change this
when the MySQL server is started. To see an example of very advanced sorting,
look at the Czech sorting code. MySQL Server supports many different character
sets that can be specified at compile time and runtime.

As of MySQL 4.1, the server time zone can be changed dynamically, and individual
clients can specify their own time zone.

Clients and Tools

MySQL includes several client and utility programs. These include both command-
line programs such asmysqldump and mysqladmin, and graphical programs such
as MySQL Workbench.

MySQL Server has built-in support for SQL statements to check, optimize, and
repair tables. These statements are available from the command line through
the mysqlcheck client. MySQL also includes myisamchk, a very fast command-
line utility for performing these operations on MyISAM tables.

MySQL programs can be invoked with the --help or -? option to obtain online
assistance.

Installation of MySQL Server

Step1:click on setup button

Vikarama Simhapur University Page 14


Project Title Library Management System

Step2: perform a typical installation and click on next button

Step3: click on install button

Vikarama Simhapur University Page 15


Project Title Library Management System

Step4: click on next button

Step5: click on next button

Vikarama Simhapur University Page 16


Project Title Library Management System

Step6: click on finish button

Step7Select the detail configuration

Vikarama Simhapur University Page 17


Project Title Library Management System

Step8: I was installing it on my local machine where other applications & tools
are running I decided to opt "developer machine" but it is recommended that you
use a Dedicated MySQL Server Machine for your MySQL database, if this is not
an option then select "Server Machine".

Vikarama Simhapur University Page 18


Project Title Library Management System

Step9: It have checked "Multifunctional databases . I am selecting the


multifunctional database. And click on the next button.

Step 10: Select the drive where the database files will be stored.

Step 11: It is recommended that you leave the default port 3306 in place,
however Event Sentry will also work with non-standard ports if necessary.

Vikarama Simhapur University Page 19


Project Title Library Management System

Step 12: Specify a secure root password, you may want to check the box Enable
root access from remote machines if you plan on administering your MySQL
server from your workstation or other servers. And click on the next button

Step 12: click on the finish button

Vikarama Simhapur University Page 20


Project Title Library Management System

Vikarama Simhapur University Page 21


Project Title Library Management System

SYSTEM DESIGN

5.1 SYSTEM ARCHITECUTRE

System
request Datab
User response ase

5.2 ER DIAGRAM:

5.3 DATA DICTINARY:

Vikarama Simhapur University Page 22


Project Title Library Management System

Lib_book_master

Column Type Default Nullable

book_id Int(11) No

book_title Varchar(50) Yes

Book_publisher Varchar(50) Yes

Book_publisher_year Varchar(12) Yes

Book_keyword Varchar(100) Yes

Book_status Varchar(20) Yes

Lib_User

Column Type Default Nullable

user_name Varchar(30) Yes

user_password Varchar(30) Yes

user_type Varchar(30) Yes

user_active Varchar(5) Yes

user_id Int(11) No

Lib_member_master

Cloumn Type Default Nullable

Mem_id Int(11) No

Mem_name Varchar(50) Yes

Mem_address Varchar(250) Yes

Mem_emial_id Varchar(50) Yes

Mem_mobile_no Varchar(20) Yes

Mem_registerd_date Date Yes

Mem_active Varchar(3) Yes

Lib_book_category

Cloumn Type Default Nullable

Book_category Varchar(100) No

Vikarama Simhapur University Page 23


Project Title Library Management System

Vikarama Simhapur University Page 24


Project Title Library Management System

5.4 DFD Diagrams:

Vikarama Simhapur University Page 25


Project Title Library Management System

5.5 UML DIAGRAMS


Vikarama Simhapur University Page 26
Project Title Library Management System

Use Cases:
Use cases are used during requirements elicitation and analysis to represent the
functionality of the system. Use case focus on the behaviour of the system from an external
point of view. The identification of actors and use cases results in the definition of the
boundary of the system , which is , in differentiating the tasks accomplished by the system
and the tasks accomplished by its environment. The actors are outside the boundary of the
system , where as the use cases are inside the boundary of the system.

5.6 Class Diagram


Class Diagrams are used to describe the structure of the system. Classes are
abstractions that specify the common structure and behaviour of a set of objects. Objects are
instances of classes that are created , modified and destroyed during the execution of a
system. An object has state that includes the values of its attributes and links with other
objects.

Vikarama Simhapur University Page 27


Project Title Library Management System

The class diagram is used to refine the use cases diagrams and define a detailed
design of the system. The class diagram classifies the actors defined in the use case diagram
into a set of interrelated classes. The relationship or association between the classes can be
either an "is-a" or "has-a" relationship. Each class in the class diagram may be capable of
providing certain functionalities. These functionalities provided by the class are termed
"methods" of the classes. Apart from this , each class may have certain "attributes" that
uniquely indentify the class. In the class diagram these classes are represented with boxes
which contain three parts.

5.7 Sequence Diagram


Sequence diagrams are used to formalize the dynamic behaviour of the system and to
visualize the communication among the objects. They are useful for identifying the additional
objects that participate in the use case. Sequence diagram represent the objects participating
in the interaction horizontally and time vertically.
Sequence diagrams typically show a user or actor and the objects and the components they
interact with the execution of the use case. Each column represent an objects that participate
in the interaction. Message is shown by solid arrows. Labels on the solid arrows represent the
message names. Activations are depicted by vertical rectangles. The actor who initiates the
interaction is shown in the left most columns . The messages coming from the actor represent
the interactions described in the use case diagrams.

Vikarama Simhapur University Page 28


Project Title Library Management System

5.8 Collaboration Diagram:

A collaboration diagram describes interactions among objects in terms of sequenced


messages. Collaboration diagrams represent a combination of information taken from class,
sequence, and use case diagrams describing both the static structure and dynamic behavior of
a system.

Book entry
User Book
Book search

receivebook Issue book

Transaction

Vikarama Simhapur University Page 29


Project Title Library Management System

5.9 Activity Diagram

An Activity diagram describes the behaviour of the system in terms of activities.


Activities are modeling elements that represent the execution of set of operations. The
completion of these operations triggers a transition to another activity. Activity diagrams
similar to flowchart diagrams in that they can be used to represent control flow and data
flow . Activities are represented by rounded rectangles and arrows are represented transition
between activities . Think bars represent the synchronization of the control flow.
Activity Diagram:

Vikarama Simhapur University Page 30


Project Title Library Management System

Vikarama Simhapur University Page 31


Project Title Library Management System

IMPLEMENTATION
6.1 MODULES
1. Admin module
2. Book Module
3. Member Module
4. Transaction module

6.2 MODULES DESCRIPTION

Admin module
Master and security module includes user security management and login security.

Login – Check the user by user name and password, All user needs to enter user name and
password to access the system, system check the user name and password and give access the
system resource only valid user.

Main Screen – It display available options, menus and toolbars to the logged user. System
display option as per user rights. It also show the name of user currently logged in.

Book Module:
This module provides the information about the books. In this we provide the entries of the
books into the database. Using search option we get the books details. It has the functionality
of book status means issued or available.
Member Module:
In member module we enter the member details as well as we can search for the member
information. Here we provide the status of the member he is active member or non active
member.

Transaction module:

Transaction module includes issuing, receiving book and transaction report.

Issuing Book – This form used to issue book to the member. In this screen user selects book
id, and library card id, system display the book and card history. If book is already issued it

Vikarama Simhapur University Page 32


Project Title Library Management System

display message and details of last issued details. Same way system display card history for
the library card no, if book already available it shows the message. If book is available and
there is no book pending for received then book is issued and system saves the details.
System also has powerful search facility to find the book and member id.

6.4 Screen Shots

Home Page:

Vikarama Simhapur University Page 33


Project Title Library Management System

Registration Page:

Login Screen:

Vikarama Simhapur University Page 34


Project Title Library Management System

IssueBooks:

ReturnBook:

Vikarama Simhapur University Page 35


Project Title Library Management System

Issued Books:

RequestForBooks:

Vikarama Simhapur University Page 36


Project Title Library Management System

DashBoard:

MemberList:

Vikarama Simhapur University Page 37


Project Title Library Management System

View BookList:

SAMPLE CODE

Index.php
Vikarama Simhapur University Page 38
Project Title Library Management System

<?php

header("location: controller/home.php?activity=dashboard");

?>

Home.php

<?php
session_start();
include("dbConfig.php");
error_reporting(0);

?>

<!DOCTYPE html>
<html>
<head>
<title>Online Library Management</title>
<link rel="stylesheet" type="text/css" href="../css/home.css">
<link rel="stylesheet" type="text/css" href="../css/title.css">
</head>
<body>
<div class="container">
<div class="header">
<?php include("header.php"); ?>
</div>

<div class="navigation">
<?php include("navigation.php"); ?>
</div>

<div class="content">
<?php
//ACTIVITY PERFORM...

$activity = $_REQUEST['activity'];

switch ($activity) {
case 'dashboard':
include("dashboard.php");
break;

case 'search':
include("search.php");
break;

case 'adminLogin':
Vikarama Simhapur University Page 39
Project Title Library Management System

include("adminLogin.php ");
break;

case 'studentLogin':
include("studentLogin.php");
break;

case 'facultyLogin':
include("facultyLogin.php");
break;

case 'register':
include("register.php");
break;

case 'userDashboard':
include("userDashboard.php");
break;

case 'issueBooks':
include("issueBooks.php");
break;

case 'returnBooks':
include("returnBooks.php");
break;

case 'issuedBooks':
include("issuedBooks.php");
break;

case 'returnedBooks':
include("returnedBooks.php");
break;

case 'forgetpwd':
include("forgetpwd.php");
break;

default:
# code...
break;
}

?>

<?php
//ADMIN LOGIN...

if(isset($_REQUEST['adminLoginBtn'])){
Vikarama Simhapur University Page 40
Project Title Library Management System

$username= $_REQUEST['username'];
$pwd= $_REQUEST['pwd'];

if(!empty($username) && !empty($pwd)){

$query = mysql_query("SELECT
id,username,pwd FROM admin WHERE username = '$username'");
$result = mysql_fetch_assoc($query);

if($username ==
$result['username'] && $pwd == $result['pwd']){

$_SESSION['username']
= $result['username'];
$_SESSION['uid'] =
$result['id'];

header("location:
admin/adminPage.php?activity=adminDashboard");
}
else{

include("adminLogin.php");
$errorMsg = "Invalid
User....";
}
}
else{
include("adminLogin.php");
$errorMsg = "Enter in empty field...";
}

?>

<?php
//STUDENT LOGIN...

if(isset($_REQUEST['studentLoginBtn'])){

$username=
$_REQUEST['username'];

Vikarama Simhapur University Page 41


Project Title Library Management System

$pwd= $_REQUEST['pwd'];

if(!empty($username) && !
empty($pwd)){

$query =
mysql_query("SELECT id,username,pwd FROM members
WHERE position = 'Student' && username = '$username' &&
pwd = '$pwd'");
$result =
mysql_fetch_assoc($query);

if($username ==
$result['username'] && $pwd == $result['pwd']){

$_SESSION['username'] = $username;
$_SESSION['uid']
= $result['id'];

header("location:
members/userPage.php?activity=viewProfile");
}
else{

Vikarama Simhapur University Page 42


Project Title Library Management System

include("studentLogin.php");
$errorMsg =
"Invalid User....";
}
}
else{

include("studentLogin.php");
$errorMsg = "Enter in
empty field...";
}

?>

<?php
//FACULTY LOGIN...

if(isset($_REQUEST['facultyLoginBtn'])){

Vikarama Simhapur University Page 43


Project Title Library Management System

$username=
$_REQUEST['username'];
$pwd= $_REQUEST['pwd'];

if(!empty($username) && !
empty($pwd)){

$query =
mysql_query("SELECT id,username,pwd FROM members
WHERE position = 'Faculty' && username = '$username' &&
pwd = '$pwd'");
$result =
mysql_fetch_assoc($query);

if($username ==
$result['username'] && $pwd == $result['pwd']){

$_SESSION['username'] = $username;

$_SESSION['uid'] =
$result['id'];

header("location:
members/userPage.php?activity=viewProfile");

else{

include("facultyLogin.php");

Vikarama Simhapur University Page 44


Project Title Library Management System

$errorMsg = "Invalid
User....";

else{

include("facultyLogin.php");

$errorMsg = "Enter in empty field...";

?>

<?php

//ADD MEMBER...

$query = "Select Max(id) From members";

$returnD = mysql_query($query);

$result = mysql_fetch_assoc($returnD);

$maxRows = $result['Max(id)'];

if(empty($maxRows)){

$lastRow = $maxRows = 1;

}else{

$lastRow = $maxRows + 1 ;

if(isset($_REQUEST['addMemberBtn'])){

Vikarama Simhapur University Page 45


Project Title Library Management System

$memberId = $_REQUEST['memberId'];

$firstName = $_REQUEST['firstName'];

$lastName = $_REQUEST['lastName'];

$username = $_REQUEST['username'];

$pwd = $_REQUEST['pwd'];

$position = $_REQUEST['position'];

$mobile = $_REQUEST['mobile'];

$email = $_REQUEST['email'];

$fnm = $_FILES['fnm'];

$actualFileName = $fnm['name'];

$tmpName = $fnm['tmp_name'];

//$type = $fnm['type'];

//$size = $fnm['size'];

//$error = $fnm['error'];

$targetLocation = "members/pic/
$actualFileName";

if(!empty($memberId) && !empty($firstName) && !empty($lastName)


&& !empty($username) && !empty($pwd) && !empty($mobile)){

$usernameExists = mysql_fetch_assoc(mysql_query("SELECT
username FROM members WHERE username = '$username'"));

if($usernameExists['username'] != $username){

Vikarama Simhapur University Page 46


Project Title Library Management System

$mobileExists = mysql_fetch_assoc(mysql_query("SELECT
mobile FROM members WHERE mobile = '$mobile'"));

if($mobileExists['mobile'] != $mobile){

$emailExists = mysql_fetch_assoc(mysql_query("SELECT
email FROM members WHERE email = '$email'"));

if($emailExists['email'] != $email){

move_uploaded_file($tmpName, $targetLocation);

$query = "Insert Into


members(id,firstName,lastName,username,pwd,position,mobile,email,pic)
Values('$memberId','$firstName','$lastName','$username','$pwd','$position','$mobile','
$email','$actualFileName')";

$res = mysql_query($query);

if(!empty($res)){

$errorMsg = "Member Sucessfully Added.";

$query = "Select Max(id) From members";

$returnD = mysql_query($query);

$result = mysql_fetch_assoc($returnD);

$maxRows = $result['Max(id)'];

if(empty($maxRows)){

$lastRow = $maxRows = 1;

}else{
Vikarama Simhapur University Page 47
Project Title Library Management System

$lastRow = $maxRows + 1 ;

else{

$errorMsg = "Email ID already exists. ";

else{

$errorMsg = "Mobile number already exists. ";

else{

$errorMsg = "Username already exists.Choose another.";

else{

$errorMsg = "Please! Enter in Empty Field.";

include("register.php");

?>

<?php

Vikarama Simhapur University Page 48


Project Title Library Management System

//SEARCH BOOK OR STUDENT OR FACULTY USING THEIR NAME...

$searchList = $_REQUEST['searchList'];//SESSION['searchListValue'];

//echo $searchList;

if(isset($searchList)){

if($searchList == 'bookName'){

$searchField = $_REQUEST['searchField'];

if($searchField){

$query = "SELECT bookId,title,author,price,available FROM


books Where title LIKE '%$searchField%'";

$returnD = mysql_query($query);

$returnD1 = mysql_query($query);

$result = mysql_fetch_assoc($returnD);

if(empty($result)){

$errorMsg = "Invalid Book Name...";

else{

$errorMsg = "Field can't be Empty...";

Vikarama Simhapur University Page 49


Project Title Library Management System

elseif($searchList == 'authorName'){

$searchField = $_REQUEST['searchField'];

if(!empty($searchField)){

$query = "SELECT bookId,title,author,price,available FROM


books Where author LIKE '%$searchField%'";

$returnD = mysql_query($query);

$returnD1 = mysql_query($query);

$result = mysql_fetch_assoc($returnD);

if(empty($result)){

$errorMsg = "Invalid Author Name...";

else{

$errorMsg = "Field can't be Empty...";

elseif($searchList == 'bookId'){

$searchField = $_REQUEST['searchField'];

if(!empty($searchField)){

Vikarama Simhapur University Page 50


Project Title Library Management System

$query = "SELECT bookId,title,author,price,available FROM


books Where bookId = '$searchField'";

$returnD = mysql_query($query);

$returnD1 = mysql_query($query);

$result = mysql_fetch_assoc($returnD);

if(empty($result)){

$errorMsg = "Invalid Book-ID...";

else{

$errorMsg = "Field can't be Empty...";

include("search.php");
}
?>

<?php

//FORGET PASSWORD...

if(isset($_REQUEST['pwdSaveBtn'])){

$request = $_REQUEST['request'];

Vikarama Simhapur University Page 51


Project Title Library Management System

if($request == "admin"){

$regEmail = $_REQUEST['regEmail'];

$query = mysql_query("SELECT
email FROM admin WHERE email = '$regEmail'");

$result = mysql_fetch_assoc($query);

if($regEmail == $result['email']){

$newP = $_REQUEST['newP'];

$confirmP =
$_REQUEST['confirmP'];

if($newP == $confirmP){

$query =
mysql_query("UPDATE admin SET pwd = '$newP' WHERE email = '$regEmail'");

if(!empty($query)){

header("location:
home.php?activity=adminLogin");

//$errorMsg =
"Password successfully changed.";

else{

//header("location:
index.php?activity=forgetpwd");

Vikarama Simhapur University Page 52


Project Title Library Management System

$errorMsg = "Password
must be same.";

else{

//header("location: index.php?
activity=forgetpwd");

$errorMsg = "Please ! Enter


authorised's user email.";

else if($request == "user"){

$regEmail =
$_REQUEST['regEmail'];

$query = mysql_query("SELECT
email,position FROM members WHERE email = '$regEmail'");

$result = mysql_fetch_assoc($query);

if($regEmail == $result['email']){

$newP =
$_REQUEST['newP'];

$confirmP =
$_REQUEST['confirmP'];

if($newP == $confirmP){

Vikarama Simhapur University Page 53


Project Title Library Management System

$query =
mysql_query("UPDATE members SET pwd = '$newP' WHERE email = '$regEmail'");

if(!empty($query)){

if($result['position'] == 'Student')

//$errorMsg = "Password successfully changed."; header("location:


home.php?activity=studentLogin");

else
if($result['position'] == 'Faculty')

header("location: home.php?activity=facultyLogin");

else{

//header("location:
index.php?activity=forgetpwd");

$errorMsg = "Password
must be same.";

else{

//header("location: index.php?
activity=forgetpwd");

$errorMsg = "Please ! Enter


authorised's user email.";

Vikarama Simhapur University Page 54


Project Title Library Management System

include("forgetpwd.php");

?>

<?php

if(isset($errorMsg)){

?>
<div class="errorMsg"><?php echo $errorMsg; ?></div>
<?php

?>

</div>

<div class="footer">

<?php include("footer.php"); ?>

</div>

</div>

</body>

</html>

Vikarama Simhapur University Page 55


Project Title Library Management System

TESTING
7.1 TEST PLAN

Testing process starts with a test plan. This plan identifies all the testing related
activities that must be performed and specifies the schedules , allocates the resources , and
specified guidelines for testing . During the testing of the unit the specified test cases are
executed and the actual result compared with expected output. The final output of the testing
phase is the test report and the error report.

Test Data:
Here all test cases that are used for the system testing are specified. The goal is to test
the different functional requirements specified in Software Requirements Specifications
(SRS) document.

Unit Testing:
Each individual module has been tested against the requirement with some test data.

Test Report:
The module is working properly provided the user has to enter information. All data
entry forms have tested with specified test cases and all data entry forms are working
properly.

Error Report:
If the user does not enter data in specified order then the user will be prompted with
error messages. Error handling was done to handle the expected and unexpected errors.

Vikarama Simhapur University Page 56


Project Title Library Management System

7.2 TESTCASE DESIGN

Test cases can be divided in to two types. First one is Positive test cases and second
one is negative test cases. In positive test cases are conducted by the developer intention
is to get the output. In negative test cases are conducted by the developer intention is to
don’t get the output.

Test cases
Test cases can be divided in to two types. First one is Positive test cases and second one
is negative test cases. In positive test cases are conducted by the developer intention is to get
the output. In negative test cases are conducted by the developer intention is to don’t get the
output.

+VE TEST CASES

S .No Test case Actual value Expected value Result


Description

1 User Login Enter Correct Loginid , Enter All user True


Password Information Should be
Valid

2 Enter LoginId and Enter Correct LoginID LoginID and Password True
Password and Password Should be valid

3 Enter book details Enter Book Name, Enter All Information True
Author, Publisher Should be Valid

Category and Search


Key

4 Issue Book Issue the book by It should show the True


valid user id and book availability of the book
id

5 Receive Book Receive the book by It should show the True


providing valid member details
member id

Vikarama Simhapur University Page 57


Project Title Library Management System

Conclusion and future enhancement

This project was developed to fulfill user and business requirement; however there are lots of
scopes to improve the performance of the Library Management System in the area of user
interface, database performance, and query processing time. Etc.

So there are many things for future enhancement of this project. The future enhancements
that are possible in the project are as follows.

 Linking and integration of any legacy system for accounting.


 Integration with bank database through Web Services
 Connection to third-party OLAP applications
 Implement Bar code reader
 Web interface for members
 In the area of data security and system security.
 Provide more online tips and help.
 To optimize the query which is embedded in the system.

Vikarama Simhapur University Page 58


Project Title Library Management System

Bibliography

Websites

Vikarama Simhapur University Page 59


Project Title Library Management System

Vikarama Simhapur University Page 60

You might also like