[go: up one dir, main page]

0% found this document useful (0 votes)
470 views23 pages

Library Management System Report

The document provides an overview of the tools and technologies used to develop a Library Management System using Java and Swing. It discusses Java features like portability and object-oriented design. It also describes the Swing GUI widget toolkit and components used in the project like JButton, JTextField, JComboBox and JTable. The project uses MySQL for the database and WAMP as the development server.

Uploaded by

UdupiSri group
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
470 views23 pages

Library Management System Report

The document provides an overview of the tools and technologies used to develop a Library Management System using Java and Swing. It discusses Java features like portability and object-oriented design. It also describes the Swing GUI widget toolkit and components used in the project like JButton, JTextField, JComboBox and JTable. The project uses MySQL for the database and WAMP as the development server.

Uploaded by

UdupiSri group
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Library Management System

SL. NO. CONTENTS Page No

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

Library Management System is a Database application which is helpful for


Librarians of college or any public library . This mini-Project is implemented using
JAVA(Swings) .

Operations supported by the application are insert, delete a0nd retrieve.This


will allow n number of librarian to create an account and that librarian has rights to
 Add new student
 Add new books
 Issue book to a particular student
 Taking book back from student

In the following sections, a brief introduction about the tools, languages and
the databases used to develop the project are discussed.

1.1 JAVA

Java is a general-purpose computer programming language that


is concurrent, class-based, object-oriented  and specifically designed to have
as few implementation dependencies as possible.

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.

Java was developed to achieve 5 main goals. They are

 It should be simple, object-oriented, distributed and easy to learn.


 It should be robust and secure.
 It should be independent of a given computer architecture or platform.
 It should be possible to write an interpreter for the language. The
language should also support parallelism and use dynamic typing.

4|Page
1.1.1 Significant Language Features

Java has significant advantages compared to other languages. Java language is


easy to use and therefore easy to write, compile, debug. Moreover, it is easier
to learn when compared to other programming languages. Since Java is
object-oriented, it allows you to create modular programs and reusable codes.
Platform-independent, Java is a robust language. The language lays more
importance on early checking for errors, since Java compilers can detect many
problems during the time of execution of an application. Java is
multithreaded, since it has the capability for a program to perform several
tasks simultaneously within the same program. Java Development has gained
a significant position in the industry with programmers and developers
finding it easier and more effective than many other languages. 

Java applications are designed to be compiled and then interpreted at


runtime, unlike the conventional programming languages, which can either
compile source code to native code or interpret the source code. The language
itself has borrowed the syntax from C and C++. Java considers security as a
part of its design. The Java language, its compiler, interpreter, and runtime
environment are all developed with security. Writing network programs in
Java is similar to sending and receiving data to and from a file. 

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

The traditional "Hello, world!" program can be written in Java as:

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)

Swing was developed to provide a more sophisticated set of


GUI components than the earlier Abstract Window Toolkit (AWT). Swing
provides a native look and feel that emulates the look and feel of several
platforms, and also supports a pluggable look and feel that allows applications
to have a look and feel unrelated to the underlying platform. It has more
powerful and flexible components than AWT. In addition to familiar
components such as buttons, check boxes and labels, Swing provides several
advanced components such as tabbed panel, scroll panes, trees, tables, and
lists.
Unlike AWT components, Swing components are not implemented by
platform-specific code. Instead, they are written entirely in Java and therefore
are platform-independent. The term "lightweight" is used to describe such an
element.
Though Swing is intended to be replaced by JavaFX, it will remain part of the
Java SE specification for the foreseeable future

6|Page
1.2.1 A basic example

The basic example code running on Windows 7

The following is a rather simple Swing-based program. It displays a window (a  JFrame ) containing a
label and a button.

1.2.2 Components which we used in our project

 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:

A database is a collection of information that is organized so that it can


easily be accessed, managed, and updated. In one view, databases can be
classified according to types of content: bibliographic, full-text, numeric, and
images.Database software systems are programmed in SQL, and examples
include Microsoft SQL Server, MySQL, Oracle SAP HANA and FoxPro.

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:

