You are on page 1of 71

Chapter One

1.1 Introduction
This document provides detailed requirements, analysis, design, development, testing
validation and veriIication oI the project. It Iocus on the methodology, conventions and
standards used to deliver a working library management inIormation system that meet stack
holder`s expectations within given time constraints.

1.2 Back ground of the Project
Once our project proposal was accepted, our team members began to study the existing manual
system oI State University oI Zanzibar`s libraries which is our case study.
The study realized that, the existing system does not satisIy the needs oI library`s stack holders
due to the ineIIiciency, time consuming, and unreliable services oIIered by that system.

1.3 Problem statement
Currently all book libraries in Zanzibar are manually operated. The State University oI
Zanzibars libraries are among those manually operated.
There have been a lot oI diIIiculties to both Librarians and library members including
managing members, book stocks, loans and circulations.
Inappropriate methods oI record keeping, overdue Iees calculation, stock taking, and resource
security are problems Iacing day to day working environment oI the librarians.
Library members are constrained by time and location oI the resources. Member can only
access library resources during working hours at speciIic locations (University campuses).


hen members are away Irom the University campus or libraries are closed they can not
renew loans, request a book or access any details about book availability.
These are problems Iacing manual library management system in State University oI Zanzibar.

1.4 Problem solution
The library`s stack holders need eIIicient, reliable and easy to use system which is accessible
seven days a week twenty Iour hours and round the clock services.
On line library management inIormation system (OLMIS) is an adequate solution to the
problem outlined above. This is a web based inIormation management system with Online
Public Accessible Catalogues (OPAC), operating on client server model.
The proposed solution has many beneIits towards the improvement oI library services.
The beneIits include the speeding up oI transactions; such as borrowing, returns and
reservations oI books, other beneIits are input errors will be eliminated, perIormance and
reliability will be optimized, overdue Iines will be accurately calculated and collected, users
will be happier with the system because OLMIS enables librarians to easily manage member`s
inIormation, library resources, borrow and Iines.
On the other hand, library members will be able to access library resources anywhere and
anytime with Iriendly user interIace.






1.5 Project schedule
The scheduling oI the project was made on the basis oI available time Irame oI 30 weeks, with
nature and number oI involved tasks. The project started on 25
th
October, 2009 and ended on
15
th
July, 2010. The diagram below shows the time allocation oI each task.
Figure 1: Gantt chart


1.6 General objective
The main aim oI the project is to have an automated system that will update existing manual
system in which user can access libraries resource Irom any place through internet.

1.7 Project Specific Objectives
The Iollowing are the speciIic objectives oI this project:
#educe the work load to librarians and library administration.
To enable users to know the details oI their account and availability oI books in eIIicient
way.
Librarians can easily manage users and books, collect and control overdue.

1.8 Expected outcomes
Project plan, Scope statement, Training manuals, lessons learned, research reports ,design
documents, soItware code, test plan, project beneIit measurement plan are the expected
outcomes

1.9 Feasibility Study
From the study made by the development team on the required system, the Iinding showed
that, development oI the system is possible under existing resources and time constrains.
.




1.9.1 Technical feasibility
The study revealed that, the available technical personnel and skill are adequate to complete the
required system.

1.9.2 Economic feasibility
Furthermore, the outcome showed that the development oI the expected system has reasonable cost and the
available resource pool will accomplish the project successIully.
1.9.3 Operational feasibility
Online library management inIormation system is highly demanded, and the human resource to operate and
uses the systems are available.

1.10 Project Scope
Throughout the project the Iocus will be on presenting inIormation and comments in an
easy and intelligible manner. The project is targeted to be useIul Ior both the library staII and the
borrowers (members).
1he expecLed servlces wlll be produced Lhrough Lhe followlng well deflned maln modules of Lhe sysLem
Membersh|p Management 1o manage Lhe users of llbrary sysLem Lhelr caLegorles resLrlcLlons and
oLher relaLed deLalls
Book Management: To insert, update and delete books Irom the system.
Online Public Accessible Catalogue (OPAC): This is the most visible part oI the soItware
through which members can search books under various criteria like author, title, ISBN, and
subject.



#eporting: Through this module Iinancial report will be generated. Every user would be able
to Iind out their history and current borrowing status.
Transaction section Management: To manage lending and returns oI books according to
respective member permissions, and calculating over dues (Iines).

1.11. Assumptions
The project is carried out with the assumption that, no Online Library Management System existing Ior
State University oI Zanzibar`s Libraries.














%


