25-08-2014, 02:44 PM
LIBRARY MANAGEMENT SYSTEM:
DESIGN AND IMPLEMENTATION
LIBRARY.pdf (Size: 296.96 KB / Downloads: 77)
ABSTRACT
This report describes our group's implementation of a library
management system. We used the Entity-Relationship model to design
a database that will store and organize the library's data. We have
created the database using SQL and populated it with some sample
data. The system can keep track of library cards, customers,
librarians, library locations, books, videos, and the relationships
between them. Using Java Server Pages, servlets, and JDBC, we have
created an Internet-based graphical user interface that allows
customers and librarians to access the system remotely.
INTRODUCTION
This report will provide a detailed account of the processes our group
used to design and implement a database that can be used to manage
a library system. Each subsection of the report corresponds to an
important feature of database design.2
REQUIREMENT ANALYSIS
A library database needs to store information pertaining to its users
(or customers), its workers, the physical locations of its branches, and
the media stored in those locations. We have decided to limit the
media to two types: books and videos.
The library must keep track of the status track of the status of each media item: its
location, status, descriptive attributes, and cost for losses and late
returns. Books will be identified by their ISBN, and movies by their
title and year. In order to allow multiple copies of the same book or
video, each media item will have a unique ID number.
Customers will provide their name, address, phone number, and date
of birth when signing up for a library card. They will then be assigned
a unique user name and ID number, plus a temporary password that
will have to be changed. Checkout operations will require a library
card, as will requests to put media on hold. Each library card will have
its own fines, but active fines on any of a customer's cards will prevent
the customer from using the library's services.
The library will have branches in various physical locations. Branches
will be identified by name, and each branch will have an address and a
phone number associated with it. Additionally, a library branch will
store media and have employees.
Employees will work at a specific branch of the library. They receive a
paycheck, but they can also have library cards; therefore, the same
information that is collected about customers should be collected about
employees.
Functions for customers:
● Log in
● Search for media based on one or more of the following criteria:
○ type (book, video, or both)
○ title
○ author or director
○ year
● Access their own account information:
○ Card number(s)
○ Fines
○ Media currently checked out
○ Media on hold
● Put media on hold
● Pay fines for lost or late items
● Update personal information:
○ Phone numbers
○ Addresses
○ Passwords
Functions for librarians are the same as the functions for customers
plus the following:
● Add customers
● Add library cards and assign them to customers
● Check out media
● Manage and transfer media that is currently on hold
● Handle returns
● Modify customers' fines
● Add media to the database
● Remove media from the database
● Receive payments from customers and update the customers'
fines
● View all customer information except passwords4
ER DESIGN
It is clear that the physical objects from the previous section – the
customers, employees, cards, media, and library branches –
correspond to entities in the Entity-Relationship model, and the
operations to be done on those entities – holds, checkouts, and so on
– correspond to relationships. However, a good design will minimize
redundancy and attempt to store all the required information in as
small a space as possible. After some consideration, we have decided
on the following design:
RELATIONAL DATABASE DESIGN
After coming up with an Entity-Relationship model to describe the
library system, we took advantage of the special relationships found in
our design, and were able to condense the information to 13 tables.
NORMALIZATION
As stated earlier, the tables in this database are in the Third Normal
Form (3 NF.) In order to decompose the relationships into this form,
we had to split Status table from the Media table. Each Media object
has a status code, and each status code has an associated description.
It would be redundant to store both codes and descriptions in the
Media object, so we created a dedicated Status table with the code as
the primary key.
The other tables were designed with optimization in mind. The Card
entity, for instance, was separated from the Customer entity to avoid a
functional dependency (since the "num" attribute of the Card entity
determines the "fines" attribute.)9
PHYSICAL DATABASE DESIGN
The next step was to create the physical database and input some
sample data.
GUI DESIGN
The first step in designing the GUI was to choose a means of accessing
the database. After evaluating various options, we settled on using the
JDBC API. The availability of JavaServer Pages on UNCC's servers was
an important factor, as it allowed us to develop our application using a
three-tier architecture. By using JDBC we could separate the
application logic from the DBMS as well as from clients. In addition to
simplifying operations on the database, this architecture makes
extending the functionality of our system easier. When adding a new
feature or improving an existing one, we will not need to change the
database; it will only be necessary to modify the Java portion of the
code.
Before beginning Java development, however, we needed to define a
set of queries that our application would use to communicate with the
Oracle database. The queries are presented below. Note that the terms
labeled <user input> are to be filled in by the application after it
receives input from the user and validates it. Note also that complex
procedures that require several steps and modify more than one table
– such as operations to check out media or put media on hold - will
combine several queries into a single transaction, eliminating the
possibility of corrupting the database. Finally, some searches (i.e.
searches for Book or Video entries) may have a variable number of
search parameters, determined at run-time. For example, users will
have the option to search for a book by title only, by author only, by
year only, by all three fields, or by any combination of two fields. For
simplicity's sake, the search queries listed below contain all possible
search parameters, but not their possible combinations.
CONCLUSIONS AND FUTURE WORK
During this semester, our group has designed and implemented a
database for managing a library system with multiple locations, the
ability to store videos as well as books, and separate functions for
customers and librarians. Furthermore, we were able to keep the
system's logic abstracted from both the end users and the DBMS by
using JDBC to create a third-tier architecture. Finally, we used CSS
and JSP to design an Internet-based GUI for remotely accessing the
database.
The database design supports more operations than are currently
implemented by the GUI. For example, the "hold" relationship can
store a waiting list of customers who want to check out a particular
media item; there is also the possibility of a customer having multiple
library cards. If we were to continue with this project, we would
implement the above features, and also improve the account
management and search features.