"Introduction of Project": Library Management System

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

Library Management System

“Introduction of Project”
LMS is a Library Management system for managing books in a multi-floored
High School library in Atlanta which is a 24-hour library. The system would
enable the users to borrow books from the library. The books are either
reserved for reading in the library itself or available for requesting for checkout.
The staff of the library handles check-in check-out procedures using the LMS
and is responsible for maintaining the correct book status online.

Purpose of the Project


Analyze, specify, design, implement, document and demonstrate an
information system application to support a library. You are required to use the
Classical Methodology for Database Development. The system should be
implemented using a relational DBMS that supports standard SQL queries.
Class administrators will provide you with information about how to access a
college-managed MySQL server in order to implement your database and the
application. The professors must approve any other alternative
implementations. In no circumstances can you use a tool that automatically
generates SQL or automatically maps programming objects into the database.

The project entitled “Library Management System” is a web-based


application software developed in PHP as front end and MySQL as a back end.

“Advantages of the system”

1. Flexibility.
2. Time efficient.
3. Cost effective.
4. Highly reliable.
5. Easily Accessible Anytime from Any Internet Connection.

1
Library Management System

“System Requirements ”

Hardware Requirements:-

 PC with at least 1 GHz processor or higher


 Hard Disk – 20 GB
 Minimum 256 MB RAM for Windows 7
 VGA or higher resolution monitor ( SVGA recommended )

Software Requirements:-

 Windows 7 or Higher
 Back End – MySQL version 5.5
 PHP Designer 8
 WAMP Server 2.1
 Front End – Browser with support for PHP

2
Library Management System

“System Analysis”

The way that is followed while carrying on with the development application is
as follows:

Defining a problem:
Defining a problem is one of the important activities of the project. The
objective is to define precisely the business problem to be solved & thereby
determined the scope of the new system. This phase consists of 2 main tasks.
The 1st task within this activity is to review the organization needs that
originally initiated the project. The 2nd task is to identify, at an abstract or
general level, the expected capabilities of the new system. Thus, it helps us to
define the goal to be achieved & the boundary of the system. A clear
understanding of the problem will help us in building a better system & reduce
the risk of project failure. It also specifies the resources that have to be made
available to the project. Three important factors project goal, project bounds &
the resource limits are sometimes called the project’s term of reference.

Feasibility study:
The systems objectives outlined during the feasibility study serve as the basic
from which the work of system design is initiated. Much of the activities
involved at this stage is of technical nature requiring a certain degree of
experience in designing systems, sound knowledge of computer related
technology and through understanding of computers available in the market
and the various facilities provided by the vendors. Nevertheless, a system
cannot be designed in isolation without the active involvement of the user. The
user has a vital role to play at this stage too. As we know that data collected
during feasibility study wills, we utilized systematically during the system
design. It should, however be kept in mind that detailed study of the existing
system is not necessarily over with the completion of the feasibility study.
Depending on the plan of feasibility study, the level of detailed study will vary

3
Library Management System

and the system design stage will also vary in the amount of investigation that
still needs to be done.

4
Library Management System

This investigation is generally an urgent activity during the system. Sometimes,


but rarely, this investigation may form a separate stage between feasibility
study and computer system design. Designing a new system is a creative
process, which calls for logical as well as lateral thinking. The logical approach
involves systematic moves towards the end product keeping in mind the
capabilities of the personnel and the equipment at each decision making step.
Lateral thought implies encompassing of ideas beyond the usual functions and
equipment. This is to ensure that no efforts are being made to fit previous
solutions into new situations.
The feasibility study proposes one or more conceptual solutions to the problem
set for the project. The objective in assessing feasibility is to determine whether
a development project has a reasonable chance of success. It helps us to
determine the input & output of the system. The following are the criteria that
are considered to confirm the project feasibility.

“Salient Features”
 To provide better graphical user interface.

 Provides security to data by using login & password.


 Easy to use and efficient computerized system.

 The main objective of the project is to design and develop a user friendly
system.
 Less chances of information leakage.

 Online nature of system makes it easier to access it from anywhere.