Chapter Two
2. Literature #eview
Over the past 15 years, the library has grown to be one oI the world`s largest well organized collections
oI resources in large or small proIit or non-proIit organizationsNiles3/. Due to the huge demand oI
online Library InIormation Management System (OLMS) in various sectors especially academic
institutions, several system oI that type have been developed using diIIerent databases and scripting
languages.
For instance, Sharma (2010) develop Online library system soItware using client server model that
comprises oI the Iollowing layers; Data storage layer, Functional service layer, Communication layer,
Internet layer and User interIace. The developer used Oracle 9i database.
Helm (2006) designed and developed web based library management system by using the Iollowing tools
and speciIications; Active server pages (ASP) java servelets, java server pages (JSP), HTML, java script
and Visual Basic on internet inIormation services (IIS).
The user interIace oI that soItware designed to prompt user Ior username, password, and user type on
logon.
Library management system designed by Seema (n.d.) was developed using Visual basic programming
language.
User interIace designed to prompt user Ior book identiIication number (Book No.), Member ID, Current
number oI copies available, issue date and date due in the process oI borrowing books.
And system request Ior book No., member ID, Current number oI copies available, issue date, return date
and Iine in the process oI returning book (s).

%


Our system Online Library Management InIormation System (OLMIS) has many improvements
including the Iollowing:
Designed to use PHP scripting language with MSQL database Ior more aIIordability and
eIIiciency.
#educed number oI inputs to be more users Iriendly. For example on log on user is
prompted to submit user name and password only, when user wants to borrow or return
book; librarian only enter the member registration number or ID and the book accession
number (Unique book identiIication number).
The system automatically calculates, display and save over due and Iines with their
respective member IDs when the book return inIormation is entered.














Chapter Three
3.1 System Specifications
System requirements were collected using interview requirement elicitation methodology.
3.1.1 Functional #equirement
The main Iunctions oI OLMIS include:
The system should keep record oI the entire library books inIormation and allow
librarians to retrieve and update those inIormation.
The system should keep, maintain and retrieve members` personal inIormation and
allow the owner (member) and librarians to retrieve it.
Only registered members will be allowed to borrow book(s) Irom library.
The system should keep, maintain, retrieve and record oI books circulation (borrow and
returns) and calculate Iine iI any, on basis oI number oI days delayed deposit oI the
book in the library.
System should allow member to reserve books that are unavailable at that particular
time.
Students and outside members should not borrow more than three books at a time and
allowed to stay with the book(s) in two weeks period. SUZA (staII) lecturers and
teachers should not borrow more than Iive books at a time and will have three weeks
duration Ior each loan. .
System shall provide a number oI book search methods through Catalogues, including
search by author name, search by title, search by ISBN and search by Key word. Also
system should allow librarians to search and retrieve member`s details based on name


and user ID.
The system should allow librarians to deactivated member`s status.
The system must be accessed Irom diIIerent locations, using client-server model.
The system should allow librarians to deactivated member`s status.
The system must be accessed Irom diIIerent locations, using client-server model.
























Figure 2: Use case













eglsLer
member
8orrow a 8ook
eLurn 8ook
eserve 8ook
vlew borrow
hlsLory
ueleLe 8ooks
Check accounL
enew 8ooks
Manage lssues and
reLurns
updaLe 8ook
SLaLus
Search 8ook
vlew borrow
eporL
Add 8ook Lo
daLa base
vlew 8ook
ClrculaLlons and
equesLs
ueacLlvaLe
Member SLaLus
eglsLer Lo be a
member
CuesL
Llbrarlan
Llbrary Member
LecLurer
SLudenL
CuLslder
ay flne


3.1.1.1 Description of Actors
The system has two types oI people who interact with it (actors) as described in the table 1 and table 2.
#eIer to appendix A.

3.1.1.2 Description of Use cases
There are various activities perIormed by diIIerent actors as described in the table 3, table 4, table 5, table
6, table 7, table 8 and table 9. #eIer to Appendix A.


















3.1.2 Non functional requirements

1. System will not maintain any inventory other than books.
2. System doesn't keep track oI damaged items. Users have to manually replace the damaged items with
new ones.
3. System will not handle data security and backup. Users depend on some external or manual backup
mechanism to take data backup whenever required
4. The system must be online 27/7 a day on the Internet.
5. Acceptability: The must sutisIy users by providing most oI the services expected by the stack holders.
6. PeIomance: The system should operate on high perIormance.
7. Implementability: Users oI the system should be able to learn to use it in short periord.
7. Security :The system should be abl to restrict unauthorized users rom using it.
8. #eliability: The system should be continueously operating and available whenever required.
9. #obustness: The system must be able to recover Irom Iault whenever occurred.
3.2 Document Conventions
The Iollowing are the list oI conventions and acronyms used in this document and the project as well:
Administrator: A login username admin representing a user with user administration privileges to the
soItware.
User name: A general login name assigned to ordinary users.
MYSQL Server: A server used to store and retrieve data in an organized Iormat.





PHP: Hypertext Preprocessor: A scripting language on the server and delivered to the
browser.
Layer: #epresents a section oI the project.
User Interface Layer: The section oI the assignment reIerring to what the user interacts
with directly.
Application Logic Layer: The section oI the assignment reIerring to the eb Server.
This is where all computations are completed.
Data Storage Layer: The section oI the assignment reIerring to where all data is
recorded.
Use Case: A broad level diagram oI the project showing a basic overview.
OLMIS: Online Library Management InIormation System.













Chapter Four.
4.1 System Design
eb base library management inIormation system is designed using three- tier architecture. Three tier
architecture comprises oI three layers each potentially run on a diIIerent platIorm. According to Connolly
(2005) the layers are:
1. User interIace layer, which runs on the end- user`s computer (client).
2. Business logic and data processing layer. This middle tier runs on a server ad oIten called
application server.
3. Database Management System (DBMS), which store data required by middle tier. This tie may
run on a separate sever called database server.
There are several advantages oI choosing three tier architecture over other system architecture.
The advantages oI three tier architecture are:
Better re-use: the speciIic language oI implementation oI the middle tier can be made
transparent.
Improve data integrity : the middle tier can ensure that only valid data is allowed to be
updated in the database
Improve security: since the clients do not have direct access to the database. Business logic is
generally more secure, since it is placed on more secure central server
#educe distribution: changes to business logic only need to update on the application servers and
do not have to be distributed to all the clients.
Improve availability missing created application can make use oI redundant application servers
and redundant database servers, so it can recover Irom network or server Iailure.
Hidden database structure: Since the actual structure oI the database is hidden.



