Design and implementation of a Java-based library management system (with source code network disk link)


The source code is open source and can be obtained by yourself. The link is at the end of the article.

Summary

With the continuous development of information technology, library management systems have become an indispensable part of modern libraries. Traditional manual management methods can no longer meet the needs of library management because they lack efficiency and accuracy, and it is difficult to cope with the management of a large number of readers and books. According to the current situation of book management, designing an online book management system can make the work of library managers more convenient and make browsing books more convenient for users.
The system uses Java language as the basic language for development, uses MySQL database for data storage management, and uses Springboot as the back-end development architecture to implement library management, personnel management, loan and return management, and password modification. Book loss report, book inquiry and other functions. Through the automation, intelligence and personalized functions of the library management system, the efficiency and quality of library services can be improved and readers can be provided with more convenient and faster services.

Keywords: java; MySQL database; Springboot architecture; library management

1. Introduction

(1) Research background

With the advent of the digital age, library management methods also need to undergo corresponding changes. Traditional manual recording, borrowing and returning operations can no longer meet the needs of modern libraries. At the same time, as library collections continue to increase and the number of users increases, how to better manage and utilize these resources and improve management efficiency and service quality have become urgent issues in current library management.
Based on this background, the library management system came into being. This system uses computer technology and network technology to achieve comprehensive management of library resources, including book procurement, cataloging, classification, collection, borrowing, renewal, reservation, reminder, statistical analysis and other functions. At the same time, the system can provide readers with more convenient services such as inquiry, borrowing, renewal, reservation, feedback and suggestions, etc., and provides strong support for the library's digital management and services.
The research and application of library management systems are of great significance and value. On the one hand, it can effectively improve the management level and service quality of the library, and improve the social benefits of the library; on the other hand, it can also promote the application and development of computer technology and network technology in the library field, and promote the informatization of libraries. The process of construction. Therefore, the study of library management systems has become one of the hot topics in the library field today.

(2) Research status at home and abroad

At present, the research on library management system has become an important part of library information construction, and domestic and foreign scholars have made a lot of progress in its research.
Foreign library management system research is mainly concentrated in developed countries such as the United States, Britain, and Canada. These countries have high levels of library management and are also in a leading position in the research of library management systems. For example, the Library of Congress in the United States, the Library of the University of London in the United Kingdom, and the University of Ottawa Library in Canada have all adopted advanced library management systems.
Domestic research on library management systems started late, but many achievements have been made in recent years. For example, the "Tsinghua Book Retrieval System" developed by the Tsinghua University Library, the "Treasure No. 1" developed by the Beijing Normal University Library, and the "Shanghai Digital Library" developed by the Shanghai Library are all relatively advanced book management systems in the country. system.
In addition, current domestic and foreign library management system research mainly focuses on the following five directions: architectural design and technology development of library management systems, digital processing and management of library digital resources, library user Personalization and intelligence of services, analysis and management of book borrowing and usage behaviors, research on library information security and prevention technologies. In short, the research on library management systems has become an indispensable part of library information construction, and will continue to receive attention and in-depth research from domestic and foreign scholars in the future.

(3) Research significance

The library management system is the core and foundation of modern library information construction. Its significance is that the library management system can improve library service efficiency. Through the automation, intelligence and personalized functions of the library management system, the efficiency and quality of library services can be improved, providing readers with more convenient and faster services, and meeting the readers' growing reading needs. Can promote the construction and utilization of digital resources. With the advent of the digital age, the construction and utilization of library digital resources has become an important direction of development. The library management system can help libraries uniformly manage, classify, retrieve and utilize digital resources, and improve the utilization efficiency and value of digital resources. Can improve library management level. The library management system can help libraries achieve comprehensive management and monitoring of various documents such as books, journals, newspapers, etc., improve the library's management level and efficiency, reduce management costs, and avoid management loopholes and errors. Promote library informatization construction. The library management system is one of the infrastructures for library information construction. Its development and improvement will promote the entire library information construction process and inject new impetus and vitality into the library information construction. Promote exchanges and cooperation between libraries and society. Through the construction of a library management system, libraries can strengthen information exchange and cooperation with all sectors of society, provide better services to all sectors of society, and promote the integrated development of libraries and society.

2. Related technologies

(1) Java language

