Upload
reshmajohney
View
591
Download
14
Tags:
Embed Size (px)
Citation preview
Submitted to MISS Mary John
On 26-10-2010
Tuesday
LIBRARY LIBRARY LIBRARY LIBRARY
MANAGEMEMANAGEMEMANAGEMEMANAGEMENTNTNTNT
SYSTEMSYSTEMSYSTEMSYSTEM RESHMA JOHNEY
ROLL NO:24
LIBRARY MANAGEMENT SYSTEM RESHMA JOHNEY
Second year, Rajagiri School of Engineering and Technology KAKANAD, ERNAKULAM [email protected]
The Assignment on “LIBRARY MANAGEMENT SYSTEM” gives us the complete information about the library. We can enter the record of new books and retrieve the details of books available in the library. We can issue the books to the students and maintain their records and can also check how many books are issued and stock available in the library. In this assignment we can maintain the late fine of students who returns the issued books after the due date. The assignment is very useful for those who want to know about Library Management System
INDEX
Sl.No: TOPICS Page_no: 1 Problem definition 3-4 2 Theoretical Background 4-10 3 Table Design 10-12 4 Program(JSP code) 12-21 5 Conclusion 22
I. PROBLEM DEFINTION
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 corresponding student details are entered in the student user 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 the menu Book
Issue. The student has to pay the fine if any on the basis of no. of days delayed return of the book in the
library
i.
II. THEORETICAL BACKGROUND
HTML Form designed for selection of the different Menus. Following menu options have been
provided in this Home Form:-
1. Books Entry
2. User Entry
3. Issue of Books
a) Issue of Books
b) Return of Books.
4. Book Delete And the web page design is a follows…
HOME PAGE
As said earlier, the web page has the following options ‘BOOK ENTRY’ , ‘ BOOK ISSUE’,
‘BOOK RETURN’, ‘BOOK SEARCH’,’BOOK DELETE’.
BOOK ENTRY
By clicking the Book Entry Menu of the HTML web page ( home page) the above form is displayed for the entry of new books in the library. Following Text Boxes have been provided for the entry of the books related information:-
1. Book no. 2. ISBN No. 3. Subject 4. Name of the Book 5. Author 6. Publisher 7. Edition 8. Copies 9. Cost In addition, Enter and Reset buttons have been provided in the form.
USER ACCOUNTS
By clicking any one of the menu ‘BOOK ISSUE’ or BOOK RETURN’, the webpage will first direct in to a “User Entry” page and this form can be obtained for the entry of the new user coming to the library as user account as well as the returning of a book
In addition, Login and Refresh buttons have been provided in the form.
The following provisions have been provided in this form:-
1. Student Id 2. Roll No. 3. Name of the Student 4. Branch
BOOK ISSUE
This form can be obtained by clicking the “BOOK ISSUE” for issuing a particular book available in the library along with the issue and due date.
The following text boxes have been provided for entry of Issuance of the Book.
1. Book No. 2. Student ID 3. Current No. of Copies Available 4. Issue Date 5. Due Date
In addition, Issue and Refresh buttons have been provided in the form.
BOOK RETURN
This form can be obtained by clicking the “BOOK RETURN” for returning a particular book issued to user from the library along with the issue, due date and return date with fine if any.
The following text boxes have been provided for entry of return of the Books.
1. Book No. 2. Student ID 3. Current No. of Copies Available 4. Issue Date 5. Due Date 6. Book No. 7. Student ID 8. Current No. of Copies Available 9. Issue Date 10. Due Date 11. Return Date 12. Fine, if any In addition, Return and Refresh buttons have been provided in the form.
BOOK SEARCH
This form can be obtained by clicking the menu “BOOK SEARCH” for getting details about a particular book.
The following text boxes have been provided for entry of return of the Books.
1. Book Name 2. Author Name. In addition, Submit button have been provided in the form.
If the book is found in the database, then the resulting web page will be displayed
If the book is not found in the database, then the resulting web page will be displayed
BOOK DELETE
By clicking the Delete Menu of the HTML web page ( home form) this form is displayed for the deletion of books in the library if needed. Following Text Boxes have been provided for the finding books for deletion:-
1. Book Name 2. Author Name.
OUTPUT
Table Design
Every web page is linked to a database (Microsoft Access 2010) form using a JSP page. And
table design for each form is given as follows.
New_Book_entry
FIELD NAME DATATYPE
ID AuoNumber
BOOK _NAME Text
ISBN Number
SUBJECT Text
AUTHOR_NAME Text
PUBLISHER Text
EDITION Number
NO_OF_COPIES Number
COST Number
USER_ACCOUNT
FILED NAME DATATYPE
STUDENT_ID AuoNumber
ROLL_NO Number
STUDENT_NAME Text
BRANCH Text
BOOK_ISSUE
FIELD NAME DATATYPE
BOOK_NO AuoNumber
STUDENT_ID Number
NO_OF_COPIES Number
ISSUE_DATE Number
RETURN_DATE Number
BOOK_RETURN
FIELD NAME DATATYPE
BOOK_NO AuoNumber
STUDENT_ID Number
NO_OF_COPIES Number
ISSUE_DATE Number
RETURN_DATE Number
FINE_IF_ANY Number
PROGRAM CODE A server-side technology, Java Server Pages is an extension to the Java servlet technology that was
developed by Sun. JSPs have dynamic scripting capability that works in tandem with HTML code,
separating the page logic from the static elements -- the actual design and display of the page -- to
help make the HTML more functional (i.e. dynamic database queries). Jsp codes which I used are
listed below
1 .LIB_ENTRY
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<html>
<body>
<%
String bno=request.getParameter("book_no");
String bn=request.getParameter("book_name");
String isbn=request.getParameter("book_isbn");
String sub=request.getParameter("book_subject");
String an=request.getParameter("author_name");
String pub=request.getParameter("book_publisher");
String ed=request.getParameter("book_edition");
String cp=request.getParameter("no_of_copies");
String cst=request.getParameter("book_cost");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:NEWBOOK");
Statement stmt=con.createStatement();
String s="INSERT INTO new_book_entry
VALUES('"+bno+"','"+bn+"','"+isbn+"','"+sub+"','"+an+"','"+pub+"','"+ed+"','"+cp+"','"+cst+"')";
stmt.executeUpdate(s);
con.commit();
%>
<body background="image/7.jpg">
<br><br><br>
<br><center>
<FONT FACE="COMIC SANS MS" COLOR="GREEN" SIZE="40%">
BOOK ADDED</CENTER></FONT><BR><BR>
<center><table width="40%" height="10%" bgcolor="#8ACA59">
<tbody>
<tr>
<td colspan=2 align="center"></td>
</tr>
<tr>
<td><h3>A new book added to database!!!!!!</h3></td>
</tr>
</tbody>
<BR><BR><BR>
</table>
</form>
</form>
<form name="form1" action="BOOK_ISSUE.html">
<br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
</body>
</html>
2.LIB_ISSUE
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<html>
<body>
<%
String bno=request.getParameter("book_no");
String sid=request.getParameter("student_id");
String cp=request.getParameter("no_of_copies");
String is=request.getParameter("issue_date");
String rd=request.getParameter("return_date");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:ISSUE");
Statement stmt=con.createStatement();
String s="INSERT INTO book_issue
VALUES('"+bno+"','"+sid+"','"+cp+"','"+is+"','"+rd+"')";
stmt.executeUpdate(s);
con.commit();
%>
<body background="image/7.jpg">
<br><br><br>
<br><center>
<FONT FACE="COMIC SANS MS" COLOR="GREEN" SIZE="40%">
BOOK ADDED</CENTER></FONT><BR><BR>
<center><table width="40%" height="10%" bgcolor="#8ACA59">
<tbody>
<tr>
<td colspan=2 align="center"></td>
</tr>
<tr>
<td><h3>BOOK ISSUED!!!!!!</h3></td>
</tr>
</tbody>
<BR><BR><BR>
</table>
</form>
</form>
<form name="form1" action="BOOK_ISSUE.html">
<br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
</body>
</html>
3.LIB_RETURN
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<html>
<body>
<%
String bno=request.getParameter("book_no");
String sid=request.getParameter("student_id");
String cp=request.getParameter("no_of_copies");
String is=request.getParameter("issue_date");
String rd=request.getParameter("return_date");
String fn=request.getParameter("fine");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:RETURN");
Statement stmt=con.createStatement();
String s="INSERT INTO book_return
VALUES('"+bno+"','"+sid+"','"+cp+"','"+is+"','"+rd+"','"+fn+"')";
stmt.executeUpdate(s);
con.commit();
%>
<body background="image/7.jpg">
<br><br><br>
<br><center>
<FONT FACE="COMIC SANS MS" COLOR="GREEN" SIZE="40%">
BOOK ADDED</CENTER></FONT><BR><BR>
<center><table width="40%" height="10%" bgcolor="#8ACA59">
<tbody>
<tr>
<td colspan=2 align="center"></td>
</tr>
<tr>
<td><h3>BOOK RETURNED!!!!!!</h3></td>
</tr>
</tbody>
<BR><BR><BR>
</table>
</form>
</form>
<form name="form1" action="USER_ACCOUNTS1.html">
<br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
</body>
</html>
4.LIB_SEARCH
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<%
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:SEARCH");
Statement stmt=con.createStatement();
String sub=request.getParameter("bname");
String st="select * from new_book_entry where BOOK_NAME='"+sub+"' ";
ResultSet rs=stmt.executeQuery(st);
%>
<html>
<head>
<title></title>
</head>
<body background="image/9.jpg">
<form method="POST" action="">
<center>
<%
if(rs.next())
{
%>
<br><br><br><br>
<table border="1">
<BR><BR><BR><BR><BR><BR>
<tr>
<td><font face="comic sans ms" color="yellow" >Book Id</font></td>
<td><font face="comic sans ms" color="yellow" >Book Name</font></td>
<td><font face="comic sans ms" color="yellow" >ISBN NO</font></td>
<td><font face="comic sans ms" color="yellow" >Subject</font></td>
<td><font face="comic sans ms" color="yellow" >Author Name</font></td>
<td><font face="comic sans ms" color="yellow" >Publisher</font></td>
<td><font face="comic sans ms" color="yellow" >Edition</font></td>
<td><font face="comic sans ms" color="yellow" >No of Copies</font></td>
<td><font face="comic sans ms" color="yellow" >Cost</font></td>
</tr>
<%
do
{
%>
<tr>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("BOOK_NAME"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("ID"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("ISBN"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("SUBJECT"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("AUTHOR_NAME"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("PUBLISHER"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("EDITION"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("NO_OF_COPIES"));%></font></td>
<td ><font face="comic sans ms" color="yellow"
><%out.println(rs.getString("COST"));%></font></td>
</tr>
<%
}while(rs.next());
}
else
{
%>
<br><br><br><br><br><br<br><br><br><font face="comic sans ms"
color="yellow" size="20%">
<%
out.println("No such books found !!!!!!");
}
}
catch(Exception e)
{
System.out.println(e);
}
%>
</table>
</center>
</form>
</form>
<CENTER><form name="form1" action="BOOK_SEARCH.html">
<br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
</body>
</html>
5.LIB_DELETE
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<html>
<body background="image/9.jpg">
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:NEWBOOK");
Statement st=con.createStatement();
String find=request.getParameter("bname");
String r="select * from new_book_entry where BOOK_NAME='"+find+"' ";
ResultSet rs=st.executeQuery(r);
if(rs.next())
{
%>
<body background="image/7.jpg">
<h1><center><b><font color="green"><BR><BR><BR>
<CENTER><FONT FACE="COMIC SANS MS" COLOR="GREEN" SIZE="40%">
BOOK DELETED</CENTER></FONT><BR><BR>
<form action="BOOK_DELETE.html">
<center><br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
<%
String delete="DELETE * from new_book_entry where BOOK_NAME='"+find+"' ";
st.executeUpdate(delete);
con.commit();}
else
{
%>
<body background="image/7.jpg">
<BR><BR><BR><BR><BR><BR><CENTER><FONT FACE="COMIC SANS MS"
COLOR="GREEN" SIZE="40%">
INVALID ENTRY</CENTER></FONT><CENTER><BR><BR>
<form action="BOOK_DELETE.html">
<center><br><br><br><input type="submit" value="BACK" style="height: 50px; width:
150px"></center>
</form>
<%}%>
</body>
</html>
</form>
</body>
</html>
6.LIB_USER
Code:
<%@page import="java.sql.*"%>
<%@page import="java.io.*"%>
<html>
<body>
<%
String sid=request.getParameter("student_id");
String rn=request.getParameter("roll_no");
String snm=request.getParameter("student_name");
String br=request.getParameter("branch");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:USER");
Statement stmt=con.createStatement();
String s="INSERT INTO user_account VALUES('"+sid+"','"+rn+"','"+snm+"','"+br+"')";
stmt.executeUpdate(s);
con.commit();
%>
</body>
</html>
APACHE TOMCAT
The connection with the html page and the database is made easy with apache tomcat. Tomcat is an
application server from the Apache Software Foundation that executes Java servlets and renders Web
pages that include Java Server Page coding. Described as a "reference implementation" of the Java
Servlet and the Java Server Page specifications, Tomcat is the result of an open collaboration of
developers and is available from the Apache Web site in both binary and source versions.
CONCLUSION
After we have completed the assignment we are sure that 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 assignment 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 submit button to get the desired information.
Our main aim of the assignment 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 assignment will go a long way in satisfying user’s requirements. The
computerization of the Library Management will not only improves the efficiency but will also reduce
human stress thereby indirectly improving human recourses.