Server




lgure 3 Client /Server 3- Tier model Source wwwclannukambalyalLrlpodcom

%

4.1.1 Development and operating environment
On line Library Management InIormation System will be developed and running on Intel/AMD based
platIorms, with installed MySQL database, apache eb Server, PHP plug-in Ior Apache web server.
Dreamweaver version 8 will be used as the development environment Ior PHP, JAVA script and other
essential scripts.
Operating system related Ior the soItware is; indows XP, indows Vista and indow 7 with Internet
InIormation Service (IIS).
The system can also runs eIIectively on Linux Operating system using LAMP soItware.

4.1.1.1 Why PHP?
PHP is a powerIul server side scripting language that has many beneIits compared to other scripting
language. According to Yank (2003) the Iollowing are advantages oI using PHP scripts:
Portability - available Ior wide range oI platIorm.
PerIormance - Iaster and more reliable.
Easy to use - short time to learn.
Open source source code are available Ior modiIication.
Modular extension- support Ior new technology.
Database support work better with databases.
Support Object Oriented Programming
Built-in security has a number oI security tools (session, cookies, message digested).
Technical support is widely available.


%

4.1.1.2 Why MYSQL?
MYSQL is an open source relational database. It is Iourth generation structured query language (4GL).
It is cost eIIective it is Iree, you can install and use it and pay nothing in the process.
It is quick and powerIul Mysql eIIiciently serves web contents.
It is improving all the time.
4.1.2 Architecture Design
This design shows how the system is distributed across computers and soItware used Ior each computer.
In our case the system will use single layered architecture simply because the database and user interIace
are in the same node.
Advantages oI Single layered Architecture:
Has good perIormance
Has good scalability
Fault tolerant
High security
Maintainability

4.1.2.1 Components of single layered Architecture
Presentation layer
User interIace layer
Business logic layer
Data access layer




Presentation layer
Online library management inIormation system will work under windows platIorm

Business layer
It includes all system policies
Data access layer
The that contains methods oI accessing the data Irom the database
User interface layer
This provide interaction environment between user and the system

4.1.3 Database design
4.1.3.1 Data type
The database oI the designed system was designed using the relational data model
Tables are connected to each other using primary and Ioreign key. The data type used are:

Numeric
Integer Variables are used Ior the Non Fractional Values. It stores values in the range Irom 32768 to
32767. Long Data type is used Ior the range 2147483648 to 2147483647. Single Data Type is used Ior
Fractional Values Irom 3.402 e 38 to 1.40 e 45. Double Precision Floating Point Numbers is capable oI
containing values Irom 1.797 e 308 to 4.940 e 324 and positive numbers. Currency is used Ior Iixed-


point numbers with Iour decimal digits. It can represent numbers in the range 922377203685477.5808 to
922377203685477.5807. Byte data type is used Ior representing numbers Irom 0 to 255. String variables
are used to store string type data.