5
Library Management System

“Project Details”

This project is a web based system and can be accessed from any
hardware or software platform which supports a browser to browse
through internet. Application can be hosted on a server and can be
accessed by multiple users from different computers at the same time.

Easy to use and friendly GUI interfaces provides ability to non-technical


users to use this software easily and efficient manner. This system is
created by using latest web-based technologies, which include:

 RDBMS (Relational Data base System)


 PHP and HTML
 CSS (Cascading Styling Sheets)
 MySQL SERVER
 WAMP development environment
This being an online system, it is primarily server based. Almost all the
code for the system resides on the server. Online web based systems
enjoy a number of advantages over the more traditional systems:

 Easier and faster to develop.


 Easier to deploy since all the code resides on the server
machine.
 No individual client machine installations are required.
 Easier to support and upgrade.

6
Library Management System

“Software’s Used for Designing”

Front end Software: -


Php Designer 8: -

Php Designer 8 is a fast and powerful PHP IDE and PHP editor with


full-blown HTML5- and CSS3 built-in editors. Highly customizable IDE with
intelligent syntax highlighting, debug support, syntax analyzing, support for
object-oriented coding, code insight on the fly, code templates, code snippets,
to do and bug managers, work with projects and frameworks, intuitive code
navigation, code formatters and minifies and all wrapped into a nice-looking
intuitive user interface.

Back end Software: -


1) MySQL :-

MySQL is an open source relational database management system


(RDBMS) based on Structured Query Language (SQL). 

MySQL runs on virtually all platforms, including Linux, UNIX, and Windows.


Although it can be used in a wide range of applications, MySQL is most often
associated with web-based applications and online publishing and is an
important component of an open source enterprise stack called LAMP. LAMP is
a Web development platform that uses Linux as the operating
system, Apache as the Web server, MySQL as the relational database
management system and PHP as the object-oriented scripting language.
(Sometimes Perl or Python is used instead of PHP.)

2) XAMP Server: -
XampServer refers to a software stack for the Microsoft
Windows operating system, created by Romain Bourdon and consisting of

7
Library Management System

the Apache web server, OpenSSL for SSL support, MySQL database


and PHP programming language.

“Module Description ”

The following sections contain a functional description of the system along with
some screen mockups. Each section would explain a particular functionality
and then present an example screen about it.

1. Logging In

There are three kinds of users of the system namely ‘students’, ‘faculty’ and
‘staff’ each identified by their Username. A valid Username and
Password combination is required to log in to the system and proceed. If
the user provides invalid log in credentials, an error message should be
displayed and the user should be redirected to the log in screen.

8
Library Management System

2. New User Registration

A new user needs to register before using the system. The staff personnel
already have their credentials created behind the scene. Clicking the ‘Create
Account’ link on the login screen displays the new user registration form.

9
Library Management System

After the user clicks Register, the system should verify that all fields are filled
in, that the Username has not already been registered, and that the Password
and Confirm Password fields are equal. If any of these validations fail, the user
should be returned to this screen to make corrections. The user should be
provided with meaningful error messages so he (from here onwards we would
use ‘he’ to represent the user without any intended bias) knows what to correct.

3. Make Profile
After creating an account, the user has to make a profile filling their basic
information. There should be a check if the user is a faculty or not and if
checked yes then the faculty should be asked for his/her associated
department in the university. The department field is not rendered/visible
for student users.

10
Library Management System

4. Search Books
The new user after registration or the existing user after logging in should be
taken to the Search Books screen. Here the user could search a book with its
ISBN, Title or Author. Only one of these fields must be used to search for a
book.

11
Library Management System