The Java language is an object-oriented programming language launched in 1995 by Sun Microsystems (now acquired by Oracle Corporation). The Java language can be applied to a variety of different platforms, including desktops, servers, and mobile devices, and is cross-platform, that is, the same Java program can run on different operating systems, such as Windows, Linux, etc.
The Java language was designed with security in mind. It provides a complete set of security mechanisms to prevent the execution of malicious code. Java also has a garbage collection mechanism that can automatically manage memory, avoiding problems caused by programmers' manual memory management and reducing the probability of program errors.

(2) MySQL database

MySQL is a popular relational database management system developed by the Swedish company MySQL AB. It is open source software and anyone can use and modify it for free. Now MySQL belongs to Oracle Corporation.
MySQL supports multiple operating system platforms, including Windows, Linux, UNIX, etc., and provides a wide range of APIs and tools, such as ODBC, JDBC, PHP, Perl, etc., allowing developers to easily Interact with and manage MySQL.
MySQL features include: support for large data sets. MySQL can handle large data sets and supports up to billions of data rows. Security, MySQL provides powerful security mechanisms, including user authentication, access control, encryption, etc. Reliability, MySQL has high availability, flexibility and scalability, and can meet the needs of various application scenarios. High performance, MySQL can efficiently handle a large number of concurrent requests, supporting high-speed reading and writing and fast querying. MySQL is widely used in various fields, such as web applications, enterprise applications, mobile applications, etc.

(3) Spring Boot framework

Spring Boot is an open source Java Web application development framework based on the Spring Framework and adopts the concept of "convention over configuration". Compared with traditional Spring applications, Spring Boot can create independent, deployable Spring-based applications more quickly and easily.
The Spring Boot framework provides many out-of-the-box functions and modules, such as automatic configuration, embedded web server, endpoint management, health monitoring, logging, etc. These features can help developers build high-quality web applications in a very short time.

3. Demand analysis

Before system development, an overall analysis of the system's functional requirements and development feasibility is required, which is an essential part of software development. This work mainly involves detailed investigation and analysis of the feasibility, functional and non-functional requirements of the system, and formulating the best implementation plan based on user needs.

(1) Programming and operating environment

1. System operating environment
The online book management system uses the Java language, the operating environment is Tomcat, and the database is MySQL. The project uses native code and strictly abides by the JavaEE specifications for enterprise development. Developed using Servlet plus JSP.
2. Programming environment
The online library management system uses development tools such as IDEA and Navicat, and uses Java language, Servlet and JSP for development.

(2) Feasibility analysis

1. Technical feasibility
Technical feasibility mainly evaluates whether the technical equipment, technical personnel and technical conditions required for the system meet the requirements. Because the school has always maintained a serious and responsible teaching attitude, my technical skills in software development have become very solid for this system. Therefore, I am very proficient in the Java language, MySQL database, JDBC technology, and Springboot framework that must be mastered for the development of this system. So it is technically feasible.
2. Economic feasibility
Economic feasibility is mainly to evaluate the investment cost, operating cost and income of the new system, etc., through the system’s income, profit, Calculation and analysis of payback period, cost-benefit ratio and other indicators to determine whether the new system is economically feasible. Since the existing library management systems have some omissions, this development will start from the omissions of the existing system and effectively solve common problems, which will bring greater economic benefits compared to other systems. And the software tools used in this development are all free, almost zero-cost development, so it is economically feasible.
3. Operational feasibility
The backend of this system adopts the Springboot framework. The overall management page conforms to the aesthetics of contemporary people, and the operation is simple and easy to understand, even for laymen. Personnel can also run the system smoothly and use the functions of each module. Users can easily use the system on their first encounter with the system. So it is also feasible in terms of operation.

(3) Analysis of system business function requirements