Boolean
Boolean Data Type stores True/ False values. Boolean variables are used in testing conditions.
Date
Date and Time variables are stored internally in a special Iormat, but you don`t need to know the exact
Iormat. Date variables are declared by Iollowing statements.
Varchar
Is the data type that user can speciIy the length oI the characters. Types oI Variables declare without any
data type treated as variant they are capable oI containing any type oI value.
Decimal
This is the data type that you speciIy the precision that you want to use Ior example decimal (2000,5)
returns 2000.00000.








4.1.3.2 Tables
Data base has been design with nine normalized relational tables. The tables are author , book ,
bookauthor, member, request, lending, bookCategory, member#equest and memberGroup.
#eIer to appendix B.


4.1.4 User Interface design
User interIace is the junction between a user and a computer program. An interIace is a set oI commands
or menus through which a user communicates with a program. The user interIace is one oI the most
important parts oI any program because it determines how easily you can make the program do what you
want.
The user interIaces oI this system were designed to be simple as much as possible in to enable even naive
users to use the system in eIIicient way.









4.1.4.1 System Interfaces
Logon screen
The interIace Ior all users to log in the system, using user name and password.
1. Enter user name.
2. Enter password.


Figure 4: Login window



Administrator portal
The Iirst place where system administrators is accessing the system menus.
1. Home 4. Manage members 7. User requests
2. Process borrows 5. Manage books 8. log out
3. Overdue Iines 6. Borrowed books



Figure 5: Admin Portal



Insert book screen
Librarians use insert book menu to register new books when book stock is received at the library.
The required data is Book title, ISBN, class number, subject, price, source, location, author name, book
category, place oI publication, year oI publication, number oI book copies and date received.



Figure 6: #egister book.




Administrator`s-Member registration form
To be a member a guest must Iirst be registered by system administrator/librarian and then he/she will be
allowed to update his/ her proIile. The Iigure below shows the Iorm that is used by librarian to register
member.


Figure 7: #egister member





Member registration form
All individuals who wants to be user oI the system must Iirst register themselves aIter being pre-
registered by system administrator.


Figure 8: Member registration Iorm




%

User profile screen
User proIile is the window that provides personal inIormation oI each user. User is allowed to edit his/her
physical address, e-mail address and telephone number.




Figure 9: User`s proIile


%

User Account screen
Account is the window that presents inIormation about borrowed books their borrow date and date due.
User is allowed to renew the book, iI and only iI the book has not been requested or not exceeded the due
date.


Figure 10: User account





Borrowing a book screen.
The interIace prompt user to enter:
1. Member ID.
2. Accession number (unique identiIier Ior each book).


Figure 11: Borrow a book






#eturn a book screen
Librarian is required to enter:
Member ID
Accession number.



Figure 12: #eturning book





#esults of Book returns
hen administrator (Librarian) submits the book return, the system produce the result window that
provides inIormation about the returned book, overdue iI any and Iines.


Figure 13: #esults oI #eturning book








Member Deactivation screen
Librarian to deactivate member should:
1. Select Manage member menu
2. Enter the year oI the members entry and select the member status
3. Tick the check box and submit to deactivate the checked member



Figure 14: Deactivating member







Member
findB
Wa
[Returner]
[ Borrower ]



Figure 15 above illustrates the activities carried out by library members and librarians. hen
the member wants to borrow or return the book she /he should bring that particular book to the
librarian at the issue desk.
Librarian enter borrow or return inIormation in the system and give the book to the member
who want to borrow or return the book to the shelI.





















t
e
x
t
Catalogue
Book
-Acces
-Name
-CreatedDate
-TotalBooks
+AddBook()
+RemoveBook()
+ShowDescription()
+ShowBookDetail()
+ShowssueHistory()
-Title
-C
-Consists of
-Are entered in
*
1
*

Figure 16: Class Diagram
%

The class diagram above shows seven classes that constitute the system and their relationships.
The librarian class is the class that consists oI all State University`s librarians in which many
librarians responsible to many book catalogues, many library users and many books. The
relationship between librarian, book, users and book catalogue is many to many.
Member class consist all library members. There are three types oI members Member oI staII,
Students and Librarians and they have many to many relationship with librarians since many
librarians deals with many members.
Book class consists oI the whole book stock owned by library. Book class has strong
relationship with Catalogue. No catalogue exists without book.
Catalogue class consists oI catalogues Ior each book One catalogue may correspond to many
book copies.






%


The Iigure 17 shows how the sequence oI activities as perIormed by library member.
hen member wants to borrow a book (copy), the book and member identity number are
entered in the system. Then the transaction manager checks whether the member is a valid
member, iI has not exceeded the allowable number oI borrowed book and iI the book has not
been requested beIore.
II all conditions are satisIied then the transaction is accepted otherwise denied.



Chapter Five
5. Implementation
In the implementation phase we programmed the designed soItware using PHP and MySQL
database.
Some oI the sample PHP and SQL code are shown in the Appendix C.




















Chapter six:
6.1 System testing and evaluation

