E - Library Management System
E - Library Management System
By
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
JEPPIAAR NAGAR, RAJIV GANDHI SALAI,
CHENNAI– 600119, TAMILNADU
MAY 2022
i
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with Grade “A” by NAAC
(Established under Section 3 of UGC Act, 1956)
JEPPIAAR NAGAR, RAJIV GANDHI SALAI, CHENNAI– 600119
www.sathyabama.ac.in
This is to certify that this Project Report is the bonafide work of SUVEETHA J
(Reg. No. 39290107) and THAMIZHSELVI K (Reg. No. 39290110) who carried
out the project entitled “E-LIBRARY MANAGEMENT SYSTEM” under my
supervision from November 2021 to April 2022.
ii
DECLARATION
partial fulfillment of the requirements for the award of Bachelor of Science degree in
Computer Science.
DATE:
iii
ACKNOWLEDGEMENT
I would like to express my sincere and deep sense of gratitude to my Project Guide
Dr.MAHESWARI.M., for his valuable guidance, suggestions, and constant
encouragement that paved way for the successful completion of my project work.
I wish to express my thanks to all Teaching and Non-teaching staff members of the
Department of Computer Science and Engineering who were helpful in many ways
For the Completion of the project.
iv
ABSTRACT
Book Store Management System is the web application to automate all kinds of operations
in the book shop. The purpose of this software is to manage the books in the book store.
This project focuses attention on designing efficient and reliable software which controls the
transactions of a bookshop. In the real world, it tends to associate with automated systems
as they provide many benefits than doing the same thing manually. As above mentioned,
here we have introduced a system which can be used to maintain a bookshop. When we
are concerning the manual process of a bookshop, the major problem is the waste of time.
A customer has to waste his/her valuable time when he needs to buy a book as all the
events such as searching, purchasing, E-links are done by members of the Web application.
v
TABLE OF CONTENTS
Chapter Page
No. TITLE No.
ABSTRACT v
LIST OF FIGURES vii
1 INTRODUCTION 1
1.1 OVERVIEW OF THE PROJECT 1
2 LITERATURE SURVEY 2
vi
LIST OF FIGURES
FIGURE PAGE
NO FIGURE NAME NO
3.1 Java VM 7
vii
CHAPTER-1
1. INTRODUCTION
1.1 OVERVIEW OF THE PROJECT
In the world of software development, there is lots of improvement in the area of
Architectural design and principles. The philosophies and implementation details
are changing as the people guide the development of the application. In this
fantastic and yet sometimes complex world of software development there are some
tried and true architecture patterns and software development guidelines employed
by most architects. Also, your design must have an ability to turn towards innovation
instead of lending itself to common practices. Web services are one such area
where architects must lean on their creative side and hope that their solutions are
still successful. In this report, we will explain an exciting voyage down the road of
Web services application. From requirements to use cases, to database design, to
component frameworks, to user interfaces, we will cover every aspect of system
design required to build an application with collaborative Web services. The reason
why we selected the online Bookstore web service is everybody walking down the
street has some idea about bookstores. The objective of this project is to develop
an e- book store where books can be bought from the comfort of home through the
Internet. An online book store is a virtual store on the Internet where customers can
browse the catalog and select books of interest. The selected books may be
collected in a shopping cart. At checkout time, the items in the shopping cart will be
presented as an order. At that time, more information will be needed to complete
the transaction. Usually, the customer will be asked to fill or select a billing address,
a shipping address, a shipping option, and payment information such as a credit
card number. E-mail notification is sent to the customer as soon as the order is
placed.
1
CHAPTER-2
2. LITERATURE SURVEY
ABSTRACT:
The Internet by far plays a major role in people’s life. It has drastically improved the
quality of life and the standard of living of so many people. It has widened its
branches into many different levels and areas. The e-commerce industry is one such
branch that has come into the spotlight in recent years. The online bookstore system
has eased the life of so many book lovers by making it easy for them to purchase
books online. It is not always feasible to access a traditional bookstore, it is limited
by its operation time, availability of a particular book, its location, and most
importantly its capacity and the space required to store numerous books. Such
drawbacks have led to the evolution of e-commerce industries related to bookstores.
Our project is one such simple e-commerce website that houses various books of
different categories for a consumer to purchase online.
ABSTRACT:
Online bookstores have attracted millions of people and helped provide them with
hopeful books. Similarity search over online book stores mainly focuses on finding
the top-K most similar products for a given query. In this paper, we discuss how to
find similar products for a given query product, and propose a framework for finding
similar products from online bookstores. We firstly build the co-purchasing network
by using the relationships between different types of products and then compute the
similarity between products using Sim Rank. Finally, we give some experimental
results by implementing this method on the Amazon dataset, which demonstrates
that the proposed method can find the underlying results over the real dataset.
2
TITLE: Opportunities and Challenges of Building a Books-as-a-Service Platform
ABSTRACT:
services marketing
ABSTRACT:
The research study explores the phenomenon of an increase in the use of online
mediums for textbook sales. The study uses the basics of commerce transactions,
incorporating them into a model to explain their effects on different mediums of
textbook sale. The study uses a theoretical approach in explaining the influence of
advantages and disadvantages of each medium on transactions occurring through
it. The study designs two different models each representing a single medium. The
method of flowchart analysis is used to describe the various processes occurring in
3
each medium and transactions are incorporated at the point of sales in both models.
Overall the study concludes by explaining the theory behind the growth of online
mediums when compared to other mediums.
ABSTRACT:
Inventory Management Book Store System Using RFID (IMBS) is a system in the
category of desktop tools applications. It focuses on managing book stores with the
use of WID. WID is a device that scans the quantity and detailed information about
a variety of books at the book stores. The area of study is at Bestari Book Store.
The book store provides a variety of books and magazines for customers. This
system will b developed using Microsoft Visual Basic.Net, Microsoft SQL Server to
build a database, Microsoft Project, Microsoft Word, Adopt Photoshop as the
software. The hardware that be used to build this system is RFID Reader, RFIG
Tag, and personal computer. Another device that we used is Window XP as an
operating system. During the development of IMBS, the methodology being used is
the Prototyping model. Each process during the development process is followed
by each phases in Prototyping model. The system consists four modules includes
Book Stock Managing Module, Order Module, Book stock Information
Searching Module and Administration Management Module. The groups of user that
had been identified to use the system are Administrator and employee at Bestari
Book Store. IMBS also will develop to help admin and employee manage data of
book store with quickly and efficient. Besides that, it can save time and cost.
4
CHAPTER 3
The project aims and objectives that will be achieved after completion of this project
are discussed in this subchapter.
• An Admin login page where admin can add books, videos or page sources.
DIS-ADVANTAGE:
5
3.2 REQUIREMENT ANALYSIS:
Software Environment
Java Technology
▪ Simple
▪ Architecture neutral
▪ Object oriented
▪ Portable
▪ Distributed
▪ High performance
▪ Interpreted
▪ Multithreaded
▪ Robust
▪ Dynamic
▪ Secure
6
codes —the platform-independent codes interpreted by the interpreter on the
Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation
occurs each time the program is executed. The following figure illustrates
how this works. You can think of Java byte codes as the machine code
instructions for the Java Virtual Machine (Java VM). Every Java interpreter,
whether it’s a development tool or a Web browser that can run applets, is an
implementation of the Java VM. Java byte codes help make “write once, run
anywhere” possible. You can compile your program into byte codes on any
platform that has a Java compiler. The byte codes can then be run on any
implementation of the Java VM. That means that as long as a computer has
a Java VM, the same program written in the Java programming language can
run on Windows 2000, a Solaris workstation, or on an iMac.
7
software-only platform that runs on top of other hardware-based
platforms.
You’ve already been introduced to the Java VM. It’s the base for the Java platform
and is ported onto various hardware-based platforms.
The Java API is a large collection of ready-made software components that provide
many useful capabilities, such as graphical user interface (GUI) widgets. The Java
API is grouped into libraries of related classes and interfaces; these libraries are
known as packages. The next section, What Can Java Technology Do? Highlights
what functionality some of the packages in the Java API provide.
The following figure depicts a program that’s running on the Java platform. As the
figure shows, the Java API and the virtual machine insulate the program from the
hardware.
Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can
be a bit slower than native code. However, smart compilers, well-tuned interpreters,
and just-in-time byte code compilers can bring performance close to that of native
code without threatening portability.
However, the Java programming language is not just for writing cute,
entertaining applets for the Web. The general-purpose, high-level Java
8
programming language is also a powerful software platform. Using the
generous API, you can write many types of programs.
9
• Object serialization: Allows lightweight persistence and
communication via Remote Method Invocation (RMI).
The Java platform also has APIs for 2D and 3D graphics, accessibility,
servers, collaboration, telephony, speech, animation, and more. The
following figure depicts what is included in the Java 2 SDK.
We can’t promise you fame, fortune, or even a job if you learn the Java
programming language. Still, it is likely to make your programs better and
requires less effort than other languages. We believe that Java technology
will help you do the following:
10
programming language can be four times smaller than the same
program in C++.
• Avoid platform dependencies with 100% Pure Java: You can keep
your program portable by avoiding the use of libraries written in other
languages. The 100% Pure JavaTM Product Certification Program has
a repository of historical process manuals, white papers, brochures,
and similar materials online.
• Write once, run anywhere: Because 100% Pure Java programs are
compiled into machine-independent byte codes, they run consistently
on any Java platform.
ODBC
The ODBC system files are not installed on your system by Windows 95.
Rather, they are installed when you setup a separate database application, such as
SQL Server Client or Visual Basic 4.0. When the ODBC icon is installed in Control
Panel, it uses a file called ODBCINST.DLL. It is also possible to administer your
ODBC data sources through a stand-alone program called ODBCADM.EXE. There
is a 16-bit and a 32-bit version of this program and each maintains a separate list of
ODBC.
Excel spreadsheets and plain text files can be turned into data sources. The
operating system uses the Registry information written by ODBC Administrator to
determine which low-level ODBC drivers are needed to talk to the data source (such
as the interface to Oracle or SQL Server). The loading of the ODBC drivers is
transparent to the ODBC application program. In a client/server environment, the
ODBC API even handles many of the network issues for the application
programmer.
12
The advantages of this scheme are so numerous that you are probably
thinking there must be some catch. The only disadvantage of ODBC is that it isn’t
as efficient as talking directly to the native database interface. ODBC has had many
detractors make the charge that it is too slow. Microsoft has always claimed that the
critical factor in performance is the quality of the driver software that is used. In our
humble opinion, this is true. The availability of good ODBC drivers has improved a
great deal recently. And anyway, the criticism about performance is somewhat
analogous to those who said that compilers would never match the speed of pure
assembly language. Maybe not, but the compiler (or ODBC) gives you the
opportunity to write cleaner programs, which means you finish sooner. Meanwhile,
computers get faster every year.
JDBC
JDBC was announced in March of 1996. It was released for a 90 day public
review that ended June 8, 1996. Because of user input, the final JDBC v1.0
specification was released soon after.
The remainder of this section will cover enough information about JDBC for you to
know what it is about and how to use it effectively. This is by no means a complete
overview of JDBC. That would fill an entire book.
13
JDBC Goals
Few software packages are designed without goals in mind. JDBC is one
that, because of its many goals, drove the development of the API. These goals, in
conjunction with early reviewer feedback, have finalized the JDBC class library into
a solid framework for building database applications in Java.
The goals that were set for JDBC are important. They will give you some insight
as to why certain classes and functionalities behave the way they do. The eight
design goals for JDBC are as follows:
The designers felt that their main goal was to define a SQL interface for
Java. Although not the lowest database interface level possible, it is at a low
enough level for higher-level tools and APIs to be created. Conversely, it is at a
high enough level for application programmers to use it confidently. Attaining this
goal allows for future tool vendors to “generate” JDBC code and to hide many of
JDBC’s complexities from the end user.
2. SQL Conformance
14
4. Provide a Java interface that is consistent with the rest of the Java
system
Because of Java’s acceptance in the user community thus far, the designers
feel that they should not stray from the current design of the core Java system.
5. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no
exception. Sun felt that the design of JDBC should be very simple, allowing for
only one method of completing a task per mechanism. Allowing duplicate
functionality only serves to confuse the users of the API.
Strong typing allows for more error checking to be done at compile time; also,
less error appear at runtime.
Because more often than not, the usual SQL calls used by the programmer
are simple SELECT’s, INSERT’s, DELETE’s and UPDATE’s, these queries
should be simple to perform with JDBC. However, more complex SQL
statements should also be possible. Finally, we decided to proceed the
implementation using Java Networking. And for dynamically updating the cache
table we go for MS Access database. Java ha two things: a programming
language and a platform.
1. Simple
2. Architecture-neutral
3. Object-oriented
4. Portable
5. Distributed
15
6. High-performance
7. Interpreted
8. Multithreaded
9. Robust
10. Dynamic
11. Secure
Java is also unusual in that each Java program is both compiled and
interpreted. With a compile you translate a Java program into an
intermediate language called Java byte codes the platform-independent
code instruction is passed and run on the computer.
You can think of Java byte codes as the machine code instructions for the
Java Virtual Machine (Java VM). Every Java interpreter, whether it’s a Java
development tool or a Web browser that can run Java applets, is an
implementation of the Java VM. The Java VM can also be implemented in
hardware.
Java byte codes help make “write once, run anywhere” possible. You can
compile your Java program into byte codes on my platform that has a Java
compiler. The byte codes can then be run any implementation of the Java
VM. For example, the same Java program can run Windows NT, Solaris,
and Macintosh.
Networking
TCP/IP stack:
16
Fig No: 3.3 TCP/IP stack
IP datagram’s
Internet. It is also responsible for breaking up large datagram into smaller ones for
transmission and reassembling them at the other end.
17
UDP
TCP
Internet addresses
In order to use a service, you must be able to find it. The Internet uses an address
scheme for machines so that they can be located. The address is a 32 bit integer
which gives the IP address. This encodes a network ID and more addressing. The
network ID falls into various classes according to the size of the network address.
Network address
Class A uses 8 bits for the network address with 24 bits left over for other
addressing. Class B uses 16 bit network addressing. Class C uses 24 bit network
addressing and class D uses all 32.
Subnet address
Internally, the UNIX network is divided into sub networks. Building 11 is currently on
one sub network and uses 10-bit addressing, allowing 1024 different hosts.
Host address
8 bits are finally used for host addresses within our subnet. This places a limit of
256 machines that can be on the subnet.
18
Total address
Port addresses
Sockets
#include <sys/types.h>
#include <sys/socket.h>
Here "family" will be AF_INET for IP communications, protocol will be zero, and
type will depend on whether TCP or UDP is used. Two processes wishing to
communicate over a network create a socket each. These are similar to two ends
of a pipe - but the actual pipe does not yet exist.
19
JFree Chart
FreeChart is a free 100% Java chart library that makes it easy for developers to
display professional quality charts in their applications. JFreeChart's extensive
feature set includes:
A flexible design that is easy to extend, and targets both server-side and client-side
applications;
Support for many output types, including Swing components, image files (including
PNG and JPEG), and vector graphics file formats (including PDF, EPS and SVG);
1. Map Visualizations
Sourcing freely redistributable vector outlines for the countries of the world,
states/provinces in particular countries (USA in particular, but also other areas);
Implement a new (to JFreeChart) feature for interactive time series charts --
- to display a separate control that shows a small version of ALL the time series
20
data, with a sliding "view" rectangle that allows you to select the subset of the time
series data to display in the main chart.
3. Dashboards
4. Property Editors
21
1. General J2ME architecture
22
Introduction In this section, we will go over some considerations you need to
keep in mind when developing applications for smaller devices. We'll take a look at
the way the compiler is invoked when using J2SE to compile J2ME applications.
Finally, we'll explore packaging and deployment and the role preverification plays in
this process.
Smaller is better. This consideration should be a "no brainer" for all developers.
Smaller applications use less memory on the device and require shorter installation
times. Consider packaging your Java applications as compressed Java Archive (jar)
files.
* Minimize run-time memory use. To minimize the amount of memory used at run
time, use scalar types in place of object types. Also, do not depend on the garbage
collector. You should manage the memory efficiently yourself by setting object
references to null when you are finished with them. Another way to reduce run-time
memory is to use lazy instantiation, only allocating objects on an as-needed basis.
Other ways of reducing overall and peak memory use on small devices are to
release resources quickly, reuse objects, and avoid exceptions.
4.Configurations overview
23
* Connected Limited Device Configuration (CLDC) is used specifically with the
KVM for 16-bit or 32-bit devices with limited amounts of memory. This is the
configuration (and the virtual machine) used for developing small J2ME applications.
Its size limitations make CLDC more interesting and challenging (from a
development point of view) than CDC. CLDC is also the configuration that we will
use for developing our drawing tool application. An example of a small wireless
device running small applications is a Palm hand-held computer.
5.J2ME profiles
A skeleton profile upon which you can create your own profile, the Foundation
Profile, is available for CDC.
Profile 1: KJava
KJava is Sun's proprietary profile and contains the KJava API. The KJava profile is
built on top of the CLDC configuration. The KJava virtual machine, KVM, accepts
the same byte codes and class file format as the classic J2SE virtual machine.
24
KJava contains a Sun-specific API that runs on the Palm OS. The KJava API has a
great deal in common with the J2SE Abstract Windowing Toolkit (AWT). However,
Profile 2: MIDP
MIDP is geared toward mobile devices such as cellular phones and pagers. The
MIDP, like KJava, is built upon CLDC and provides a standard run-time environment
that allows new applications and services to be deployed dynamically on end user
devices. MIDP is a common, industry-standard profile for mobile devices that is not
dependent on a specific vendor. It is a complete and supported foundation for mobile
application
development. MIDP contains the following packages, the first three of which are
core CLDC packages, plus three MIDP-specific packages.
* java.lang
* java.io
* java.util
* javax.microedition.io
* javax.microedition.lcdui
* javax.microedition.midlet
* javax.microedition.rms
25
CHAPTER 4
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and
those steps are necessary to put transaction data in to a usable form for processing
can be achieved by inspecting the computer to read data from a written or printed
document or it can occur by having people keying the data directly into the system.
The design of input focuses on controlling the amount of input required, controlling
the errors, avoiding delay, avoiding extra steps and keeping the process simple. The
input is designed in such a way so that it provides security and ease of use with
retaining the privacy. Input Design considered the following things:
➢ Methods for preparing input validations and steps to follow when error
occur.
OBJECTIVES
26
3.When the data is entered it will check for its validity. Data can be entered with
the help of screens. Appropriate messages are provided as when needed so that
the user will not be in maize of instant. Thus, the objective of input design is to create
an input layout that is easy to follow
A quality output is one, which meets the requirements of the end user and presents
the information clearly. In any system results of processing are communicated to
the users and to other system through outputs. In output design it is determined how
the information is to be displaced for immediate need and also the hard copy output.
It is the most important and direct source information to the user. Efficient and
intelligent output design improves the system’s relationship to help user decision-
making.
The output form of an information system should accomplish one or more of the
following objectives.
❖ Future.
❖ Trigger an action.
❖ Confirm an action.
27
4.3 RESOURCE REQUIREMENT
SYSTEM REQUIREMENTS:
HARDWARE REQUIREMENTS:
PROPOSED SYSTEM
Aiming at this goal, this project is to develop an e- book store where books
can be bought from the comfort of home through the Internet. An online book
store is a virtual store on the Internet where student can browse the catalog
and select books of interest. The proposed method can find the underlying
results over real dataset.
28
4.5 SYSTEM ARCHITECTURE
Modules:
1.Admin
2.Librarian
3.Student
ADMIN
1. LOGIN
2. ADD LIBRARIAN
29
7. LOGOUT
LIBRARIAN
1. LOGIN
2. ADD CATALOGS
3. ADD BOOKS
4. ADD E-LINK
6. LOGOUT
STUDENT
1. REGISTER
2. LOGIN
3. SEARCH BOOK
5. LOGOUT
30
4.7 UML DIAGRAMS
31
Software system meets its requirements and user expectations and does not fail in
an unacceptable manner. There are various types of test. Each test type addresses
a specific testing requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .it is done after the completion of an
individual unit before integration. This is a structural testing, that relies on knowledge
of its construction and is invasive. Unit tests perform basic tests at component level
and test a specific business process, application, and/or system configuration.
Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected
results.
Integration testing
Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is more
concerned with the basic outcome of screens or fields. Integration tests demonstrate
that although the components were individually satisfaction, as shown by
successfully unit testing, the combination of components is correct and consistent.
Integration testing is specifically aimed at exposing the problems that arise from
the combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are
available as specified by the business and technical requirements, system
documentation, and user manuals.
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box.
you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.
33
Test strategy and approach
Field testing will be performed manually and functional tests will be written in
detail.
Test objectives
Features to be tested
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
34
4.12 SYSTEM STUDY
FEASIBILITY STUDY
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into
the research and development of the system is limited. The expenditures
must be justified. Thus the developed system as well within the budget and
this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.
TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that is, the
technical requirements of the system. Any system developed must not have
a high demand on the available technical resources. This will lead to high
demands on the available technical resources. This will lead to high demands
being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing
this system.
SOCIAL FEASIBILITY
35
efficiently. The user must not feel threatened by the system, instead must accept
it as a necessity. The level of acceptance by the users solely depends on the
methods that are employed to educate the user about the system and to make
him familiar with it. His level of confidence must be raised so that he is also able
to make some constructive criticism, which is welcomed, as he is the final user
of the system.
A quality online bookstore will have a good product selection, an easy-to-use -yet
comprehensive- website, a variety of shipping options, a number of payment
options, excellent customer support and a strong return policy. A good product
selection is critical to any online bookstore.
In the future, we will try to cover all the states and cities till now we have covered it
at a very small scale. We will also introduce new features such as Author videos
and reviews so that users can get more satisfaction about his deal.
36
CHAPTER 5
This chapter covers the system tests and results. This are demonstrated
using a number of screen shots. Library Book Management System aimed at
accomplishing a number of tasks. The system met its accomplishments and the
following section looks at this tasks and how they are accomplished.
LBMS has been designed and developed with high security standards. A
number of security levels have been designed to limit privileges according to a user
type. Users can access a page depending on the security levels given to them.
These levels determine the various rights and operations a user can carry out on
the system. The levels include; the librarian access levels and the members access
levels.
Thus shows the Library Book Management System’s homepage. All the
users login to the system from this page. A user clicks on the sign in button where
the login form appears enabling them to carry on with this process.
HOME PAGE
37
ADMIN MODULE
LOGIN
ADD LIBRARIAN
38
MANAGE ALL LIBRARIAN
39
VIEW ALL FEEBACKS GIVEN BY STUDENTS
LIBRIRAN MODULE
LOGIN PAGE
40
ADD CATALOG
ADD BOOKS
41
ADD BOOK E-LINK
42
STUDENT MODULE
43
VIEW SEARCH BOOK DETAILS
44
FEEDBACK
45
CHAPTER 6
6.1 CONCULSION:
6.2 REFERENCES:
4.Zhao, P., Han, J., and Sun, Y., “P-rank: a comprehensive structural similarity
measure over information networks”[C]. In Proc. of CIKM, 2009, pp. 553–562.
5. Wensi Xi, Edward A. Fox, Weiguo Fan, Benyu Zhang, Zheng Chen, Jun Yan,
Dong Zhuang. SimFusion: measuring similarity using unified relationship matrix.
SIGIR 2005: 130-137.
6.Fogaras D., Racz B., “Scaling link-based similarity search”[C]. In Proc. of WWW,
2005: 641-650.
7. Y.Z. Cai, G. Cong, X. Jia, H.Y. Liu, J. He., “Efficient Algorithms for Computing
Link based Similarity in Real World Networks”.
46
8.Ms. Pragati Bagmare1 , Ms. Shraddha Girhepunje2 , Ms. Priya Bisen, “Research
Paper on Online Bookshop Management System”, International Journal for
Research in Applied Science & Engineering Technology (IJRASET), Volume 5.,
Issue 4., 2017, page no. 115-117.
9.Fatin Najwa Binti Abdullah Sani1 , Hani Malini binti Majek2 , Umairah binti Ahmad
Khairudin3 , Abdul Rahman bin Ahmad Dahlan4, “e-Bookstore: Opening
47
APPENDIX
SAMPLE CODING
ADMIN LOGIN
48
//Create button cancel
JButton cancelBtn = new JButton("Cancel");
//Setting up the background color of the button.
cancelBtn.setBackground(new Color(124, 85, 227));
//Setting up the foreground color of the button.
cancelBtn.setForeground(Color.white);
//Performing action on button.
loginBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String username = usernameTF.getText();
String password = passwordTF.getText();
//If username is empty
if (username.isEmpty()) {
JOptionPane.showMessageDialog(null, "Please enter username"); //Display
dialog box with the message
} //If password is empty
else if (password.isEmpty()) {
JOptionPane.showMessageDialog(null, "Please enter password"); //Display dialog
box with the message
} //If both the fields are present then to login the user, check whether the user
exists already
else {
//Connect to the database
Connection connection = connect();
try {
Statement stmt = connection.createStatement();
String st = ("SELECT * FROM USERS WHERE USERNAME='" + username + "'
AND PASSWORD='" + password + "'"); //Retrieve username and passwords from
users
ResultSet rs = stmt.executeQuery(st); //Execute query
if (rs.next() == false) { //Move pointer below
JOptionPane.showMessageDialog(null, "Invalid Username/Password!"); //Display
Message
} else {
loginFrame.dispose();
rs.beforeFirst(); //Move the pointer above
while (rs.next()) {
String admin = rs.getString("user_type"); //user is admin
System.out.println(admin);
String UID = rs.getString("UID"); //Get user ID of the user
if (admin.equals("1")) { //If boolean value 1
//Redirecting to Librarian Frame
49
librarian_frame();
} else {
//Redirecting to User Frame for that user ID
user_frame(UID);
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
});
cancelBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
loginFrame.dispose();
}
});
//Adding all login components in the login frame of java library management
system.
loginFrame.add(l1);
loginFrame.add(usernameTF);
loginFrame.add(l2);
loginFrame.add(passwordTF);
loginFrame.add(loginBtn);
loginFrame.add(cancelBtn);
//Setting size of frame (width, height)
loginFrame.setSize(330, 180);//400 width and 500 height
//Setting layout of the frame
loginFrame.setLayout(new GridLayout(3, 2));
//Setting frame visible to the user
loginFrame.setVisible(true);
//Setting frame non-resizable
loginFrame.setResizable(false);
}
50
LIBRIRAN MODULE
//Creating Button
JButton view_books_btn = new JButton("View Books");
//Creating frame.
JFrame viewBooksFrame = new JFrame("Books Available");
//Connection to Database
Connection connection = connect();
//Executing query
ResultSet rs = stmt.executeQuery(sql);
51
//Setting background colour of the table
book_list.setBackground(new Color(51, 35, 85));
book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
book_list.setFillsViewportHeight(true);
book_list.setFocusable(false);
scrollBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR
_AS_NEEDED);
scrollBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_
NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int book_id = rs.getInt(1);
String book_isbn = rs.getString(2);
String book_name = rs.getString(3);
String book_publisher = rs.getString(4);
String book_edition = rs.getString(5);
String book_genre = rs.getString(6);
int book_price = rs.getInt(7);
int book_pages = rs.getInt(8);
//Adding fetched data in model
bookModel.addRow(new Object[]{book_id, book_isbn, book_name,
book_publisher, book_edition, book_genre, book_price, book_pages});
}
52
});
//Creating button
JButton view_users_btn = new JButton("View Users");
//Creating frame.
JFrame viewUsersFrame = new JFrame("Users List");
//Connection to database
Connection connection = connect();
//Executing query
ResultSet rs = stmt.executeQuery(sql);
users_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
users_list.setFillsViewportHeight(true);
53
users_list.setBackground(new Color(51, 35, 85));
scrollUser.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR
_AS_NEEDED);
scrollUser.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_
NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int uid = rs.getInt(1);
String user_name = rs.getString(2);
int user_type = rs.getInt(4);
if (user_type == 1) {
//Checking if it is 1 then it is admin
userModel.addRow(new Object[]{uid, user_name, "ADMIN"});
} else {
//Else it will be user
userModel.addRow(new Object[]{uid, user_name, "USER"});
}
}
}
});
//Creating button
JButton view_issued_books_btn = new JButton("View Issued Books");
54
view_issued_books_btn.setBackground(new Color(51, 35, 85));
//Creating button
JFrame issuedBooksFrame = new JFrame("Issued Books List");
//Connection to database
Connection connection = connect();
//Executing query
ResultSet rs = stmt.executeQuery(sql);
issue_book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
issue_book_list.setFillsViewportHeight(true);
issue_book_list.setFocusable(false);
55
//Creating scrollbars for table
JScrollPane scrollIssuedBook = new JScrollPane(issue_book_list);
scrollIssuedBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCRO
LLBAR_AS_NEEDED);
scrollIssuedBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBA
R_AS_NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int iid = rs.getInt(1);
int uid = rs.getInt(2);
int bid = rs.getInt(3);
String issue_date = rs.getString(4);
int period = rs.getInt(5);
//Adding fetched data in model
issuedBookModel.addRow(new Object[]{iid, uid, bid, issue_date,
period});
}
//Creating button
JButton view_returned_books_btn = new JButton("View Returned Books");
56
public void actionPerformed(ActionEvent e) {
//Creating button.
JFrame returnedBooksFrame = new JFrame("Returned Books List");
//Executing query.
ResultSet rs = stmt.executeQuery(sql);
returned_book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
returned_book_list.setFillsViewportHeight(true);
returned_book_list.setFocusable(false);
scrollReturnedBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SC
ROLLBAR_AS_NEEDED);
57
scrollReturnedBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLB
AR_AS_NEEDED);
while (rs.next()) {
//Fetching the data from the mysql database.
int rid = rs.getInt(1);
int bid = rs.getInt(2);
int uid = rs.getInt(3);
String returned_date = rs.getString(4);
int fine = rs.getInt(5);
//Creating button
JButton add_user_btn = new JButton("Add User");
//Creating frame
JFrame add_user_frame = new JFrame("Enter User Details"); //Frame
to enter user details
58
//Creating label
JLabel l1 = new JLabel("Username", SwingConstants.CENTER);
//Setting up opaque so that label component paints every pixel within its
bounds.
l1.setOpaque(true);
//Creating label
JLabel l2 = new JLabel("Password", SwingConstants.CENTER);
//Setting up opaque so that label component paints every pixel within its
bounds.
l2.setOpaque(true);
//Creating textfield
JTextField add_username_tf = new JTextField();
//Creating textfield
JPasswordField add_password_tf = new JPasswordField();
//Aligning center
user_type_radio1.setHorizontalAlignment(SwingConstants.CENTER);
59
//Setting Background Colour of the radiobutton.
user_type_radio1.setBackground(new Color(51, 35, 85));
//Aligning center
user_type_radio2.setHorizontalAlignment(SwingConstants.CENTER);
//Creating button.
JButton create_btn = new JButton("Create");
//Creating button.
JButton user_entry_cancel_btn = new JButton("Cancel");
60
//Connection to database.
Connection connection = connect();
try {
//Creating statement
Statement stmt = connection.createStatement();
61
add_user_frame.add(create_btn);
add_user_frame.add(user_entry_cancel_btn);
//Creating button.
JButton add_book_btn = new JButton("Add Book");
//Creating Frame.
JFrame book_frame = new JFrame("Enter Book Details");
//Creating labels
JLabel l1, l2, l3, l4, l5, l6, l7;
//Setting up opaque so that label component paints every pixel within its
bounds.
l1.setOpaque(true);
62
l2 = new JLabel("Name", SwingConstants.CENTER);
//Setting up opaque so that label component paints every pixel within its
bounds.
l2.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l3.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l4.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l5.setOpaque(true);
63
//Setting up opaque so that label component paints every pixel within its
bounds.
l6.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l7.setOpaque(true);
//Creating textfield.
JTextField book_isbn_tf = new JTextField();
//Creating textfield
JTextField book_name_tf = new JTextField();
//Creating textfield.
JTextField book_publisher_tf = new JTextField();
//Creating textfield.
64
JTextField book_edition_tf = new JTextField();
//Creating textfield.
JTextField book_genre_tf = new JTextField();
//Creating textfield.
JTextField book_price_tf = new JTextField();
//Creating textfield.
JTextField book_pages_tf = new JTextField();
//Creating button.
JButton create_btn = new JButton("Submit");
//Creating button.
JButton add_book_cancel_btn = new JButton("Cancel");
65
//Setting the foreground colour of the button.
add_book_cancel_btn.setForeground(Color.white);
//Connection to database.
Connection connection = connect();
try {
//Creating statement
Statement stmt = connection.createStatement();
66
});
//Creating button
JButton add_issue_book_btn = new JButton("Issue Book");
//Creating frame.
JFrame issue_book_frame = new JFrame("Enter Details");
67
//Creating panel.
JPanel pickerPanel = new JPanel();
//Creating a datepicker.
JXDatePicker picker = new JXDatePicker();
//Formatting datepicker.
picker.setFormats(new SimpleDateFormat("dd.MM.yyyy"));
//Creating labels
JLabel l1, l2, l3, l4;
l1 = new JLabel("Book ID", SwingConstants.CENTER);
//Setting up opaque so that label component paints every pixel within its
bounds.
l1.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l2.setOpaque(true);
68
//Setting up opaque so that label component paints every pixel within its
bounds.
l3.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l4.setOpaque(true);
//Creating textfield.
JTextField bid_tf = new JTextField();
//Creating textfield.
JTextField uid_tf = new JTextField();
//Creating textfield.
JTextField period_tf = new JTextField();
69
//Creating button.
JButton create_btn = new JButton("Submit");
//Creating button.
JButton issue_book_cancel_btn = new JButton("Cancel");
//Formatting date.
DateFormat oDateFormat = new SimpleDateFormat("dd-MM-
yyyy");
String issued_date = oDateFormat.format(oDate);
try {
//Creating Statement
Statement stmt = connection.createStatement();
70
JOptionPane.showMessageDialog(null, "Book Issued!");
issue_book_frame.dispose();
issue_book_cancel_btn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
issue_book_frame.dispose();
}
});
//Creating button.
JButton add_return_book_btn = new JButton("Return Book");
71
add_return_book_btn.setForeground(Color.white);
//Creating frame.
JFrame returnBookFrame = new JFrame("Enter Details");
//Setting up opaque so that label component paints every pixel within its
bounds.
l1.setOpaque(true);
//Setting up opaque so that label component paints every pixel within its
bounds.
l2.setOpaque(true);
//Creating labels.
JLabel l3 = new JLabel("Return Date(DD-MM-YYYY)",
SwingConstants.CENTER);
//Setting up opaque so that label component paints every pixel within its
bounds.
l3.setOpaque(true);
72
//Setting up opaque so that label component paints every pixel within its
bounds.
l4.setOpaque(true);
//Creating textfield.
JTextField bid_tf = new JTextField();
//Creating textfield.
JTextField uid_tf = new JTextField();
//Creating a datepicker.
JXDatePicker picker = new JXDatePicker();
//Creating textfield.
JTextField fine_tf = new JTextField();
73
//Adding datepicker in panel.
pickerPanel.add(picker);
//Creating button.
JButton return_book_btn = new JButton("Return");
//Creating button.
JButton cancel_book_btn = new JButton("Cancel");
try {
//Connection to database
Connection connection = connect();
//Creating Statement
Statement stmt = connection.createStatement();
74
stmt.executeUpdate("INSERT INTO
returned_books(bid,uid,return_date,fine) VALUES ('" + bid + "','" + uid + "','" +
return_date + "'," + fine + ")");
75
librarianFrame.setLayout(new GridLayout(2, 4));
STUDENT MODULE
//Creating button
JButton view_books_btn = new JButton("View Books");
view_books_btn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//Creating Frame.
JFrame viewBooksUserFrame = new JFrame("Books Available");
//Connection to database.
Connection connection = connect();
76
//Query for retrieving data from database.
String sql = "select * from books";
try {
//Creating Statement.
Statement stmt = connection.createStatement();
//Executing query.
ResultSet rs = stmt.executeQuery(sql);
book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
book_list.setFillsViewportHeight(true);
book_list.setFocusable(false);
scrollBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR
_AS_NEEDED);
scrollBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_
NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int book_id = rs.getInt(1);
String book_isbn = rs.getString(2);
String book_name = rs.getString(3);
String book_publisher = rs.getString(4);
77
String book_edition = rs.getString(5);
String book_genre = rs.getString(6);
int book_price = rs.getInt(7);
int book_pages = rs.getInt(8);
//Adding fetched data in model
bookModel.addRow(new Object[]{book_id, book_isbn, book_name,
book_publisher, book_edition, book_genre, book_price, book_pages});
}
//Creating Button.
JButton view_user_issued_books_btn = new JButton("Issued Books");
//Creating frame
JFrame viewUserIssuedBooksFrame = new JFrame("My Issued Books");
//Storing userid
int userid = Integer.parseInt(UID);
//Connection to database
Connection connection = connect();
//Database Query
78
String sql = "select issued_books.iid as iid, issued_books.bid as bid,
issued_books.uid as uid,"
+ " books.book_isbn as book_isbn, books.book_name as
book_name, books.book_publisher as book_publisher, "
+ "books.book_edition as book_edition, books.book_genre as
book_genre, books.book_price as book_price,"
+ " books.book_pages as book_pages, issued_books.issued_date
as issued_date, issued_books.period as period from books,"
+ "issued_books where books.bid=issued_books.bid and
issued_books.uid=" + userid;
try {
//Creating statement
Statement stmt = connection.createStatement();
//Executing query
ResultSet rs = stmt.executeQuery(sql);
issued_book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
issued_book_list.setFillsViewportHeight(true);
issued_book_list.setFocusable(false);
79
scrollIssuedBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCRO
LLBAR_AS_NEEDED);
scrollIssuedBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBA
R_AS_NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int iid = rs.getInt(1);
int bid = rs.getInt(2);
int uid = rs.getInt(3);
String book_isbn = rs.getString(4);
String book_name = rs.getString(5);
String book_publisher = rs.getString(6);
String book_edition = rs.getString(7);
String book_genre = rs.getString(8);
int book_price = rs.getInt(9);
int book_pages = rs.getInt(10);
String issued_date = rs.getString(11);
int period = rs.getInt(12);
//Adding fetched data in model
bookModel.addRow(new Object[]{iid, bid, uid, book_isbn,
book_name, book_publisher, book_edition, book_genre, book_price, book_pages,
issued_date, period});
}
//Adding scrollbars.
viewUserIssuedBooksFrame.add(scrollIssuedBook);
//Creating Button
JButton view_user_returned_books_btn = new JButton("My Returned
Books");
80
view_user_returned_books_btn.setBackground(new Color(51, 35, 85));
//Creating frame
JFrame viewUserReturnedBooksFrame = new JFrame("My Returned
Books");
//Storing userid
int userid = Integer.parseInt(UID);
//Connection to database
Connection connection = connect();
try {
//Creating Statement
Statement stmt = connection.createStatement();
//Executing query
ResultSet rs = stmt.executeQuery(sql);
81
//Adding model to the table component
returned_book_list.setModel(bookModel);
returned_book_list.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
returned_book_list.setFillsViewportHeight(true);
returned_book_list.setFocusable(false);
scrollIssuedBook.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCRO
LLBAR_AS_NEEDED);
scrollIssuedBook.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBA
R_AS_NEEDED);
while (rs.next()) {
//Fetching the data from mysql database
int rid = rs.getInt(1);
int bid = rs.getInt(2);
int uid = rs.getInt(3);
String book_isbn = rs.getString(4);
String book_name = rs.getString(5);
String book_publisher = rs.getString(6);
String book_edition = rs.getString(7);
String book_genre = rs.getString(8);
int book_price = rs.getInt(9);
int book_pages = rs.getInt(10);
String returned_date = rs.getString(11);
int fine = rs.getInt(12);
//Adding fetched library management data in model
bookModel.addRow(new Object[]{rid, bid, uid, book_isbn,
book_name, book_publisher, book_edition, book_genre, book_price, book_pages,
returned_date, fine});
}
//Adding scrollbars.
viewUserReturnedBooksFrame.add(scrollIssuedBook);
82
//Setting up the frame visible.
viewUserReturnedBooksFrame.setVisible(true);
83