Each book in the system has information about its ISBN, Title, Author/s,
Publisher, Place of Publication, Edition, whether it is a book on reserve or not
(A reserved book is only available to be read in the library not for
checkout), Copyright Year, and cost of the book. Remember, the ISBN is
unique for each edition of a particular book. Multiple copies of the same book
edition would have the same ISBN. The staff would track the copies of the same
book with the copy# for that particular book. This copy# would mainly be for
the staff use so that they can track each copy specifically for checking if the copy
is damaged or not, and if the copy has been physically checked out of the library
or not. (The copy number would be written on each physical book) After
looking for the desired book, the user would be shown the availability of the
book in the next screen. If the book is not available, then the system maintains
the earliest date when it becomes available. That date is based on the last
check-out of that copy or the hold-status. Non-availability of the book implies
that none of the copies of the book are available.

The ‘book on reserve’ field would be pre-populated from the database along
with the number of the book copies available for a given ISBN. Reserved books
are kept in a separate area in the library and are available for a day- checkout
inside the library only. The user cannot request a hold on any book on reserve.
12
Library Management System

For those books he should go to the library and request them in person. All
copies of the same book (that means same ISBN) are either reserved or
available for checkout.

5. Request extension for an issued Book

If a user wants to keep the book for a longer time period than assigned, he can
request an extension (reissue) from the system as well. He can only use this
functionality on a book that he has physically checked out from the
library. For a student maximum 2 extensions are allowed per issue of a book.
For faculty this number is 5. The estimated return date of the book updates to
14 days from the date of the extension request if that request is accepted. Note
that a student can only keep a book for a maximum of 28 days from the original
check-out date whereas a faculty can keep it for up to 56 days. When the book is
first checked out the checkout date and extension-request- date are same and
the expected- return-date is 14 days from check-out. Thereafter, with every
extension, the extension-request-date is updated, and the expected-return-
date is updated. The original checkout date is always recorded to check that a
user can keep a book for a maximum of 28 days. Also, the extension of a
book is only allowed if that book has not already been requested for
future hold by another user.

13
Library Management System

The user enters the issue Id assigned to him and then submits. The system
looks for his record and auto-populates the current checkout date, current
extension request date (which will be same as the checkout date if this is the
first extension being requested) and current return date. (These would be non-
editable fields). The new extension request would be the current system date
(uneditable) when he is making this request and the new return date
(uneditable) would be system generated date of 14 days later than new
extension request date. Once the user submits, the system would check if the
book has been requested on hold by someone or not; if not, the extension is
accepted. If any book has a future hold then extension is denied for that book.

6. Future Hold Request for a Book


This feature allows a user to have his username recorded against a book as a
future hold requester. The system automatically sends a message to the
requester one day before the available date for the book he requested that the
book is now available. (You are not responsible for this functionality of sending
a message.) You just have to record in the database if a book has been requested
for hold by any user. When the user submits an ISBN, the system looks up the
copy with the earliest expected available date, informs the user, and records his
username as the future requestor against that copy in the database.

If a book is checked out or on hold, it has an expected return date which is


taken as the expected available date; such a book can be requested for future
14
Library Management System

and the system will accept the request and populate the “future requester” field
for the book with the username of the requester.

7. Track location

functionality helps one locate a book in the library. Each book is associated with
a subject category and each book can belong to only one subject. Each subject
has a name, number of journals, and keywords associated with it. The library
has three floors. Each floor has a floor number, number of copiers, and a
number of student assistants. Each floor can hold books on multiple subjects.
All books of the same subject are on the same floor. And there can be
multiple shelves on each floor. Each shelf has a shelf number, an aisle number
and can hold multiple books. Checkout Screen After requesting a hold on the
book, the user has to check out the book from the library. He can come to the
library, go pick up the book and then go to the terminal where he’ll checkout
from this screen. The process will be facilitated by the staff. The user can enter
the issue_id and the book will have the information about the ISBN and copy
number which will be scanned and shown on the screen along with the user
name. (Imagine that the user scans his card which automatically populates his
username and name.) The date fields are also auto-populated from the
database. If there was a hold request placed by that user on that copy, then it
will be dropped from the system when the book is checked out against it.

15
Library Management System