6.1.1 System Testing
The OLMIS was tested Ior logical and physical errors. To be sure that number oI errors is
signiIicantly smaller the system was subjected to unit testing (modular testing) and system
testing (integrated testing).
6.2 Unit Testing
Each part oI the program was separately tested. This helps to reduce number oI errors in
system testing step and reduce the complexity oI the whole program.
The testing methods used were black box and white box testing.
6.3 System Testing
The unit testing was Iollowed by the integrated testing. Individual parts oI the program were
linked together and tested Ior errors.
Black box testing is done without consideration oI the source code oI the program while white
box testing is done with a Iull consideration oI the program source codes.
The source codes are tested Ior syntax and semantic based on the required task as should be
perIormed by the system.
Both tests were carried out aIter entering the sample data in the system.





Chapter seven
7.1 Conclusion and recommendations

7. 1.1 Conclusion
It is our view that, this system will successIul eliminates problems oI the existing system Ior main stake
holder (member and librarian) to do their task in easy and eIIiciency way, regarding that Iunctional and
non Iunctional requirements oI the system are met.

7.1.2 #ecommendations
For the beneIit oI Iuture Iinal year project we would like to recommend that, Department oI
Computer Science should make schedule the key programming languages to be taught in the
Iirst and second year so as to enable student to be more Iamiliar with soItware development
languages.









Benefits from project
This project provides us more experiences on developing soItware which require systematic
procedures and designing methodologies. e learned a lot things include: - time and resource
managements, communication managements, quality assurance, change managements and risk
management.

Benefit of the system
The Online Library Managements InIormation System (OLMIS) is suitable Ior book
circulation and member management. The existing manually system is not satisIied.
System can be accessed any where, any time
It is reliable and Cost eIIective
Available and Secure as it is used by only one user
It is time consuming in terms oI manipulating records.












#EFE#ENCES

1. Greenspan, J., Bulger, B. (2001). MySQL/PHP Database Applications. Foster City,
CaliIornia USA: M&T Books.
2. #oman, S. (2002). Access Database Design (3
rd
ed.).USA:O`#eilly publication
3. Stevens, P., Pooley, #. (2000). &sing &ML Software Engineering with Obfects and
Components. USA: Addison-esley.
4. Yank, K. (2003). :ild yo:r own Database Driven Website :sing PHP and MSQL (2
nd

ed.). USA: Site Point Pty Ltd.
5. Seema, J. (n.d.). Engineering the engineer. Library management system. #etrieved on 4
th

march, 2010 Irom
http:// www.123eng.com/Library Management system/site.php.
6. Connolly, T., Begg, C. (2005). Database systems a practical approach to design
implementation and management, (4th ed.). Edinburgh Gate. Harlow, England: Person
Education Limited
7. Siddiqi, M. (2008). Obfect Oriented Design A Class Diagram Walkthro:gh .#etrieved
on 14
th
May, 20010 Irom
http://asadsiddiqi.wordpress.com/2008/02/21/object-oriented-design-a-
class- diagram-walkthrough/
8. Agarwal, A., Sharma, K. (2010). Software Req:irements Specification for development of
online library system. #etrieved on 15
th
May, 2010 Irom
www.scribd.com/doc/27264009/Design-Document-Ior -Library Management -System



9. Helm, J. (2006). Designing library Software. #etrieved on 27
th
April, 2010 Iorm
www.sce.uhcl.edu/helm/swen5131toolsFL06/ProjectDoc/SoItware#equirementsSpeciIica
tion.doc
10. Nile, K (n.d.) What is the Free Management Library(s m).#etrieved on 10
th
July, 2010
fiom www.managementhelp.oigaboutfmlwhat-it-is.htm



















Appendices
Appendix A.
Table 1.
A. Librarian





Table 2.
B. Library Member

Actor: Library Member
Description: She/he use library resources (books)
Example: Member wants to borrow a book








Actor: Librarian
Description: She/he handles library activities
Example: Librarian wants to add new members


Table 3.
i. #egister members
Use case #egister member
Actor Librarian
Trigger ant to allow new library member to use
library resources.
Pre - condition Users want to use Library services
Post - condition Member can borrow books
Normal sequence of interactions 1. Accept the list oI admitted students and
staIIs with their registration numbers.
2. Librarian enters the names and
registration numbers.
3. System saves inIormation.
Variation 1. #egistration number not entered.
1. A System halt, signals - missing
inIormation.
2. rong registration number entered.
2(a). System prompt user Ior wrong
registration number.
#elated information The list oI registered members with their
#espective registration numbers


%

Table 4.
ii. Borrow a Book
Use case Borrowing the book
Actor Librarian
Trigger Member wants to take the book out oI
library.
Pre - condition The book (copy) should exist.
Post - condition Numbers oI copy are reduced.
Normal sequence of interaction 1.Member check Ior book availability
1 (a). System display book status.
1 (b). Book available.
1 (c). Book is not available, member can
request.
Variation -
#elated information Every time member wants to borrow a book
must check Ior status Iirst.







%

Table 5.
iii.Search for a Book

Use case Search a book
Actor Library Member/ Librarian
Trigger Member wants to know iI a particular book is
available.
Pre - condition -
Post - condition Get response whether book is available or not.
Normal sequence of interaction 1. Member
check Ior book availability.
2. The
system provides options Ior searching a book by
Title, ISBN, Author Name and Key word.
3. Member
enters the required inIormation
4. System
search Ior that book according to the option selected,
and display the item.
Variation The system produce error message iI no option
selected.
#elated information Every time member search Ior a book should select
the option.


Table 6.

iv.Deacivate Member
Use case Deactivate Member
Actor Librarian
Trigger Librarian wants to deactivate member who has
graduated or discontinued Irom the system.
Pre - condition The user is no longer a valid member.
Post - condition Member is deactivated Irom the system.
Normal sequence of interaction 1. Librarian
request Ior member Deactivation.
2. The
System ask user to enter Year and registration number
/ ID in which member was registered.
3. The
Librarian enters the registration year and ID oI the
member.
4. The
system display the list oI members
ith those particulars, and the deactivation option.
Variation -
#elated information Every time member graduate, discontinued or
misbehave should be prevented to access the system.


Table 7.
iii. Add Book.


Use case Add books to the database
Actor Librarian
Trigger Librarian wants to add new books to the database
Pre - condition The new book(s) must be available
Post - condition The system should update the number oI books in the
stock
Normal sequence of interaction 1. Librarian request to add new book in the stock.
2. The System ask user to enter book ISBN, Title,
Access No., Dewey No., and other book detail.
3. The System updates the number oI book copies in
stock.

Variation II incomplete book detail submitted the system
prompt an error message, asking user to re- enter the
required inIormation and the book stock is not
updated.
#elated information Every time aIter the new book successIul entered the
system should update the number oI books in the
stock






Table 8.
v. Issue Book
Use case Issue book
Actor Librarian
Trigger Member wants to borrow a book.
Pre - condition Member comes physically to the issue desk
with a book to be borrowed.
Post - condition Member is allowed to take out the book.
Normal sequence of interaction 1.Librarian check iI
- user is a valid member, and iI
-She/he has not exceeded number oI copy
allowed.
-the book has not been requested by another
member.
2. II member is allowed to borrow a book;
Librarian enters the book Member ID, book
Accession number, Title, Date oI borrowing.

Variation -
#elated information Every time member wants to borrow a book
She/he must bring the book to the issue desk.




Table 9.
vi. #eturn book
Use case #eturns
Actor Librarian
Trigger Member wants to return a book.
Pre - condition Member comes physically to the issue desk with a
book to be returned.
Post - condition Number oI the book is increased.
Normal sequence of interaction 1. Librarian
request and enter :
- user`s registration/ID and the accession number oI
the book.
-The system checks and displays the loan status and
overdue Iine.
-The system saves inIormation about that loan.