1. Reader functional requirements analysis
Reader functions mainly include: login, book inquiry, my borrowing and returning, book loss reporting, personal information, and password modification.
Login and logout
Each reader has a unique account and password, and can log in and log out of the system.
Book search
Readers can search for books and search for corresponding books according to their own needs.
Borrowing and returning books
Readers can return books or renew them, and can view their borrowing history.
Book loss report
If a reader loses a book, he or she can report the loss and then compensate for the lost book.
Personal information
Readers can view and modify personal information.
Change password
Readers can change their login password.
2. Analysis of administrator functional requirements
Administrator functions mainly include: login and exit, library management, personnel management, borrowing and returning management, and password modification.
Log in and out
The administrator can log in or log out of the account.
Book Management
The administrator can manage book information. When there are new books, the administrator can add books. Administrators can view the overall book information and edit and delete it. You can also view book details.
Personnel management
Administrators can add personnel information, including reader information and administrator information. You can also edit and delete personnel information.
Borrowing and returning management
Administrators can view the status of book returns, perform reminder operations, and delete borrowing and returning records.
Password modification
Administrators can modify their login password.

4. System design

(1) System function module design

According to the demand analysis of the system, in order to achieve the functional goals of the system, the main functional modules that the system should include are: login module, library management module, personnel management module, loan and return management module, loss reporting module, and personal information module. The overall structure diagram of the system design is shown in Figure 4-1.
Insert image description here

Figure 4-1 Overall system structure diagram

(2) Database design

1. Concept model design
Through system requirement analysis and data abstraction, various entities related to data in the system and the connections between entities are extracted to obtain the E-R of the system. Figure, the system E-R diagram is shown in Figure 4-2.
2. Logical structure design
On the basis of database analysis and conceptual structure design, the conceptual model of the database is transformed into a logical structure, that is, the structure of the database is design. The structure design of the MySQL data table in this system is as follows.
Insert image description here

Figure 4-2 System E-R diagram

The book information table is shown in Table 4-1.
Table 4-1 Book information table
Whether the field name, data type, length is the primary foreign key and whether it can be empty
Book title varchar 10 no no
author varchar 10 no no
Publishing int 11 no no
ISBN int 11 no no
price varchar 10 No No
time varchar 12 No No
quantity char 18 No No
User information table As shown in Table 4-2.

Table 4-2 User information table
Whether the field name data type length is the primary foreign key and whether it can be empty
name varchar 10 No No< /span> Date of return varchar 18 No No Book title int 11 No No Date of loan varchar 18 No No Readernumber varchar 10 No No Whether the field name, data type, length is the primary foreign key and whether it can be empty Table 4-3 Borrow and return information table The loan and return information table is shown in Table 4- 3 shown. role varchar 18 No No birthday varchar 12 No No phone varchar 10 No No address varchar 11 no no ID varchar 11 no no
sex varchar 10 no no











5. System implementation

(1) Login module implementation

Users must log in before using the system. Only after entering the correct account and password can they enter the system. Administrators and readers share the same login page. Users can selectively log in based on their identities when logging in. The login flow chart is shown in Figure 5-1.
Insert image description here

Figure 5-1 Login renderings

(2) Implementation of library management module

After the reader logs in with their account and password, they can see the book query function. Readers can click on the book query to see all the book information. The book information includes: book title, author, publisher, ISBN, language, price, remaining quantity, etc. . If readers need to view a specific book, they can enter the name of the book they want to find in the search box and click 'Search', and the reader will find the book they need. If the reader needs to borrow this book, they can click 'Borrow' ', readers can successfully borrow this book. The effect diagram of readers checking the book is shown in Figure 5-2.
Insert image description here

Figure 5-2 Readers’ rendering of reading books

(3) Implementation of personnel management module

After the administrator logs in to the backend, under the library management function is the personnel management function. In this function, the administrator can add and manage personnel. When there is personnel information to be added, the administrator can click 'Add Person' and then enter the interface for adding personnel. In this interface, the administrator enters the user's name, username, password, gender, birthday, address, Phone, and then select the user's role, which is divided into two categories: reader and administrator. After checking that the information is correct, click ‘Add’ and the administrator will successfully add the personnel information. Simply adding functions cannot meet the needs of personnel management functions. This module also has the function of managing personnel, that is, modifying and deleting personnel information. When readers no longer use the system or the administrator resigns, their information must be deleted. The administrator clicks on the person's information to be deleted, and then clicks 'Delete', and the person's information will be deleted successfully. If there is an error when entering the user's information, it must be modified. The administrator selects the user who needs to be modified and clicks 'Edit' to modify the user's name, username, password, gender, birthday, address, and phone number. Wait for the information to be modified.
The rendering of personnel management is shown in Figure 5-3.
Insert image description here

Figure 5-3 Personnel management renderings