Remember that when this check out is done, the estimated return date for the
issue is to be updated to 14 days from this checkout date or the last allowed
date(based on the maximum number of days allowed to him and the maximum
number of extensions allowed to him), and the isCheckedout flag has to be
updated as well. Also, in case the user is coming to pick up his book after the
admissible grace period of 3 days, the system should throw him an error saying
that his hold has been dropped. If a copy of that book is still physically in the
library, he can locate it, and still check it out. If no copy is physically available,
he may place a “request for future” on a copy that has the lowest estimated
availability date.

8. Return Book Screen


Similar to the checkout function, the terminal would have a return book
function for the user. When the user comes in to return a book, the staff would
check if the book is damaged or not. If it is damaged, the staff will go to the
Penalty charges screen shown next to charge the user account. Otherwise, the
staff accepts the book and system marks the isCheckedout flag as zero.

If the book is being returned after the due date, then the user account would be
automatically charged with the late penalty.

16
Library Management System

17
Library Management System

“Project Snapshots ”
LOGIN

REGISTRATION

18
Library Management System

CREATE PROFILE

USER SUMMARY

19
Library Management System

SEARCH BOOKS

TRACK BOOKS

20
Library Management System

BOOK CHECKOUT

FUTURE HOLD REQUEST

21
Library Management System

REQUEST EXTENSION

RETURN BOOK

22
Library Management System

“Coding Part ”
LOGIN
<?php

include 'dbinfo.php';

?>

<?php

//always start the session before anything else!!!!!!

session_start();