Variation -
#elated information Every time member wants to return a book She/he
must bring the book to the issue desk.





Appendix B.
10. Author: Table
Attribute Data type Size Allow null
Author id INT 11 NOT NULL
Author
names
vACPA 30 NOT NULL


11. Book_ author: Table
Attribute Data type Size Allow null
Bookauthorid INT 11 Not null
Bid INT 11 Not null
Authorid INT 11 Not null












12. Book: Table


Data type Size Allow null
Bid INT 11 Not null
Accessno DOUBLE (11,5) Not null
Isbn VA#CHA# 20 Not null
Classno INT 10 Not null
Title VA#CHA# 100 Not null
Subject VA#CHA# 25 Not null
Location VA#CHA# 20 Not null
Source VA#CHA# 20 Not null
Dop DATE 20 Not null
Pop VA#CHA# 20 Not null
Catcode DE CIMAL (11,5) Not null
Deceived DATE Not null
Price DECIMAL (11,5) Not null
Status TINY INT 1 Not null








13. Member :Table
Attribute Data type Size Allow null
Mid INT 11 Not allowed
#egno VA#CHA# 25 Not allowed
Fname VA#CHA# 20 Not allowed
Mname VA#CHA# 25 Not allowed
Lname VA#CHA# 25 Not allowed
Sex VA#CHA# 5 Not allowed
Dob DATE 11 Not allowed
Doe DATE 11 Not allowed
Dol DATE 11 Not allowed
Status VA#CHA# 15 Not allowed
Telephone VA#CHA# 15 allowed
Email VA#CHA# 30 Not allowed
Address VA#CHA# 30 allowed
Username VA#CHA# 30 Not allowed
access VA#CHA# 2 Not allowed
Password VA#CHA# 5 Not allowed







14. Author

Attribute Data type Size Allow null
Author id INT 11 NOT NULL
Author
names
vACPA
30 NOT NULL