(4) Implementation of loan and return management module

After entering the system, readers can manage their borrowing and returning information in this module by clicking 'My Borrowing and Returning'. Readers can first view the books they have borrowed by clicking 'I want to return books' in this module, and then See the book's title, author, publisher, language, price, loan date, and due date. Readers can also check whether there is an overdue timeout under the status. If the reader wants to return the book, they can click the 'Return Book' button. The system will prompt whether to return the book. The reader can click 'Confirm' to return the book successfully. If the reader wants to renew the book, he can ask you to 'Renew', and the system will prompt whether to renew. The reader can click Confirm to renew successfully. Readers can view the history of their borrowed and returned books by clicking on ‘Borrowing and Returning Management’. The effect of readers returning books is shown in Figure 5-4.
Insert image description here

Figure 5-4 Effect diagram of book return

(5) Implementation of loss reporting module

When a reader's book is lost, he/she needs to report the loss in this system. The specific operation process is as follows. After the reader logs in to his account, he clicks the book loss report function, and then clicks 'Report Loss' to enter the loss report interface. In this interface, the reader can view to the information and status of the books you are currently borrowing. Readers can select the lost book information and click ‘Report Lost’ to successfully report the loss of the book. After a book is reported lost, operations such as unlisting and compensation must be carried out. These operations are implemented in the ‘Unlisting’ function. Readers can click 'Unlink' to view the book information they have reported lost. If the reader finds the book, they can click 'Unlink' in this function and the book will be unlisted successfully. If the reader cannot find the book, he or she needs to unlist the book. To make compensation, readers can click 'Compensation' to compensate for the value of the book. The effect of reporting loss is shown in Figure 5-5.
Insert image description here

Figure 5-5 Effect diagram of loss reporting implementation

(6) Implementation of personal information module

If the reader's information is incorrect, the reader can modify the personal information on his own. The information includes reader ID number, name, login account, login password, gender, birthday, address, and phone number. The modification process is that after the reader clicks 'Personal Information' and views the incorrect information, click 'Modify' to enter the correct information. If the reader needs to change their password, they can click 'Change Password' and then enter the old password, enter the new password, confirm the new password again, click 'Submit', and the password will be changed successfully. The effect of readers modifying personal information is shown in Figure 5-6.
Insert image description here

Figure 5-6 The effect of readers modifying personal information

6. System test

(1) Testing principles

According to the development requirements of an online library management system, the purpose of this development is to develop a system that is easy to use, interactive, easy to expand, easy to maintain, and efficient. This system is provided to readers and library managers. Proper systematic testing is the key to ensuring the quality of the online book management system and improving the robustness of the online book management system. Comprehensively test each functional module of the management system to instantly discover various existing problems and ensure the overall performance of the system.

(2) Library Management Test

The purpose of this test is to be able to add books normally, manage, modify and edit books, so that administrators and readers can use this system more conveniently. The library management test case table is shown in Table 6-1.
Table 6-1 Book management test case table
Whether the login module for the purpose of the use case is running normally
Prerequisite The system is correctly deployed on Win11 Under the Tomcat server in the system, the MySQL database connection is normal.
Input/action expected output/corresponding actual situation
The administrator clicks to add a book and enters all the information of the book. The successful addition of the book is consistent with the expected result a> The reader selects the book. Click to borrow. The borrowing success is consistent with the expected result The reader clicks on the book query and enters the book information in the search box. The reader can view the book information. The results are consistent with the expected results. The administrator selects any book information and clicks Deletion is successful. The deletion is consistent with the expected results.
The administrator clicks on the book information to be deleted, and clicks Edit. The administrator can edit the book information in line with the expected results


in conclusion

The design has come to an end, and in just a few months, my learning, programming, and problem-solving abilities have improved significantly. During the design process, I had more opportunities to come into contact with actual projects, and I was able to discover some of the subtle problems. I fully realized that just studying book knowledge is not enough. It is necessary to practice more, practice more, practice to gain true knowledge, and hone your skills. competence.

Source code network disk link address
Link: https://pan.baidu.com/s/1EWZTJ8a-UwZGK_qIetorMw?pwd=258o
Extraction code: 258o
The source code is open source and can be obtained by yourself, and remote deployment is available

おすすめ

転載: blog.csdn.net/a1g45/article/details/131398468