if(isset($_POST['username']) and isset($_POST['password'])) {//check


null

$username = $_POST['username']; // text field for username

$password = $_POST['password']; // text field for password

// store session data

$_SESSION['username’] =$username;

//connect to the dB

$link = mysqli_connect ($host, $user, $pass) or die (“Unable to connect");

mysqli_select_db($link, $database) or die( "Unable to select database");

//Our SQL Query

$sql_query = "Select U.Username From user AS U, staff AS S Where


U.Username = '$username' AND U.Password = '$password' AND
U.Username = S.Username";

//Run our sql query

$result = mysqli_query ($link, $sql_query) or die(mysqli_error($link));

if($result == false)

23
Library Management System

echo 'The query failed.';

exit();

if(mysqli_num_rows($result) == 1){

//the username and password matches the database

//move them to the page to which they need to go

header('Location: AdminSummary.php');

//break;

//Our SQL Query

$sql_query = "Select Username From user Where Username =


'$username' AND Password = '$password'";

//Run our sql query

$result = mysqli_query ($link, $sql_query) or die(mysqli_error($link));

if($result == false)

echo 'The query failed.';

exit();

//this is where the actual verification happens

if(mysqli_num_rows($result) == 1){

//the username and password matches the database

24
Library Management System

//move them to the page to which they need to go

header('Location: UserSummary.php');

}else{

$err = 'Incorrect username or password' ;

//then just above your login form or where ever you want the error to be
displayed you just put in

echo "$err";

?>

<html>

<head>

<style>

#main

height:303px;

width:701px;

border:2px solid black;

margin:200px auto;

background:lightgreen;

#header{

height:70px;

width:697px;

25
Library Management System

border:2px solid black;

background:lightblue;

text-align:center;

#contain{

height:222.5px;

width:600px;

#mid{

height:150px;

width:300px;

margin:30px 50px 0px 140px;

</style>

</head>

<body>

<div id="main">

<div id="header">

<h1>LOGIN</h1>

</div>

<div id="contain">

<div id="mid">

<form action="" method="post">

<table>

26
Library Management System

<tr>

<td style="font-weight:bold;">Username:</td>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"
name="username" required/></td>

</tr>

<tr>

<td style="font-weight:bold;">Password:</td>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"
name="password" required/></td>

</tr>

</table>

<input type="Submit" value="Login" style="margin:30px 0px 200px;"/>

</form>

<form action="NewUserRegistration.php" method="post">

<input type="Submit" value="Create Account" style="margin:-33px 0px


280px; border:none;

background:white; color:blue; text-decoration:underline;"/>

</form>

</div>

</div>

</div>

</body>

</html>

27
Library Management System

REGISTRATION
<?php

include 'dbinfo.php';

?>

<?php

session_start();

$link = mysqli_connect($host,$user,$pass) or die( "Unable to connect");

mysqli_select_db($link, $database) or die( "Unable to select database");

if(isset($_POST['username']) and isset($_POST['password']) and


isset($_POST['confirmpassword'])) {

$username = $_POST['username'];

$password = $_POST['password'];

$confirmpassword = $_POST['confirmpassword'];

$_SESSION['username']=$username;

$_SESSION['password']=$password;

$_SESSION['confirmpassword']=$confirmpassword;

if($password == $confirmpassword) {

$insertStatement = "INSERT INTO user (Username, Password)


VALUES ('$username', '$password')";

$result = mysqli_query ($link, $insertStatement) or


die(mysqli_error($link));

if($result == false) {

28
Library Management System

echo 'The query failed.';

exit();

} else {

header('Location: CreateProfile.php');

} else {

echo 'password not consistent';

?>

<html>

<head>

<style>

#main

height:303px;

width:701px;

border:2px solid black;

margin:200px auto;

background:lightgreen;

#header{

height:70px;

width:697px;

29
Library Management System

border:2px solid black;

background:lightblue;

text-align:center;

#contain{

height:222.5px;

width:600px;

#mid{

height:150px;

width:300px;

margin:30px 50px 0px 140px;

</style>

</head>

<body>

<div id="main">

<div id="header">

<h1>New User Registration</h1>

</div>

<div id="contain">

<div id="mid">

<form action="" method="post">

30
Library Management System

<table>

<tr>

<td>Username</td>

<td><input type="text" name="username" required/></td>

</tr>

<tr>

<td>Password</td>

<td><input type="text" name="password" required/></td>

</tr>

<tr>

<td>Confirm Password</td>

<td><input type="text" name="confirmpassword" required/></td>

</tr>

</table>

<input type="submit" value="Register"/>

</form>

<form action="UserSummary.php" method="post">

<input type="submit" value="Back"/>

</form>

</body>

</html>

31
Library Management System

CREATE PROFILE
<?php

include 'dbinfo.php';

?>

<?php

session_start();

$link = mysqli_connect($host,$user,$pass) or die( "Unable to connect");

mysqli_select_db($link, $database) or die( "Unable to select database");

if(isset($_POST['firstname']) and isset($_POST['lastname']) and


isset($_POST['email'])) {

$firstname = $_POST['firstname'];

$lastname = $_POST['lastname'];

$name = "$firstname $lastname";

$email = $_POST['email'];

$DOB = $_POST['DOB'];

$address = $_POST['address'];

$gender = $_POST['gender'];

$isfaculty = $_POST['isfaculty'];

$username = $_SESSION['username'];

if($isfaculty == "1") {

$dept = $_POST['dept'];

32
Library Management System

} else {

$dept = null;

$insertStatement = "INSERT INTO student_faculty (Username,


Name, DOB, Email, Gender, Address,

IsFaculty, Dept) VALUES ('$username', '$name', '$DOB', '$email',


'$gender', '$address', '$isfaculty',

'$dept')";

$result = mysqli_query ($link, $insertStatement) or


die(mysqli_error($link));

if($result == false) {

echo 'The query failed.';

exit();

} else {

header('Location: index.php');

?>

<html>

<head>

<style>

#main

height:500px;

width:901px;

33
Library Management System

border:2px solid black;

margin:200px auto;

background:lightgreen;

#header{

height:70px;

width:897px;

border:2px solid black;

background:lightblue;

text-align:center;

#contain{

height:222.5px;

width:600px;

#mid{

height:150px;

width:300px;

margin:30px 50px 0px 140px;

</style>

</head>

<body>

<div id="main">

34
Library Management System

<div id="header">

<h1>Create Profile</h1>

</div>

<div id="contain">

<div id="mid">

<form action="" method="post">

<table width=100% height=100% cellspacing="8" cellpadding="10">

<tr >

<td ><label>First Name</label></td>

<td><input type="text" name="firstname" required/></td>

<td>Last Name</td>

<td><input type="text" name="lastname" required/></td>

</tr>

<tr >

<td>D.O.B</td>

<td><input type="text" name="DOB"/></td>

<td>Gender</td>

<td>

<select name="gender">

<option value="M">male</option>

<option value="F">female</option>

</select>

</td>

</tr>

<tr>

35
Library Management System

<td>Email</td>

<td><input type="text" name="email" required/></td>

<td>Are you a faculty</td>

<td><select name="isfaculty">

<option value="1">Yes</option>

<option value="0">no</option>

</select></td>

</tr>

<tr>

<td>Address</td>

<td><textarea name="address" rows="5" cols="30"></textarea></td>

<td>Associate Department</td>

<td><select name="dept">

<option value="School of Electrical & Computer


Engineering">Electrical Engineering</option>

<option value="College of Computing">Computer Science</option>

<option value="School of Industrial & Systems


Engineering">Industrial & Systems Engineering</option>

</select></td>

</tr>

</table>

<tr>

<input type="submit" value="submit" style="margin:30px 0px 500px;"/>

</tr>

</form>

</div>

36
Library Management System

</div>

</div>

</body>

</html>

“Testing”
Software testing is the process of evaluation a software item to detect
differences between given input and expected output. Also to assess the
feature of A software item. Testing assesses the quality of the product.
Software testing is a process that should be done during the development
process. In other words software testing is a verification and validation
process.

Verification
Verification is the process to make sure the product satisfies the conditions
imposed at the start of the development phase. In other words, to make
sure the product behaves the way we want it to.

Validation
Validation is the process to make sure the product satisfies the specified
requirements at the end of the development phase. In other words, to
make sure the product is built as per customer requirements.

Testing goes side by side with the implementation that is aimed at


ensuring that the system works accurately and efficiently before the live
operation is performed .The common view of testing held by the user is
process of executing a program with explicit intention of handling errors.
The application which has been developed has to be tested to prove its
validity. Testing is considered to be the least creative phase of the whole

37
Library Management System

cycle of system design. In the real sense it is the phase, which helps to
bring out the creativity of the other phases, and makes it shine.

The Smart Library Management System was tested using the following two
techniques of application testing:

Unit Testing:
 In the line of strategy the entire individuals function and modules were
put to test independently

 By following this strategy all the errors in coding were identified and
corrected.

 This method was applied in combination with the White Box and Black
Box testing.

 Technique to find errors in each module.

 The effort of specific combination of data on system operation was


tested.

 The following were the testes carried out for Graphical User Interface
(GUI).

 It was seen that the pages opens properly based on related menu based
commands.

 It was tested whether all relevant menus, buttons, icons and other
controls are available and properly displayed.

System Testing :
We use this testing method. System testing is the testing to ensure that by
putting the software in different environments (e.g., Operating Systems) it
still works. System testing is done with full system implementation and
environment. It falls under the class of black box testing.

38
Library Management System

Performance Testing :
Performance testing is the testing to assess the speed and effectiveness of
the system and to make sure it is generating results within a specified time
as in performance requirements. It falls under the class of black box
testing.

Multi-user System Testing :

Database Locking Schemes: Whenever more than one person is accessing a


record/s some type of process must be used to prevent the outer users
from attempting to update the same record at the same time. This process
is a locking scheme. In its simplest form, a locking scheme allows only one
user at a time to update information in the database.

“Bibliography”
The following books were referred during the analysis and execution
phase of the project:

  BOOKS REFERRED

BEGINNING PHP 5                                           ---DAVE MERCER


BLACK BOOK HTML                                         ---WILEY
DREAMTECH
PHP AND MYSQL WEB DEVELOPMENT  ---
LUKEWELLING,LAURA
MICROSOFT SQL SERVER-2000              ---RANKIN, PAUL &JENSEN
SQL SERVER-2000                                            ---DUSAN
PETKOVIC
PHP IN A NUTSHELL                                        --- PAUL HUDSON

 WEBSITES REFERRED
39
Library Management System

 www.google.co.in
 www.w3schools.com
 www.academia.edu.in
 www.students3k.com

40

You might also like