15. Lending :Table
Attribute Data type Size Allow Null
Lid INT 11 Not allowed
Bid INT 11 Not allowed
Mid INT 11 Not allowed
Accessno DECIMAL (11,5) Not allowed
Dol DATE 11 Not allowed
Datedue DATE 11 Not allowed
Dor DATE 11 Not allowed
Fine DECIMAL (11,5) Not allowed
Status TINYINT 1 Not allowed
Fstatus TINYINT 2

Not allowed

%


16. Category: Table
Attribute Data type Size Allow null
Categoryid INT 11 Not allowed
Catname VA#CHA# 30 Not allowed
Catcode VA#CHA# 25 Not allowed


17. Memgroup:Table
Attribute Data type Size Allow Null
Gid INT 11 Not allowed
Mid INT 11 Not allowed
Status VA#CHA# 30 Not allowed
Year YEA# 4 Not allowed


18. #equest: Table
Attribute Data type Size Allow null
#eqid INT 11 NOT NULL
#eqdate
uA1L
11 NOT NULL


%



19. Memrequest :Table
Attribute Data type Size Allow Null
Mrid INT 11 Not allowed
Accessno DECIMAL (11,5) Not allowed
Mid INT 11 Not allowed
#egno

VA#CHA# 25 Not allowed
#eqbid INT 11 Not allowed
Bid INT 11 Not allowed













Appendix C.
5.1 Code for implementation of the system
Connection between database and server
" php
5dbase suza||brary
5user root
5server |oca|host
5password

]]connect to MySq|
5conn mysq|_connect (5server 5user 5password)

or d|e ( Lrror cou|d not connect to Mysq| !)
]]connect to data base
mysq|_se|ect_db (5dbase)

"









PHP code for adding book to the database
htm|
head

t|t|e]t|t|e]head
body
" php

|nc|ude(]sysconf|g]sconf|gphp)
]]quer|ng |ast access|t|on number
5|astcopy ( SLLLC1 max(accessno) IkCM book )
5row mysq|_query(5|astcopy)or d|e (Lrror cou|d not se|ect data mysq|_error())
wh||e(5data mysq|_fetch_array(5row))

5accessno 5datamax(accessno)

5|sbn 5_CS1|sbn
5c|assno 5_CS1c|assno
5t|t|e 5_CS1t|t|e
5sub[ect 5_CS1sub[ect
5|ocat|on 5_CS1|ocat|on
5source5_CS1source
5dop5_CS1dop
5pop5_CS1pop


5catcode5_CS1catcode
5drece|ved5_CS1drece|ved
5pr|ce5_CS1pr|ce
5status 5_CS1status
5c|assname 5_CS1c|assname
5year 5_CS1year
5month 5_CS1month
5day 5_CS1day
5catname 5_CS1catname
5aunames 5_CS1aunames
5year1 5_CS1year1
5copy 5_CS1copy
5drece|ved 5year5month5day
5dop 5year1
5status 1
for(5| 1 5|5copy 5|++)

5accessno 5accessno + 1

]]|nsert data |n book
5query (INSLk1 IN1C book
(accessno|sbnc|assnot|t|esub[ect|ocat|onsourcedoppopcatcodedrece|vedpr|cestatus) va|ues
(5accessno5|sbn5c|assno5t|t|e5sub[ect5|ocat|on5source5dop5pop5catcode5drece|
ved5pr|ce5status))



mysq|_query(5query) or d|e(Lrror |nsert query fa||edmysq|_error())
5b|dmysq|_|nsert_|d()

]]|nsert data |n author
5add1 (INSLk1 IN1C author(aunames) VALULS (5aunames))
mysq|_query(5add1) or d|e(Lrror |nsert query fa||ed!)
5au|dmysq|_|nsert_|d()

]]|nsert data |n bookauthor
5|nsert mysq|_query(INSLk1 IN1C bookauthor(b|dau|d) va|ues(5b|d5au|d)) or d|e(Lrror
bookauthormysq|_error())

]]|nsert data |n category
5add2 (INSLk1 IN1C bookcat(c|assnocatcodecatname) VALULS
(5c|assno5catcode5catname))
mysq|_query(5add2) or d|e(Lrror |nsert query fa||ed!!)
"
a href[avascr|pth|storyback()ack to rev|ous age]a
]body
]htm|

Code for registering member to the system
"php


|nc|ude(]sysconf|g]sconf|gphp)
"
"php
5regno 5_CS1regno
5password 5_CS1password
5password2 5_CS1password2
5fname 5_CS1fname
5|name 5_CS1|name
5day15_CS1day1
5day25_CS1day2
5month15_CS1month1
5month25_CS1month2
5year15_CS1year1
5year25_CS1year2
5te|no 5_CS1te|no
5ema|| 5_CS1ema||
5address 5_CS1address
5username 5_CS1username
5bday 5_CS1bday
5bmonth 5_CS1bmonth
5byear 5_CS1byear
5m|d 5_CS1m|d
5dob 5byear5bmonth5bday "
"php


