Library Management System Report
Library Management System Report
CHAPTER-1
1-Introduction--------------------------------------------------------------- 3
1.1 JAVA--------------------------------------------------------------------------- 3
1.1.1 Significant Language Feature----------------------------------------- 5
1.1.2 Java Code----------------------------------------------------------------- 6
1.2 Swing(JAVA)----------------------------------------------------------------- 6
1.2.1 A Basic Example---------------------------------------------------------- 7
1.2.2 Component Which We used in our Project------------------------- 7
1.3 DataBase----------------------------------------------------------------------- 8
1.4 MySQL-------------------------------------------------------------------------- 8
1.5 WAMP Server----------------------------------------------------------------- 9
1.6 PhpMyAdmin------------------------------------------------------------------- 9
1.7 JTattoo--------------------------------------------------------------------------- 9
CHAPTER-2
2 System Analysis and database Design-------------------------- 10
2.1 ER Diagram------------------------------------------------------------------ 10
2.2 Functional Requirement------------------------------------------------- 11
2.3 Non functional Requirement--------------------------------------------- 12
1|Page
2.4 Use Case Diagram--------------------------------------------------------- 13
CHAPTER-3
3 System Implementation-------------------------------------------- 14
3.1 Database Design--------------------------------------------------------- 14
3.2 Database Connectivity------------------------------------------------- 15
3.3 Implementation of Database operations------------------------- 16
3.4 Stored Procedure------------------------------------------------------- 17
3.5 Trigger---------------------------------------------------------------------- 19
CHAPTER-4
4 Result and Discussion-------------------------------------------- 20
CHAPTER-5
5 Conclusion----------------------------------------------------------- 23
2|Page
CHAPTER 1
INTRODUCTION
In the following sections, a brief introduction about the tools, languages and
the databases used to develop the project are discussed.
1.1 JAVA
3|Page
It is intended to let application developers "write once, run anywhere"
(WORA), meaning that compiled Java code can run on all platforms that
support Java without the need for recompilation.
Java applications are typically compiled to byte code that can run on any Java
virtual machine (JVM) regardless of computer architecture
One design goal of Java is portability, which means that programs written for
the Java platform must run similarly on any combination of hardware and
operating system with adequate runtime support.
This is achieved by compiling the Java language code to an intermediate
representation called Java byte code, instead of directly to architecture-
specific machine code.
Java byte code instructions are analogous to machine code, but they are
intended to be executed by a virtual machine (VM) written specifically for the
host hardware.
End users commonly use a Java Runtime Environment (JRE) installed on
their own machine for standalone Java applications, or in a web browser for
Java applets.
Standard libraries provide a generic way to access host-specific features such
as graphics, threading, and networking.
The use of universal byte code makes porting simple. However, the overhead
of interpreting byte code into machine instructions made interpreted
programs almost always run more slowly than native executables. Just-in-
time (JIT) compilers that compile byte codes to machine code during runtime
were introduced from an early stage.
Java itself is platform-independent and is adapted to the particular platform it
is to run on by a Java virtual machine for it, which translates the Java byte
code into the platform's machine language.
4|Page
1.1.1 Significant Language Features
The Java programming language was developed and re-designed for use on
the Internet. In the internet domain, Java’s popularity has increased
tremendously, especially on the server side of the Internet. Nowadays, there
are a large number of Java experts who strive for the enhancement and
improvement of Java development. For beginners who are interested in
learning Java, the numerous Java tutorials available online are good to start
with. Java tutorials and Java tips are the best resources for learning and
improvising in Java.
5|Page
1.1.2 JAVA Code
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Prints the string to the
console.
}
}
We are using swings in our project which is GUI Widget Toolkit for
JAVA.So will see about swings
1.2 Swing(JAVA)
6|Page
1.2.1 A basic example
The following is a rather simple Swing-based program. It displays a window (a JFrame ) containing a
label and a button.
JButton:
JButton class provides functionality of a button. JButton class has three
constructors. It allows a button to be created using icon, a string or both.
JButton supports ActionEvent. When a button is pressed an ActionEvent is
generated
JTextField:
JTextField is used for taking input of single line of text. It is most widely used
text component. It has three constructors,
JComboBox:
Combo box is a combination of text fields and drop-down
list.JComboBox component is used to create a combo box in Swing.
JTable:
With the JTable class you can display tables of data, optionally allowing the
user to edit the data. JTable does not contain or cache data; it is simply a view of
your data. Here is a picture of a typical table displayed within a scroll pane:
7|Page
1.3 Database:
There are different types of DBMS ranging from small systems that run on
personal computers to huge systems that run on mainframes.
The following are main examples of database applications:
• Computerized library systems
• Automated teller machines
• Flight reservation systems
• Computerized parts inventory systems
1.4 MYSQL:
MySql is a powerful database. It's very good and free of charge. Many
developers in the world selected mysql and php for developing their website.
The MySQL database has become the world's most popular open source
database because of its consistent fast performance, high reliability and ease
of use. It's used in more than 6 million installations ranging from large
corporations to specialized embedded applications on every continent in the
world. (Yes, even Antarctica!)
8|Page
1.5 WAMP Server:
1.6 phpMyAdmin:
1.7 JTattooo:
JTattoo consists of several different Look and Feels for Swing applications. All
of them enables developers to improve their application with an excellent user
interface. So JTattoo opens desktop applications the door to end users who are
unfortunate with the Look and Feels shipped with the standard JDK.
9|Page
CHAPTER 2
System Analysis and Design
In this chapter, a complete description of the project development are discussed.
The requirement of the project identified are showcased. The database design is done
Using High-Level Conceptual Data Models
Book_ID
Publisher
Contains
Book_ID B_Name
Publisher
Branch Semester
Manages
ReturnB
Student_ID
Course
Add
Year
Edition
S_Name
F_Name
Pages DOR
Price
DOI
Book_Id
Branch Edition
Course FName
Semester Branch
Name
Student Course
Year
Issue Pages
Father_Na Issue_date
me Student_id
Name Price
Student_id
Publisher
Year
sname Semester
10 | P a g e
Account Maintains N number of Books
Book is maintained by M number of accounts
Librarian module
Librarian can able to add new Student.
Librarian can able to add New Books.
Librarian can able to see the Statistics.
Librarian can able to issue Book.
Librarian can able to get back the issued Books.
11 | P a g e
2.3 Non- Functional Requirements
Non-functional requirements it specifies the canon of the articular process
not the particular judgment of the system and particular behavior of the
process. Non-functional requirements define how the system work.
12 | P a g e
2.4 Use Case Diagram
The use case diagrams usually refer to behavioral diagrams helps
people to understand the interaction between user and system. Use case
diagram identify different users of the system.It is used to define some set of
actions, which is called as use cases.Actors are the result of some valuable use
cases.Use case figures are also called as unified modeling language
Checking Statistics
13 | P a g e
CHAPTER 3
SYSTEM IMPLEMENTATION
Account Table
14 | P a g e
3.2 Database Connectivity
import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;
try {
Class.forName("com.mysql.jdbc.Driver");
Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost/lib", "root", "");
return conn;
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
return null;
15 | P a g e
3.3 Implementation of Database Operations
16 | P a g e
3.4 Stored Procedure
java.sql.CallableStatement cst=conn.prepareCall(sql);
rs=cst.executeQuery();
jTable2.setModel(DbUtils.resultSetToTableModel(rs));
17 | P a g e
This Stored Procedure helps to display student details in statistics table.
String sql="{call select_student}";
java.sql.CallableStatement cst=conn.prepareCall(sql);
rs=cst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
18 | P a g e
3.5 Trigger
This trigger helps to store the issued books details like Book ID,Issue
date,Student Name and Student ID in the new Table oldissuedata
After Returning Book the data will be deleted from issue table;so that details we are
storing with this trigger
19 | P a g e
CHAPTER 4
Results and Discussion
In this chapter the results of the project are described. The snapshot of of the project showing
various functionalities like insert, delete, and retrieval are showcased.
Login Frame
If you have an account you can simply enter your user name & password.
20 | P a g e
Home Frame
21 | P a g e
Statistics Frame
This frame shows all the student and book data of library
22 | P a g e
CHAPTER 5
CONCLUSION
Library database management System helps us in centralizing the data used for managing the
tasks performed in a Library. The theoritical process involved in database design have been
practically implemented. The project provides user friendly interface for the users to interact
with the database. All database operations including insertion, deletion, and Retrievals are
supported along with support for trigger and stored procedure.
23 | P a g e