The acronym WAMP refers to a set of free (open source) applications,


combined with Microsoft Windows, which are commonly used in Web
server environments. The WAMP stack provides developers with the four key
elements of a Web server:  an operating system, database, Web server and
Web scripting software. The combined usage of these programs is called a
server stack. In this stack, Microsoft Windows is the operating system
(OS), Apache is the Web server, MySQL handles the database components,
while PHP, Python, or PERL represents the dynamic scripting languages.

1.6 phpMyAdmin:

phpMyAdmin is a free and open source administration tool


for MySQL and MariaDB. As a portable web application written primarily
in PHP, it has become one of the most popular MySQL administration tools,
especially for web hosting services.

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

2.1 ER-Diagram Pages


Name
Answer Password Price
Sec_Q
UserName
Name Edition
maintains
Account Book

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

 Account contain N return book details


 Return book details contained by M accounts

 Account Manages N issued books


 Issued books are managed by M accounts

 Account add N students


 Student will be added by M accounts

2.2 Functional Requirements


Functional requirements of a software project that interpret the function
of a part. It defines its functions, input and output. The typical functional
requirements includes:

Application contains 1 modules:


 Admin module

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.

 This application is developed to make Library operation easier to


Librarians so that it will save the time.

 This application work efficiently it works on all logical paths and


independently

 This application is available during all the time.

 This application reduces all the complexity during issuing and


Returning.

 Using of application is secure, because it display appropriate


Information about the Book,Student Details

 The system should capable to enhance with further technology in future


to improve its features compared to the existing system such as QR
Scanner etc.

 The system should be reliable and it should be related in all the


condition and it should be recoverable in all the situation or condition if
error occurs.

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

Insert New Student

Insert New Book

Issue and Take back Books


Librarian

Checking Statistics

 Librarian can insert new student


 Librarian can insert new Book
 Librarian can issue and take back books
 Librarian can check the status of book as well as student details

13 | P a g e
CHAPTER 3

SYSTEM IMPLEMENTATION

3.1 Database Design

Account Table

CREATE TABLE `account` (


 `UserName` varchar(100) NOT NULL,
 `Name` varchar(100) NOT NULL,
 `Password` varchar(100) NOT NULL,
 `Sec_Q` varchar(100) NOT NULL,
 `Answer` varchar(100) NOT NULL,
 PRIMARY KEY (`UserName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

14 | P a g e
3.2 Database Connectivity

import java.sql.Connection;

import java.sql.DriverManager;

import javax.swing.JOptionPane;

public class DbConnection {

public static Connection openConnection() {

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

To add New Student


String sql="insert into
student(Student_ID,Name,Father_Name,Course,Branch,Year,Semester) values
(?,?,?,?,?,?,?)";
try{
ps=conn.prepareStatement(sql);
ps.setString(1, jTextField1.getText());
ps.setString(2, jTextField2.getText());
ps.setString(3, jTextField3.getText());
ps.setString(4, (String)jComboBox1.getSelectedItem());
ps.setString(5, jTextField5.getText());
ps.setString(6, (String)jComboBox2.getSelectedItem());
ps.setString(7, (String)jComboBox3.getSelectedItem());
ps.execute();
JOptionPane.showMessageDialog(null, "New Student Registered !!!");
setVisible(false);
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}

16 | P a g e
3.4 Stored Procedure

This Stored Procedure helps to display book details in statistics table.


String sql="{call call_book}";

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

insert INTO oldissuedata (BName,Book_ID,issued,SNAME,Student_ID) VALUES


(old.Name,old.Book_ID,old.issue_date,old.SName,old.Student_ID)

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

 This is the login form for the library management system.

 If you have an account you can simply enter your user name & password.

 Then click the login button.

 If you don’t have an account you can sign up

 If you forgot your password then click on Forgot password

20 | P a g e
Home Frame

 This is the home frame for my library management system.


 There are 6 buttons
 New Book
 New Member
 Statistics
 Issue a Book
 Return a Book
 About

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

You might also like