5f|nd (SLLLC1 m|d IkCM member WnLkL regno 5_CS1regno)
5done mysq|_query(5f|nd) or d|e(Lrror cou|d not se|ect data ! mysq|_error())
|f(mysq|_num_rows(5done))

]]5m|dmysq|_resu|t(5donem|d)
|f (empty(5password))

requ|re(]member]fa||edreg|stphp)
ex|t

|f (5password! 5password2 )

requ|re(]member]fa||edreg|stphp)
ex|t

5query (UDA1L member SL1 te|no 5te|no ema|| 5ema||address 5addressusername
5usernamepassword 5passworddob 5dob WnLkL regno 5regno)

5succ mysq|_query(5query) or d|e(Lrror |nsert query fa||ed)

|f(5succ)

echokeg|strat|on successfu|!
echoa href ]sysconf|g]|og|nphp Log|n]a


echo

e|se
requ|re(]member]fa||edreg|stphp)
ex|t
"




















PHP code for borrow and return book and calculating overdue fines.
"php
|nc|ude(]sysconf|g]sconf|gphp)
5regno 5_CS1regno
5accessno 5_CS1accessno
5sq|querymysq|_query(se|ect mm|dbb|d from member mbook b where mregno5regno and
baccessno5accessno)or d|e(mysq|_error())

|f(mysq|_num_rows(5sq|query))

5m|dmysq|_resu|t(5sq|querym|d)
5b|dmysq|_resu|t(5sq|queryb|d)
5day3 5_CS1day3
5day4 5_CS1day4
5dayS 5_CS1dayS
5month3 5_CS1month3
5month4 5_CS1month4
5monthS 5_CS1monthS
5year3 5_CS1year3
5year4 5_CS1year4
5yearS 5_CS1yearS
5ddue 5year45month45day4
5dor 5yearS5monthS5dayS

%

]]5m|d mysq|_|nsert_|d()
5datedue1mkt|me(date(m)date(d)+14date())
5dateduedate(md5datedue1)

|f(5_CS1subm|t Subm|t)
5query mysq|_query(INSLk1 IN1C |end|ng (m|db|daccessnodo|dateduestatus) va|ues
(5m|d5b|d5accessno now()5datedue1))or d|e(Lrror |nsert query fa||edmysq|_error())
|f(5query)

echo ook 5accessno |oan to 5regno accepted !

]]
e|se

5querupdatemysq|_query(update |end|ng set status dornow() where m|d5m|d and
b|d5b|d) or d|e(Lrrorcou|d not updatemysq|_error())
5se|ectquerymysq|_query(se|ect * from |end|ng where m|d5m|d and accessno5accessno)or
d|e(mysq|_error())
|f(mysq|_num_rows(5se|ectquery))
5dormysq|_resu|t(5se|ectquerydor)
5dateduemysq|_resu|t(5se|ectquerydatedue)

]]funct|on to ca|cu|ate the date d|fference w||fred 2december
funct|on dateD|ff(5dor5datedue )
%

5date_parts1exp|ode(5datedue )
5date_parts2exp|ode(5dor )
5datedue gregor|anto[d(5date_parts11 5date_parts12 5date_parts1)
5dor gregor|anto[d(5date_parts21 5date_parts22 5date_parts2)
return 5dor 5datedue

"


"php
pr|nt bCverdue and I|nes]b
pr|ntbr]
5th|smember mysq|_query(SLLLC1 fname|name IkCM member
WnLkL m|d 5m|d ) or d|e(Lrror cou|d not read
data!mysq|_error())
|f(mysq|_num_rows(5th|smember))
5fnamemysq|_resu|t(5th|smemberfname)
5|namemysq|_resu|t(5th|smember|name)
]]d|sp|ay the |oan status
pr|nttab|e border a||gn center trtd
echo 1h|s book aspected back on 5datedue
pr|ntbr]
5over dateD|ff(5dor5datedue)
5rate 2


5f|ne 5rate*5over

5querupdatemysq|_query(update |end|ng set f|ne 5f|ne) or d|e(Lrrorcou|d
not updatemysq|_error())

|f((5over))


pr|nt 5|name 5fname
pr|nt font co|or red has exceeded (overdue) of
]fontdateD|ff(5dor5datedue) days
pr|nt and has to pay 5over*5rate
pr|ntform name pay|ng methode post act|on payf|nephp"
font co|or b|ue 1shs a href payf|nephp"||d "php echo 5data||d
"font co|or greenayf|ne]font]a
"php
pr|nt]form

e|se

echoNo overdue !

pr|nt]td]trtab|e



e|se
echo ou are not reg|sterd

"
tab|e border
trtd
|nput typeh|dden name||d va|ue"php echo 5_SLSSICN||d" ]]tdtd
bra href[avascr|pth|storyback()ack to preveous page]a]br]td]tr
]tab|e
]body
]htm|

You might also like