transforming a paper-based library system to digital in example herat university - master thesis

82
 

Upload: abdul-rahman-sherzad

Post on 07-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 1/82

 

Page 2: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 2/82

 

Transforming a Paper-Based Library System to Digital 

in Example of Herat University

Master’s Thesis 

Abdul Rahman Sherzad

Supervisors: 

Prof. Dr. Bernd Mahr

Dr. Nazir Peroz

Technische Universität Berlin

Fakultät IV Elektrotechnik und Informatik 

Berlin, 18.02.2010

Page 3: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 3/82

i

ABSTRACT

Resourceful libraries have long attracted knowledge-seekers and have played an

important role in education and research. With the astonishing advances in science and

technology, traditional libraries have not remained unaffected and the concept of digital

library has emerged and caused a revolution in these old institutions. A digital library

can provide access to many of the information networks around the world, which is a

necessary component of almost any research experience today.

Considering the facilities associated with a digital library, gradual replacement of 

traditional libraries by digital ones appears to be inevitable. As an important step in

enhancement of education in Afghanistan, the concept of digital libraries must be

introduced and integrated into the country‘s rapidly evolving educational system.

This thesis addresses the challenges existing in Afghanistan university libraries. A

solution for each challenge is defined by introducing digital and automated systems and

finally a scheme is provided for switching from a paper-based library system to a digital

library system.

Page 4: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 4/82

ii

ACKNOWLEDGMENT

First of all, I would like to express many thanks to the World Bank, Ministry of Higher

Education of Afghanistan, TU-Berlin, and other staff and organizations that were

involved in providing me with the opportunity to study for a Master‘s Degree.

In particular, I would like to extend many thanks to Dipl.-Inf. Rene Herlitz, my

supervisor at TU-Berlin, for continuous provision of many useful suggestions and

constructive feedback, which enabled me to complete this paper.

Last but not least, I would like to thank my family for their support and encouragement.

I am indebted to their inspiration and support. This paper would not have been possible

without their support and inspiration.

Page 5: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 5/82

iii

TABLE OF CONTENTS

ABSTRACT ....................................................................................................................... i ACKNOWLEDGMENT ................................................................................................... ii 1  Introduction ............................................................................................................... 1 

1.1  Motivation .......................................................................................................... 2 1.2  Goal .................................................................................................................... 3 1.3  Thesis Structure .................................................................................................. 4 

Background ............................................................................................................... 6 

2.1  Herat University ................................................................................................. 6 2.2  Herat University Main Library ........................................................................... 6 2.3  Herat University Abu Abdullah Rudaki Library ................................................ 7 2.4  Overview of Current Situation ........................................................................... 8 

2.4.1  Book-Registration ....................................................................................... 8 2.4.2  Book Labeling in the Main Library ............................................................ 9 2.4.3  Call Number System in the Main Library ................................................. 10 2.4.4  Book Lending ............................................................................................ 11 2.4.5  Redundancy Problem ................................................................................ 13 

2.5  Summary .......................................................................................................... 15 3  Digital System and Automation .............................................................................. 16 

3.1  Need for a Digital and Automated Library....................................................... 17 3.1.1  Availability of Information ....................................................................... 17 3.1.2  Manageability of Information Explosion .................................................. 18 

Page 6: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 6/82

iv

3.1.3  Accessibility of Various Media Types ...................................................... 19 3.1.4  Greater Efficiency ..................................................................................... 19 3.1.5  IT Based User Services ............................................................................. 20 3.1.6  Cooperation and Resource Sharing ........................................................... 20 3.1.7  Advent of ICT and WWW ........................................................................ 21 

3.2  Summary .......................................................................................................... 22 4  Requirements........................................................................................................... 23 

4.1 

Functional Requirements .................................................................................. 24 

4.2  Non-Functional Requirements ......................................................................... 25 4.2.1  Security ..................................................................................................... 25 4.2.2  Usability .................................................................................................... 28 

4.3  Hardware Requirements ................................................................................... 29 4.4  Software Requirements .................................................................................... 30 

4.4.1  Programming Language ............................................................................ 31 4.4.2  Database Management System ................................................................. 31 4.4.3  Web Server ................................................................................................ 32 4.4.4  Browser ..................................................................................................... 33 

4.5  Summary .......................................................................................................... 34 5  Database Concept and Model.................................................................................. 35 

5.1  Input Data ......................................................................................................... 35 5.1.1  Book Information ...................................................................................... 35 5.1.2  Member Information ................................................................................. 37 

Page 7: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 7/82

v

5.2  System Model ................................................................................................... 38 5.2.1  Login Scenario .......................................................................................... 39 5.2.2  Add Member Scenario .............................................................................. 39 5.2.3  Add Book Scenario ................................................................................... 40 5.2.4  Checkout Scenario .................................................................................... 41 5.2.5  Check In Scenario ..................................................................................... 43 

5.3  Relational Database Benefits ............................................................................ 43 

5.3.1 

Redundancy ............................................................................................... 44 

5.3.2  Insertion Anomalies .................................................................................. 44 5.3.3  Deletion Anomalies ................................................................................... 45 5.3.4  Update Anomalies ..................................................................................... 45 5.3.5  Multiple-Value .......................................................................................... 45 5.3.6  Avoiding Data Loss .................................................................................. 46 

5.4  Library System Database Model ...................................................................... 48 5.5  Summary .......................................................................................................... 50 

6  Implementation ....................................................................................................... 51 6.1  Application Structure ....................................................................................... 51 

6.1.1  Public Directory ........................................................................................ 51 6.1.2  Other Directories ....................................................................................... 52 

6.2  Shared Code Concept ....................................................................................... 53 6.2.1  Database Connectivity .............................................................................. 53 6.2.2  General Functions ..................................................................................... 54 

Page 8: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 8/82

vi

6.2.3  Web Server Configuration ........................................................................ 54 6.2.4  Template .................................................................................................... 54 6.2.5  User Class ................................................................................................. 54 6.2.6  Thumbnail Class ....................................................................................... 56 6.2.7  Pagination Class ........................................................................................ 58 6.2.8  Persian Date .............................................................................................. 60 

6.3  Challenges ........................................................................................................ 61 

6.3.1 

Form Live Validation ................................................................................ 61 

6.3.2  Sort Data Instantly..................................................................................... 62 6.3.3  Add Data Instantly .................................................................................... 62 6.3.4  Search Data without Delay........................................................................ 63 6.3.5  Internationalization and Localization Approach ....................................... 64 6.3.6  401 Error Page........................................................................................... 65 

6.4  Summary .......................................................................................................... 65 7  Conclusion .............................................................................................................. 66 APPENDIX ..................................................................................................................... 69 Bibliography .................................................................................................................... 70 Eidesstattliche Versicherung ........................................................................................ 72 

Page 9: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 9/82

vii

LIST OF FIGURES 

Figure 2-1, User Searching for Book (Picture by Author) ................................................ 8 Figure 2-2, Separate Book for each Category (Picture by Author) ................................... 9 Figure 2-3, Books on Shelf with Labeling System (Picture by Author) ......................... 10 Figure 2-4, Letters Represent Subject of Study on LC System ...................................... 10 Figure 2-5, Book Catalogue Card (Picture by Author) ................................................... 11 Figure 2-6, Library Membership Card (Picture by Author) ............................................ 12 

Figure 2-7, Separate Box for each Faculty (Picture by Author) ..................................... 12 

Figure 5-1, User Entity .................................................................................................... 48 Figure 5-3, Library System Entity Relationship Diagram .............................................. 49 Figure 6-1, Pagination Example 1 ................................................................................... 59 Figure 6-2, Pagination Example 2 ................................................................................... 60 Figure 6-3, Form Live Validation ................................................................................... 62 Figure 6-4, Add Required Data Instantly ........................................................................ 63 Figure 6-5, User Details with Mouse Over ..................................................................... 64 

Page 10: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 10/82

viii

LIST OF TABLES

Table 2-1, Simple Library System using Book Registration .......................................... 14 Table 5-1, Book Information .......................................................................................... 37 Table 5-2, Member Information ...................................................................................... 38 Table 5-3, Simple Library Database ............................................................................... 44 Table 5-4, Multiple-Value Using Multiple Rows ........................................................... 46 Table 5-5, Multiple-Value Using Multiple Columns ...................................................... 46 

Table 5-6, Book Table..................................................................................................... 47 

Table 5-7, Author Table .................................................................................................. 47 Table 5-8, Book-Author Table ........................................................................................ 47 Table 6-1, Thumbnail Result with Width and Height Specified ..................................... 57 

Page 11: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 11/82

1

1  INTRODUCTION 

Afghanistan has experienced three decades of civil war and almost all of its

fundamental infrastructures have been affected or destroyed, including its educational

system at all levels. The Afghan society feels the necessity for education more than

ever, and it needs considerable time and effort to fill the gap, build the educational

system concretely and pave the way for new generations to have a system in compliance

with international standards.

In order to reach the goal it is essential to take the first step, thus, in this paper a plan to

kick-start the shift from a paper-based library system to digital has been detailed and the

various implementation steps have been outlined, bearing in mind that expanding theaccess to libraries is pivotal to any effort to improve the educational system in the

country.

As a direct consequence of war, most Afghans are un-educated in computer sciences

and are not familiar with modern technology, or don‘t have any access to education

centers and computers due to financial problems, and because the digital system is a

new system that is not used often in the country, people still prefer using paper-based

information resources for their studies or research. The switch to digital library system

is a major transitional step and certainly takes a sufficient amount of time before it is

fully integrated as a regular practice of academic community and the public.

Using a paper-based system has many constraints and limitations compared to a digital

system as it is associated with wasting or consumption of (more) time, requires more

personnel, and the service quality is much lower than that provided through the digital

system. Having such libraries equipped with a digital system can facilitate and ease the

research process for lectures, students and researchers, who can use online resources,

i.e. research papers, e-books, etc and take part in discussions or electronically exchange

views with people who live thousands of kilometers away from them.

Today, Information Technology (IT) has changed the world massively (examples

include reading our emails and news online using neither paper nor pen, communicating

with instant messengers and Voice Over Internet Protocol (VOIP) while not sending

Page 12: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 12/82

2

letters or going to call centers, watching video or TV shows online without renting / 

buying of physical DVDs, ordering and purchasing products online from around the

world without traveling, and as one of the more recent developments, some minor

surgical procedures can be performed without the presence of doctors). All this

motivated the author to play his own part in supporting the Herat University Libraries in

their effort to improve efficiency and quality of their services and reduce the sort of 

problems and difficulties which accompany their old system. The aim is to provide a

library system with higher speed, accuracy and efficiency. It should be mentioned that

such a system would be replicable and could be easily implemented in other universities

across Afghanistan, once it has been successfully installed in Herat University.

It is needless to say that upon using digital systems, the workflow in the library will be

smoother, more rapid, systematic and well-organized, and all sorts of maintenance jobs

and information processing can be carried out with higher speed, correctness and

efficiency.

1.1  MOTIVATION 

In Afghanistan, most administrative systems are paper-based which are hugely costly,

and their workflow is slow and inefficient in spite of the many staff working in them.

The same situation is seen in libraries as well. Some of the main challenges which

libraries that use paper-based systems experience are as follows:

  Wastage of time: searching for specific books is mostly done by users and it can

be really cumbersome for researchers to look for a desired book in a long list of 

books on the book registration log. This can make the users exhausted and they

may prefer to not use the library anymore (based on interviews with users).

  Loss of books: Tracking of borrowed books is difficult. For example, a member

borrows a book for a specific period of time and does not bring it back on time,

so the book is somehow lost because there is no automation process available,

and someone else can‘t use it anymore.

Page 13: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 13/82

3

  Usage limitation: Information regarding books (i.e. headings, labels, and

announcements) is limited to only one language either in Dari or Pashto; such a

system is limited and can‘t be used by those who do not know the language.

  Costly: Running and maintenance of such a system is very difficult and costly

and requires many staff and expenses.

Since I have studied in Herat University, I am familiar with, and have been able to

locate, the above mentioned irregularities and problems in its libraries. Having that in

mind I decided to do a research on development of a digital system in order to fill the

gap in Afghanistan‘s educational developments. This idea increasingly motivated me to

work on, and think strategically about, replication and implementation of international

system of education in Afghanistan. At the same time, being in Germany helped me

obtain some good and significantly useful information about its university libraries,

which helped me to implement the digital library system in Herat University.

1.2  GOAL 

The main goal behind this thesis is to define some of the key issues related to library

systems and develop a system to demonstrate several of these issues for management of 

library resources and users. It is intended to be used as a creative guide to motivate and

educate users in the power and necessity of running a library in digital system. As such,

the system was required to be easy to use.

Some other goals behind this paper are to examine and evaluate the process in Herat

University Library as an example, discovery of users‘ needs, identify which parts of the

library workflow is required to be automated and digitalized and to implement an

automated and responsive library system which could handle tasks efficiently,

accurately, securely, and rapidly based on the users‘ requests.

When this challenge is addressed and the gap is filled in Afghanistan, the digital library

system can become a standardized system, although gradually and step by step, which

will help lecturers and students to find topics based on their studies and to perform

educational projects which enable them to improve their capacity, skills, etc.

Page 14: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 14/82

4

1.3  THESIS STRUCTURE 

The paper will begin with a brief overview of the history of Herat University and its

libraries as well as their current situation, following which the benefits of the digital

library system and automation will be introduced in details. Next, the required libraryfeatures will be introduced, and focus will also be placed on the analysis of the data

definitions. Finally the most important features will be addressed, including challenges

during the implementation phase.

In general, providing such a system requires investigation, information gathering,

analyzing, designing, implementation and maintenance which will be introduced in

details in the coming chapters, but prior to that there will be an overview of the

organization structure of the paper.

Chapter 2: Background

This chapter will begin by looking at the background of Herat University as well as by

briefly describing the history of Herat University libraries. Then the current workflow

of the libraries will be introduced based on the author‘s surveys and interviews.

Additionally, this chapter covers various aspects, challenges and issues as well as the

disadvantages associated with the current system.

Chapter 3: Digital System and Automation

In this chapter the digital library system and automation will be introduced in details.

Moreover, the benefits of automation such as managing explosion of information,

accessing different types of media, greater efficiency, resource sharing and cooperation

will be addressed. 

Chapter 4: Requirements

This chapter begins by looking at what defines library, through describing its functional

and non-functional requirements, as well as by looking briefly at the features that will

be implemented in the library system based on the users‘ needs. Additionally, the

technical hardware and software requirements will be introduced and addressed.

Page 15: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 15/82

5

Chapter 5: Database Concept and Modeling

There are a number of different aspects of the application that must be covered,

including system model, benefits of using relational database management system, and

entity relationship diagram of the whole library system.

In this chapter, all features of the library management system, including workflow of 

the system in order to accomplish a task, will be looked at and introduced. Each specific

feature will be broken down into its respective scenario. Here we will look at the library

system as a whole and discuss various options that need to be considered.

Chapter 6: Implementation

In this chapter, implementation of the library system will be defined. This process

begins by correctly setting up the environment and general application structure. There

are a number of various types of files in our web application. By defining the

application structure they will be kept as organized as possible. For example, one

directory is required for the web server, which it uses as the base directory and from

which it serves files. Another directory is supposed to hold custom and third-party PHP

libraries, and last but not least is the one to hold web site templates. Besides all this, the

most important features and challenges will be addressed and detailed.

Chapter 7: Outlook and Conclusion

This chapter will detail the challenges and issues which are automated and resolved by

the implementation of the digital system as well as the sustainability and maintainability

of the system itself. Next, the features and modules which are not yet covered by the

current implementation of the system will be described and detailed.

Page 16: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 16/82

6

2  BACKGROUND 

2.1  HERAT UNIVERSITY 

The University of Herat, established in 1988 with only a literature faculty, is one of the

oldest universities in the country and is particularly rich in tradition. It now consists

of 11 faculties (i.e. Agriculture, Computer Science, Education, Economics, Engineering,

Fine Arts, Islamic Studies, Literatures, Law & Political Sciences, Medical and Science)

which cover about 32 departments and totally host more than 6,000 students. (Team,

2009).

The rest of the information in the chapter is achieved by the author through interviewswith Majid Niya, head of Herat University libraries, other library staff and members as

well as through the surveys done by the author in both libraries.

2.2  HERAT UNIVERSITY MAIN LIBRARY 

Herat University main library was inaugurated in 1367 (1988), simultaneously with the

inauguration of Herat University itself.

Since the beginning, this library has gone through many ups and downs. After therecent events and the establishment of a democratic system in the country, Herat

University has undergone some developments. Currently, the library provides its users

with more than 35,000 books in various fields during office hours. Moreover, it has a

thousand journals in Dari, Pashto and English.

The main university library consists of sections including reference books, electronic

section, technical section, book distribution section, journals, and a section on

Afghanistan.

In 1387 (2008), based on an agreement between Herat University and Shahed

University in Iran, two librarians from Herat University library attended a two month

intensive training in Iran, in an effort to build the capacity of Herat library librarians.

Page 17: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 17/82

7

One of the major problems in the Herat University library is shortage of space and lack 

of IT infrastructure. It is hoped that the Ministry of Higher Education and other relevant

government organizations and offices take the necessary measures in this regard.

Currently, courses are offered based on credit system and students and lecturers are on

campus full time. Therefore, building a library in the new Herat University campus

stands out as a necessity.

In spite of all the problems during the educational year of 1387 (2008), Herat University

library distributed 2010 books, was visited on average by 40 people every day and

received 396 members.

2.3  HERAT UNIVERSITY ABU ABDULLAH RUDAKI LIBRARY 

This library, which was previously named Herat Special Library, was renamed as Abu

Abdullah Rudaki during the international Rudaki conference in Herat and Afghanistan‘s

foreign Minister‘s visit to this city.

There are a total number of 11,000 books in this library, of which 6,000 are in Dari and

the other five thousands were donated by the wife of the late German professor, Dr.

Braun.

This library fully runs based on a standardized system and its books are organized

following the Library of Congress regulations, which are globally accepted. Herat

University professors and students who use the services of this library get familiar with

how to use a modern library and will have no difficulty using libraries outside the

country.

Page 18: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 18/82

8

2.4  OVERVIEW OF CURRENT SITUATION 

The remaining part of the chapter will introduce the workflow processes of both

libraries in more details.

2.4.1  BOOK-REGISTRATION Book-registration is one of the old methods for bookkeeping which is currently

practiced in both libraries of Herat University. In this method, registration of book 

identifications and information is done manually by library staff. In this system, there is

a separate book-registration for each subject (i.e. computer related books such as those

on graphic, programming, network and database have their own book-registration,

accounting related books have their own separate book-registration, etc).

Searching for a specific book is cumbersome through these long and unsorted book-

registrations and finding a book can take hours. Besides, after the book is found on the

log, a librarian is required to look for its location (see Figure 2-1).

Figure 2-1, User Searching for Book (Picture by Author)

Today, it is the age of information and technology, and it is not efficient to keep book 

information on book-registration logs containing lists of books based on the subject (see

Figure 2-2 ) as the number of subjects in which books are written increases over time,

new fields and subjects come to being continuously and, in addition, there are

Page 19: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 19/82

9

interdisciplinary books that can be classified under more than one subject (e.g. books on

related Engineering and Computer subjects).

Figure 2-2, Separate Book for each Category (Picture by Author)

Thus, with the methods currently in use in Herat University libraries, it is impossible to

edit book information and hard to track books which have been checked out. In

addition, book logs cannot be easily edited for lost and archived books.

All in all, the workflow in the library is much slow, disorganized and inefficient, and thesystem is very tedious for both users and librarians.

2.4.2  BOOK LABELING IN THE MAIN LIBRARY 

Labeling is like an address. It helps librarian to figure out where a book or other

document is located on a shelf in the library. In fact this system is not a standard one

since each librarian implements their own concept of labeling which is understandable

only for them (see Figure 2-3).

The Library system will be inefficient and difficult to understand in the absence of the

librarian who implemented the labeling.

Page 20: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 20/82

10

Figure 2-3, Books on Shelf with Labeling System (Picture by Author)

2.4.3  CALL NUMBER SYSTEM IN THE MAIN LIBRARY 

Nowadays most educational libraries in developed countries use the Library of 

Congress (LC1) call number system. This system uses a combination of letters and

numbers to arrange materials on the shelf by subject as illustrated in Figure 2-4

(Mazinani, 2000).

Figure 2-4, Letters Represent Subject of Study on LC System

1

established in 1800 in the American Library of Congress for better services

Page 21: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 21/82

11

Since LC arranges materials by subject, the first letter(s) represents the general subject

area, and the number represents a specific subject, the third line represents the author‘s

name and the last line is the year it was published.

The Call Number can be considered like an address, exactly telling where a book or

other media is located on the shelf in the library. As a standard system, it is not

dependent only on a certain librarian but, instead, is understandable for everybody

irrespective of where on the globe they are.

Recently, Librarians were trained on putting the LC system in place, so now they

generate call numbers using some algorithms and regulations and stick them on the

spine of the books.

2.4.4  BOOK LENDING 

Besides generation of a call number based on the LC system and sticking it on the spine

of the book, a catalogue card containing book information and lending schedule table is

placed inside the book by librarian (see Figure 2-5).

Figure 2-5, Book Catalogue Card (Picture by Author)

Page 22: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 22/82

12

Users who do not have library membership card are not able to borrow any book, and

users are required to be registered as a library member in order to obtain the

membership card.

Figure 2-6, Library Membership Card (Picture by Author)

When a user requests to check out a specific book, the librarian will fill out his / her

required information on the catalogue card with consideration of the due date for

returning of the book, and will stick membership card with catalogue card together and

keep them in a box as it is shown in Figure 2-7 (for better efficiency there is a separate

box for each faculty).

Figure 2-7, Separate Box for each Faculty (Picture by Author)

Page 23: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 23/82

Page 24: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 24/82

Page 25: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 25/82

15

2.5  SUMMARY 

In the current era, with the advent of new branches of science and expanding existing

branches and the growing number of students, lecturers and researchers, traditional

libraries with manual and paper-based workflow activities cannot maintain and managethe huge number of existing books and other resources, and also cannot respond to the

applicants‘ requests efficiently. 

One of the usages and benefits of Information and Communication Technology (ICT) is

introducing of digital and automated library systems, which can play an important role

in development and be a convenient means for sharing of resources and information.

Additionally, most manual activities will be reduced and the workflow in the library

may be carried out faster, and in a more organized and efficient way. All types of 

housekeeping jobs and information work can be done with higher speed, accuracy and

greater efficiency.

The next chapter will introduce the digital and automated library systems including their

benefits in more details.

Page 26: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 26/82

Page 27: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 27/82

17

3.1  NEED FOR A DIGITAL AND AUTOMATED LIBRARY 

Various factors and challenges have caused to bring about the change from paper-based

or traditional library to digital library systems.

The fundamental reason to create digital libraries is better distribution of information

compared to the past. Although traditional libraries are an integral part of society but

they are not complete.

During centuries paper has been used as the main media for the storage of media

publications. But in current era with the huge explosion of information and existence of 

various sources of information, paper as media can no longer respond to the increasing

needs of human.

As an example, consider using a real or traditional library, where the reader must be

present. It takes only a few minutes of university members, but most people are not

university members and neither is the library in their vicinity. Most researchers,

engineers and students will not have enough access to latest information if they rely

solely on traditional libraries.

The remaining chapter will introduce the benefits of digital and automation librarysystem in more details. The benefits also can be applied to digital index, not only to

digital library.

3.1.1  AVAILABILITY OF INFORMATION 

In traditional libraries, access to resources and documents is only possible as much as

the number of existing copies allows, and also users cannot use them until they are

brought back in the library; in contrast with this, access to digital library resources and

materials are available for unlimited number of users. The same concept applies to

digital index as in a traditional library system one user can use the book-registration log

at a time.

Using of traditional libraries is restricted to certain days of week and certain hours of 

day, but in digital libraries there is no time limitation and at any time the system can be

used.

Page 28: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 28/82

18

In traditional libraries danger of loss of documents and resources due to negligence or

mistake exists and sometimes it may even be impossible to pay costs for such losses,

but this concern does not exist in digital libraries and the documents can be kept in a

secure way.

Lack of Physical Boundary: Visitors who use the digital library do not need to

physically visit the library as long as Internet connection is available, people around the

world can have access to the same information at the same time with no conflict. 

Lack of Time Boundary: An important advantage is that digital library clients can

access information and the library‘s resources any time, day or night; unless there is no

Internet connection. This is in contrast with traditional libraries which are only open and

accessible during the official time. 

Multiple Accesses: The same resources shall be used simultaneously by several users.

For instance, if there is a PDF version of book available it does not make difference

how many users are using it; while traditional libraries are limited to the number copies

which exist. 

Structured Access Method: Digital libraries provide more organized access to content

in much richer ways. This means that it is easily possible to move from a list of books to

a special book, and then to a special chapter.

Information Retrieval: Users can search the total collection using any search phrase

(word, phrase, title, name, and subject). Digital libraries provide a very easy way to use

resources through interface. 

3.1.2  MANAGEABILITY OF INFORMATION EXPLOSION 

The huge growth and explosion of documents (i.e. books, articles, journals, etc) can be

felt considering the fact that the number of documents doubles almost every two or

three years written by people around the world and available in various formats and on

various fields, especially in areas of science, social science and technology in the form

of book and non-book material. This forced the library planners to utilize new

technology for the organization of information since the traditional library methods

failed to cope with the task (Nabil, 1996).

Page 29: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 29/82

Page 30: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 30/82

Page 31: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 31/82

Page 32: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 32/82

22

3.2  SUMMARY 

In physical or traditional libraries, access to books is only possible as much as the

number of existing copies allow, and next visitors cannot use them until they are

brought back; in contrast access to resources of a digital library are available forunlimited number of users.

Using of traditional libraries is restricted to certain days of week and certain hours of 

day, but in digital libraries there is no time limitation and at any time the system can be

used.

Physical access to the library for people in remote areas could not be accomplished and

this makes it difficult for anybody who lives away from physical libraries to use themfor educational, research and study purposes but in digital libraries distance has no

meaning, anyone in any place who has access to Internet can use the resources.

In physical libraries risk of loss of documents and resources due to negligence or

mistake exists and sometimes it may even be impossible to compensate such losses, but

this concern does not exist in digital libraries and the documents can be kept in a secure

way.

The aforementioned benefits also apply to the digital index and not only to digital

library. For instance in traditional libraries the book-registration log can be used by one

user at a time and also it is not available remotely and risks for loss of it exist as well.

Overall, considering the problems with paper-based systems, and the benefits of 

computerized systems, it is decided to implement such a system to overcome some of 

the aforementioned difficulties and offer services with ease and efficiency instead.

In general providing any system requires investigation, information gathering, analysis,

design, implementation and maintenance. Definition of Requirements for the proposed

library management system for the Herat University libraries will be covered in the next

chapter.

Page 33: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 33/82

23

4  REQUIREMENTS 

In System Development Life Cycle (SDLC) of software engineering, the word

requirement can be defined as an introduction of what a system or a product does, if it is

a must, referred to as a functional requirement. This type of requirement specifies

something that the delivered system must be capable to do. Another type of requirement

specifies something about the system itself, and how well it performs its functions. Such

requirements are often called non-functional requirements. Examples of such

requirements include accessibility, usability, reliability, maintainability and in a word

ease of use.

To sum up, a requirement is defined as a condition and criteria the system must meet for

the customer to find the system satisfactory. Requirements serve as an agreement

between the system developers and the customers for whom the system is being

developed. The system developers agree to provide the capabilities and functionalities

specified. The customers or clients agree to find the system satisfactory if it provides the

mentioned capabilities.

As a result of the investigations and surveys performed by the author, and the interviewsdone with library and academic staffs, the following components are found as the most

essential ones for the system to provide. It shall overcome problems related to manual

and paper-based activities, automate most of the feasible tasks such as data summary,

overdue feedback for the borrowed books, and provide ease of use of the library for the

members.

Book Management: The library management system shall allow authorized users to

review, add, update and delete books information.

User Management: The library management system shall permit authorized users to

review, add, update and delete users‘ information. 

Search: The library management system shall allow users including either library or

academic staffs to review, and search resources.

Page 34: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 34/82

24

Check in and Checkout: The library management system shall allow authoritative

users to review and search checked out books in order to extend the due date or inform

users to bring back the book.

Report Generation: The library management system shall automate most calculation in

order to provide useful statistical data.

News and Announcements: The library management system shall let users, either

library or academic staffs, to review and search for recent news and announcements

with regards to the library.

4.1  FUNCTIONAL REQUIREMENTS 

The functional requirements describe the core functionality of the library management

system. In more detail, functional requirements are the functionalities which are

required for the library management system as without them the system can‘t be

complete and function properly. These are sometimes known as system capabilities.

Book and User Management

The library management system shall allow authorized users e.g. library staffs to

review, add, update and delete books and users information.

This is because the library staff need to have an admin section with qualified

functionalities that manages resources, either book or user information, or other

resources when it is required.

Simple and Advanced Search

The library management system shall permit library members including either library or

academic staff to search and review resources such as books information and news

announcements. Authorized users shall be allowed to search for all kinds of resources

including books, users, news etc in order to review, change or update information.

Search feature facility shall allow the finding of resources in a matter of seconds

without time wasting. The search feature will be based on various criteria. In addition,

advanced search feature is provided in order to search various conditions and criteria

Page 35: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 35/82

Page 36: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 36/82

26

There are different categories of users namely administrator, library staff, lecturers and

students. Depending upon the category of user the access rights and permissions are

decided. This means if the user is an administrator then he / she can be able to modify

the data, delete, append, etc. All users other than library staff such as students and

lecturers only have the rights to retrieve the permitted information.

4.2.1.2  ENCRYPTION OF STORED PASSWORDS 

Most of the users have different accounts for their emails, messengers, social networks

(i.e. Yahoo, MSN, Skype, Live Messenger, Facebook, and MySpace) and most of the

times use the same password. Thus, passwords of system users in the database are

stored encrypted with using Secure Hash Algorithm (SHA), even if unauthorized users

achieve access to the database, the passwords are unusable since they are encrypted.  

4.2.1.3  PASSWORD RECOVERY 

Password recovery is usually a useful and significant feature and component of the

system. It can be counted as an automated feature of the system which decides and

operates by itself, and there is no need to ask library staff for lost / forgotten password.

4.2.1.4  SECURITY IMAGE /  CAPTCHA 

CAPTCHAs (Completely Automated Public Turing test to tell Computers and Humans

Apart) keep spam programs out of systems. Right now the most popular social

networking sites (i.e. Facebook, MySpace, etc) and other application systems use

CAPTCHAs in their registration form since screen readers are not able to read the text

in CAPTCHAs. Therefore by using CAPTCHA also known as security image, system is

able to differentiate between human and computer or screen readers.

4.2.1.5 

DATA SANITIZATION AND VALIDATION 

Validation of data is a very essential and vital part of working with forms. Not only can

invalid submitted data lead to security problems (i.e. SQL injection, XSS, session

fixation, etc), but it can also crash the system.

“A critical concept related to handling HTML forms is that of 

validating form data. In terms of both error management and 

Page 37: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 37/82

Page 38: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 38/82

Page 39: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 39/82

29

4.2.2.3  SMART DATA SORTING 

Based on the survey and interviews carried out by the author, accessing the required

information and favorite resources are one of the most essential modules mostly used by

the library staff during book management (edition of information, deletion of unneeded

books, check in and checkout transactions), and members while looking for their

favorite books. Thus, including smart sort feature handles sorting of data based on

multi-column and parses text, integers, currency, floats, and dates data types without

 page refreshes and will apply applicants‘ requests more efficiently. 

4.2.2.4  PAGINATION 

Pagination is basically the concept and process of taking a set of huge records of data

and spreading them out over many pages to make them much easier and more flexibleto be viewed by users.

The concept behind pagination is, if there is hundreds and thousands of records of 

information displaying only on a single page; not only it would be a headache for users

to try and read through the long page, but it will also be a cause for reducing system

performance as it takes much time to display them.

4.3  HARDWARE REQUIREMENTS The system is going to be used in Herat University libraries. The network architecture

would be client/server, so system would be installed on the server, and the clients could

access it via browsers.

Since currently there is not a very large compound for the both libraries, and neither

there is significant rush of the members nor huge growth of information and resources,

so three desktop computers would be sufficient to make the internal network of each

library. One of the computers shall be considered as the server for the system and the

required tools and software would be installed on it. The other two computers will be

used as client by members for accessing material and resources.

Page 40: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 40/82

Page 41: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 41/82

Page 42: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 42/82

Page 43: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 43/82

Page 44: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 44/82

34

4.5  SUMMARY 

Based on the author‘s investigations and surveys in Herat University libraries, Herat

Public Library, some online library management systems, and interviews with library

staff, the proposed system requirements and specifications have been discovered and

categorized as functional and non-functional.

In order to fulfill the listed requirements and specifications, it is essential to analyze and

divide them into multiple tables in order to reduce and overcome repetition of unneeded

data. Additionally, elimination of database anomalies (insertion, deletion, and update

anomalies) is important.

In order to create communications and negotiation space between the system developers

(database designers and application programmers) and customers (library staff), it is

necessary to have a model of the database system that is understandable for both parties

(developers and customers).

The coming chapter will introduce the methods of data analysis and their benefits.

Besides, the database entity relationship model of the system will be introduced in more

details.

Page 45: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 45/82

35

5  Database Concept and Model

The model of a database provides a useful blue-print and perspective, in particular for

the purposes of the initial design of the database. Additionally, it is a bridge between the

developers and customers; since the customers do not have technical knowledge, thus

the database model provides ways of communication and discussion between them.

The general principles and concepts of the use case scenarios and models for the library

database systems will be illustrated and introduced in detail through the entire chapter.

The database library example is designed to hold data about the books in a certain

library for the purpose of illustration and description; in addition, the amount of data

which will be used will be kept artificially small just as much as necessary to exemplify

the concepts.

In order to start building the basic model, the database designer is required to analyze

the information gathered during the previous chapter for the purpose of (a) classifying

data objects as either entities or attributes, (b) identifying and defining relationships

between entities, (c) naming and defining identified entities, attributes, and

relationships, and (d) finally draw its Entity Relationship diagram.

5.1  INPUT DATA 

The results of the input data are based on surveys and interviews performed by the

author in Herat University libraries, Herat Public Library, some online library

management systems, and last but not the least with library personnel in regards with

required data.

5.1.1  BOOK INFORMATION Herat University libraries use book registration logs for the purpose of keeping and

tracking of books information. Also part of books information is kept on the book 

catalogue cards for the purpose of tracking lent books. Table 5-1 is the needed data for

the book based on results of the author‘s surveys and interviews. 

Page 46: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 46/82

Page 47: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 47/82

Page 48: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 48/82

Page 49: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 49/82

39

5.2.1  LOGIN SCENARIO 

Before directly describing the login scenario, it would be useful to define different types

of users. The proposed system will have two types of users. One for academic members

(i.e. lecturers and students; chosen different names due to statistical purposes to achievenumber of users based on their types; besides system sustainability in future to define

different access level for each), and the other one for administrators (administrators / 

librarians; currently both have same right and access level but the reason behind

choosing two different names is to define different privileges in future for each).

Currently the academic member‘s login does not provide them more privileges on the

system. In future when there is good IT infrastructure and Internet accessibility —  

members can log into the system from anywhere in order to make book reservation,

check their account, change their passwords and profile information, etc.

When resource administration is required library staff can login the system and their

login information will be checked and matched against database information. In case

login information is correct; administration navigation links appears to the logged in

member. If the login information does not match with database information the member

will be redirected to the home page.

5.2.2  ADD MEMBER SCENARIO 

Adding a member is the task of authorized users (i.e. library staff with right access level

privileges); thus the page is required to be restricted for academic users and only

accessible when library staff with right privileges logged in.

During entry of member‘s information, the system should be smart on data validation

and responsive as fast as possible when invalid data typed. The system will take care of the following validations:

Required: Validate against either empty value or null.

Valid Characters: Invalid characters will not be accepted (i.e. %, ^, $, etc).

Valid Email: Valid email address must be supplied (i.e. [email protected]).

Page 50: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 50/82

40

Remote: Requests a resource to check the form element for validity i.e. username,

email, and ID duplication is not allowed.

Min Length: Makes the form element require a given minimum length.

Max Length: Makes the form element require a given maximum length.

Numeric: Allows numeric data type.

Accept: Makes the form element require a certain file extension (i.e. .jpg, .jpeg, .bmp,

.png).

Equal To: Requires the form element to be the same as another one (i.e. password and

confirm password elements must be matched).

When member‘s information is typed correctly successful feedback appears, stating that

member added into the database successfully.

Otherwise, if there is something wrong with data entry, warning feedback appears

displaying the missing and incorrect typed information.

Besides client side data validation; it is essential to check and validate data on the server

side too; since Java Script can be disabled on browsers.

5.2.3  ADD BOOK SCENARIO 

Adding books into the database is the duty of authorized users; thus the page is required

to be restricted against unauthorized users and only accessible when members do login

with appropriate access level.

Certain data are required and must be validated; besides client side data validation; it is

required to validate data on the server side as well; since Java Script can be disabled on

browsers.

Page 51: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 51/82

41

During book registration process in addition to data validation there are some issues and

challenges, which are useful to be considered. They are listed as follows:

Author for the Book: A book can be written by more than one author, so the challenge

is to make the system smart enough to be able to add as many new authors as required

in place which is not available in the list. 

Category for the Book: More than one category may be applied for a book, for

example a book with the title of ―PHP and MySQL in 21 Days‖ is related to database

and programming categories, so the system should be smart enough to add as many new

categories as required in place which is not listed. 

Publisher: System must be able to handle adding of new publishers which do not existin the database already. 

Book Copies: Books are donated or purchased in the library, sometimes carrying more

than one copies. The problem is that the number of copies are not clear so there maybe

one, two… ten, fifteen, more or less. System must be smart to add as many numbers of 

copies as required without refreshing the page, and without removing the already typed

information. 

When book information is typed correctly, successful feedback appears stating that

book information is saved in the database successfully.

Otherwise, if any required field is missing or typed incorrectly; warning feedback 

appears while describing the missing and incorrect parts.

5.2.4  CHECKOUT SCENARIO 

The proposed library management system is supposed to handle checkout resources forusers. In addition, it is to keep track of already checked out (borrowed) resources by

members including important information (i.e. member and book details with checkout

and due date). Due to security issues this page is only accessible to authorized users,

and restricted to unauthorized members and neither accessible by typing its correct URL

directly.

Page 52: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 52/82

42

Certain conditions are required to be evaluated in terms of checkout book. These

conditions are based on the policy of the library and should be customizable.

  The original book never can be lent; will be kept as a reference in the library, but

members are allowed to use it inside the library.

  In addition to book information, each book carries an action link captioned

―checkout‖, if the book is ready for checkout it is active; otherwise not.

Whenever a book is given to a member as lend, it must be marked as deposited

and the action link ―checkout‖ becomes inactive. 

As illustration, let‘s consider a book which meets all the checkout conditions, the

following steps take place during the checkout process.

  Clicking the action link ―checkout‖, will direct the administrator to the checkout

page, displaying the selected book information.

  Members‘ information is already listed in a drop-down. System is smart enough

to filter the checkout list based on member selection from the drop-down; this

helps administrator to check member‘s account without extra action and

headache.

  Current and due date are automatically filled out by the system but editable with

accepting a different date. Since there is no good IT infrastructure and neither

there is stable power the system may be down during the checkout and check in

process; so checkout and check in can be done at a moment later on, that is

when system is up administrator can register that.

When all the above mentioned criteria takes place correctly and is submitted, thecheckout process is done and the book will be marked as deposited; and the action link 

―checkout‖ becomes inactive. 

Page 53: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 53/82

43

5.2.5  CHECK IN SCENARIO 

Check in process takes place in the checkout page, where all the borrowed books are

listed. Search facility is included in this page in order to look for specific records; search

can be applied on many different criteria (i.e. book title and signatory, user‘s first nameand father‘s name). 

After recognizing the member who brings the borrowed book back; check in process

will be completed as follow:

Simply click the action link ―check in‖, and the administrator will be asked for 

confirmation; when confirmation is canceled nothing will happen. If confirmed,

successful feedback will appear on top of the page. And at the meantime the book will be marked as available, so the action link ―checkout‖ will be activated again.  

Now that most of the requirements definitions and specifications of the library

management system are clear; and besides to this, it is clear what exactly occurs when

users interact with the system, it is time to work on the database model.

5.3  RELATIONAL DATABASE BENEFITS 

Maintaining of a simple database, the so-called flat database consisting of a single tablewith no huge data, does not require relational databases. On the other side, most

databases worth maintaining are quite a bit more complex and cannot be handled with

using flat-database and book-registration logs as is the case in Herat University

libraries.

“Consider, for example, the Library of Congress, which has

over 16 million books in its collection. For reasons that will

become apparent soon, a single table simply will not do for this

database (Roman, 1999)”. 

Herat University libraries use flat-file database and book-registration logs with data that

are related. This is where using a relational database management system becomes

essential, since it is not possible to maintain such huge and complex data using either

Page 54: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 54/82

Page 55: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 55/82

45

5.3.3  DELETION ANOMALIES 

For the same reason as insertion anomaly in Table 5-3, it is not feasible to delete either

the author information or the publisher information with keeping just the book 

information; such a problem is called a deletion anomaly.

5.3.4  UPDATE ANOMALIES 

Due to a need to change the address of a particular publisher in Table 5-3, it is required

to update the records of all books published for that publisher (i.e. publisher for the

book with Call Number DB-0001 and WEB-0001). In case the modification is not

fulfilled on all the relevant records, the database will be inconsistent, such a problem is

called update anomaly.

5.3.5  MULTIPLE-VALUE 

It is clear that there can be more than one author for a book as it is illustrated in Table

5-3, so with using flat-file databases there will be three possibilities to implement it;

each including drawbacks and weaknesses as follows (Roman, 1999):

  Including all authors of the book in a single column of table with separation of 

comma delimiters as it is presented in Table 5-3. The problem is the database

anomalies as stated already.

  Provide multiple rows for multiple authors, one separate row for each author of 

the book as it is demonstrated in Table 5-4. The drawback with using multiple-

rows is that all of the data about a book and publisher must be repeated as many

times as there are authors for the book, which is an obvious case of redundancy.

Call Number Book Title Author Info Publisher Publisher Address

DB-0001 MySQL in 21 Days Tom Logan Mercury Canada

DB-0001 MySQL in 21 Days Cristina Silva Mercury Canada

DB-0001 MySQL in 21 Days Bob Logan Mercury Canada

DB-0002 SQL-Server Cristina Silva Neptune Germany

Page 56: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 56/82

46

WEB-0001 HTML Ana Nava Mercury Canada

WEB-0001 HTML Gloria Rivera Mercury Canada

Table 5-4, Multiple-Value Using Multiple Rows

  Accommodate multiple authors with using multiple columns on a single row;

one column for each author of the book as it is shown in  Table 5-5. Using

multiple columns approach presents the problem of guessing how many author

columns we will ever need as it is unanticipated, and creates a lot of wasted

space for books with only one author.

Call_Number Book_Title Authors Information Publisher Publisher_Add

1 2 3

DB-0001 MySQL in

21 Days

Tom

Logan

Cristina

Silva

Bob

Logan

Mercury Canada

DB-0002 SQL-

Server

Cristin

a Silva

Neptune Germany

WEB-0001 HTML Ana

Nava

Gloria

Rivera

Mercury Canada

Table 5-5, Multiple-Value Using Multiple Columns

5.3.6  AVOIDING DATA LOSS 

Using relational database instead of flat-file database is to split and break the data into

multiple tables. Thus, one difficulty in designing a relational database is figuring out

how to divide the data into multiple tables so as not to lose any information.

During designing of a relational database, sometimes it is required to define additional

tables considering as relationship among other tables in order to keep consistency of 

data and avoid losing of information. For instance, splitting Table 5-3 will result three

tables as Table 5-6, Table 5-7, and an additional one, Table 5-8 if we had left out the

Table 5-8, there would be no way to determine the authors of each book. In fact, the

Page 57: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 57/82

Page 58: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 58/82

48

5.4  LIBRARY SYSTEM DATABASE MODEL 

All in all, using benefits of relational database with elimination of redundancy and

different types of database anomalies, multiple-value problems and avoiding data lose;

it is time to split data of book and member information (Table 5-1and Table 5-2) respectively into multiple entities with their related attributes.

In the library management system after analyzing input data, the library resources

required entities are listed as (BOOK, BOOK_COPY, AUTHOR, PUBLISHER,

CATEGORY, USER, and FACULTY). For the purpose of illustration the USER entity

will be described as follows:

User Entity: User entity is the set of all the library users. The user is described by theattributes user_id which is assumed as an artificial auto incremented primary key for the

purpose of relationship definition, Name etc. 

Figure 5-1, User Entity

Page 59: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 59/82

49

Library System ERD

Figure 5-2 is the complete ERD for the library management system. It presents an

abstract, theoretical view of the major entities and relationships needed for management

of libraries resources.

Figure 5-2, Library System Entity Relationship Diagram

Page 60: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 60/82

50

5.5  SUMMARY 

To sum up, to keep away from redundancy problems as much as possible and different

unpleasant database anomalies, a database is required to contain multiple tables, with

relationships defined among tables as necessary. On the other hand, this raises someissues and challenges, such as how to split data into multiple tables in the database,

keeping consistency among them in order to avoid data loss, and how to join the data

back together from multiple tables to create different views.

Scenarios make clear the activity of actors with the system and state what happens when

users interact with the system; in addition, the database model acts as a bridge between

the developers and clients and provides a way of communication between both parties.

In this chapter the requirement definitions and specifications of the proposed library

database management system was analyzed and detailed by using scenarios and

database model and finally the ERD was achieved. Thus, the application programmers

can start their work by planning the overall structure of the application and coding

concept. In the coming chapter the implementation part will be introduced in more

details.

Page 61: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 61/82

51

6  IMPLEMENTATION 

Based on the system development life cycle, the prerequisites of library management

system were covered and described in details in previous chapters. The next step is the

implementation part which will be described in detail throughout this chapter.

6.1  APPLICATION STRUCTURE 

To start with, any coding and programming concept would be useful to plan and decide

the directory structure of the system.

Implementing the concept of dividing the application into different following sections:

Model: Including the logic part

View: That describes the presentation part

Controller: As an interface between the Model and View

As well as the concept of directory structure achieved by reading and practicing the

book ―PHP and MySQL: Create-Modify-Reuse‖ written by (Psinas, 2008).

6.1.1  PUBLIC DIRECTORY 

The directory name is explanatory; all files in this directory will be publicly accessible

by the web server. Although PHP will be able to reference files from anywhere in your

setup, the web server should only serve files from the public directory, since keeping all

other support directories and files outside of the publicly accessible directory increases

security issues.

In a word, this directory is the root for the web server. The only files accessible from theInternet and local network are the ones located in this directory. There are many other

subdirectories inside public directory for better organization and structure describe as

follows: 

CSS Subdirectory  – Since the proposed system is required to be as usable as possible,

using CSS is a need. It is preferable to keep the CSS separate from HTML code in order

Page 62: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 62/82

52

to make the system extendable in future. Placing CSS code in a separate file allows the

web designer to completely differentiate between content (HTML) and design (CSS).

Java Script Subdirectory  – Separation of Java Script from HTML is useful since there

is no mix between Java Script and HTML coding. Additionally, it makes the system

more consistent to be extendable and maintainable. This will conveniently keep the

HTML file small, and prevent non-Java Script browsers from mistakenly displaying the

Java Script source.

Image Subdirectory  – It is useful to keep all images which will be used for design

purpose of the application (i.e. HTML and CSS files) in a separate directory for better

organization structure.

Photo Subdirectory  –  By storing members‘ photo into a separate directory the

application will be more structured and managed.

6.1.2  OTHER DIRECTORIES 

Lib Directory  – Files, such as classes (i.e. user, book, author, publisher, category), and

common files such as database connectivity, common variable, functions which are

going to be shared by any number of other files will be kept inside this directory.

Template Directory  – Template is the root for the view and presentation files. The

template files which describe the structure and layout of the application will be kept

inside this directory such as header, footer, sidebar, content and other layout sections.

Sql Directory  – SQL directory will contain the data files of the library database

management system such as database schema.

Log Directory  – Log directory stores the applicable log files generated directly by the

library database management system. It can also contain web server log files, database

log files, etc for the administration purposes.

Page 63: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 63/82

53

Lang Directory  – Lang directory contains files which will be used for the

internationalization and localization of the library system — mostly interface translation

files (i.e. labels, feedback, error messages, etc).

Doc Directory  – Doc directory keeps the project documentation files, including

documents and user manual as well as database diagrams.

6.2  SHARED CODE CONCEPT 

Code that is shared by multiple files should be set aside in its own file and included

using include or require PHP commands; so it's not duplicated, which makes

maintaining the application easier. For this purpose Object Oriented Programming

(OOP) concept becomes handy and useful based on the below definition.

“Object -oriented programming evolved in response to the

 problems of maintaining complex code by breaking it down into

discrete units of programming logic. The aims were reusability

of code and ease of maintenance through a modular, generic

approach to common programming tasks. (Powers, 2008)” 

Where possible, code that might be useful in future expansion of the application shouldbe collected separately as functions or classes to be reused. It's a good idea to write code

with re-usability and DRY (Do not Repeat Yourself) concept in mind. The remaining

chapter will introduce the shared code concept and their benefits in more detail.

6.2.1  DATABASE CONNECTIVITY 

Establishing a connection to a MySQL database is a common activity which makes it

desirable to place the needed code in its own file named db.php. Db.php holds

configuration constants and code to establish the connection to the database, and the

escape_data () function was defined as a way to sanctify user input before storing it in a

database.

Page 64: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 64/82

54

6.2.2  GENERAL FUNCTIONS 

Common functions can also be placed in a separate file named function.php for better

managing the code and ease of sustainability in future. For instance, a function that

generates random number will be used to generate a CAPTCHA string and validationtoken in order to activate the account in future.

6.2.3  WEB SERVER CONFIGURATION 

Common.php file contains shared code to be included in other scripts in the application

to establish a sane baseline environment at run-time (i.e. web server configuration such

as enabling and disabling display errors, setting what sorts of errors to be displayed,

define of default time zone and etc).

6.2.4  TEMPLATE 

Templates make it easier for developers to maintain a consistent blue print and

prototype across many pages, they help keep the code well organized, and they move

presentation logic out of code, making both the PHP and HTML files more readable.

The best idea is to keep the core of the presentation and layout in a specific file in the

templates directory.

6.2.5  USER CLASS 

The majority of the code written for maintaining a user‘s account can be encapsulated

into one class, making it easy to extend or reuse in future applications. This includes the

database interaction logic, which will make storing, retrieving, editing and deleting user

information much easier.

The class user.php has two private properties $uid which maps to the user entity‘s

user_id attribute, and the array $fields which maps to the rest of attributes. They are

exposed in an intuitive manner by overriding the get () and set () magic methods of 

PHP. The static getById () and getByUsername () methods contain code responsible for

retrieving the user details from the database by their id or username.

The save () method writes the user information to the database and is smart enough to

know when to execute an insert query or an update query based on if the user_id is set.

Page 65: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 65/82

55

There are other various static methods available for the purpose of user statistical

calculation e.g. retrieving number of users by their faculty, gender.

All that‘s necessary to create a new user account is to create a new instance of a user

object, set the record‘s fields, and calls save () method as follow:

It‘s the same logic to update user information; first it is required to retrieve the existing

user by calling the static method getByUsername () and passing the username of the

user where modification is needed, make the changes, and again save it to the database

with calling save () method as follows:

The other entities (BOOK, AUTHOR, CATEGORY etc) carry out the same concept and

logic as User.php.

<?php$u = new User ();

$u-> first_name = 'Abdul Rahman';$u-> last_name = 'Sherzad';...$u-> username = 'Sherzad';$u-> password = sha1 ('password');$u-> email = '[email protected]';

$u-> save ();?>

<?php$u = User::getByUsername ('Sherzad');

$u-> original_residence = 'Herat - Afg';$u-> current residence = 'Berlin - Germany';...$u-> username = 'absherzad';$u-> password = sha1 ('secret');$u-> email = '[email protected];

$u-> save ();

?>

Page 66: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 66/82

56

6.2.6  THUMBNAIL CLASS 

Members‘ photo may be of unequal dimensions, and their file sizes can vary

significantly. This variation creates problems when downloading and displaying a group

of photos because one large photo can occupy the entire screen. Besides, they can slowdownloading to an undesirable pace. One solution to the problem of inconsistently sized

and large photos is to create a thumbnail image class, which creates small images

(thumbnails) of equal dimensions. By reducing the quality of a photo, this class will be

able to further reduce file size and hence download times (Lavin, 2006).

In order to consider future sustainability and maintainability of the system (i.e. it may be

required to store cover image of the book for better identification, or an image gallery

may be required, etc); then it is useful to have a separate class handling the functionality

of thumbnail creation for various types of images (i.e. jpg, gif, png, bmp).

The thumbnail class is smart enough to create image thumbnails with user defined width

and height, or just either of them. For better clarification see the following piece of 

code:

First an instance of the class Thumbnail is created, then the path for the original image

will be assigned, and afterwards the address for the thumbnail image with new

// create a thumbnail image with width and height given

$img = new Thumbnail (); //create instance of the class

$img->PathImgOld = "path/oldImage.jpg"

$img->PathImgNew = "path/newImage.jpg";

$img->NewWidth = 170;

$img->NewHeight = 127;

if(!$img->create_thumbnail_images ()) {

$errors = 'Thumbnail could not be created!';

}

//Thumbnail image will be saved to specified path if all is ok.  

Page 67: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 67/82

57

dimensions will be assigned, and finally check if there is any error throws exception;

otherwise the thumbnail image will be created.

For the purpose of illustration, the original and thumbnail images are displayed on the

screen as it is demonstrated in Table 6-1. 

oldImage.jpg

newImage.jpg

Table 6-1, Thumbnail Result with Width and Height Specified

Page 68: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 68/82

58

6.2.7  PAGINATION CLASS 

When there is a large number of images in a directory or large number of members and

 books records, it‘s not desirable to display all of them on one web page because doing

so will almost certainly create a long page and in addition will degrade the systemperformance (Lavin, 2006).

The paginator.php class will take the task of creating a navigator list using some

algorithms on total number of available data records; as the system is required to be

extendable it is essential to determine how it should work. Keeping its design flexible

and make sure that its appearance is easily configurable so that it can blend with the

style of any particular page.

All that‘s necessary to create pagination navigation links is to create a new instance of a

Paginator object and assign total number of records and afterwards call the

display_pages () method as follows:

  The first line of the code gets the total number of records

  The second line gives a new Paginator object to use it and initializes the default

values behind the scenes.

  The third line uses variable containing the total number of records and assigns it

to the Paginator items_total property.

$num_rows = mysql_num_rows(mysql_query($sql));

$pages = new Paginator;

$pages->items_total = $num_rows;

echo '<div class="paginator">';

$pages->paginate();

echo $pages->display_pages ();

echo '</div>';

Page 69: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 69/82

59

  The fourth line is just a container using a CSS class style

  The fifth line tells the Paginator class to get to work and paginate and finally the

sixth line displays pagination links see Figure 6-1 number of records per page is

set to two.

Figure 6-1, Pagination Example 1

Decision is to provide option of changing the number of items per page or jumping to a

specific page. No change is required to be made inside the Paginator class; simply

customizable through its additional methods as follows:

// fetch total number of records 

$num_rows = mysql_num_rows (mysql_query ($sql));

$pages = new Paginator; //create instance of the class paginator

//assign total number records into Paginator property 

$pages->items_total = $num_rows;

echo '<div class="paginator">'; //div container for the style purpose 

$pages->paginate (); //create the pagination links 

echo $pages->display_pages (); //display the pagination links

//jump menu 

echo $pages->display_jump_menu () . $pages->display_items_per_page ();

// displaying current page of the total page

echo "<span class='paginate'>";

echo "Page $pages->current_page of $pages->num_pages</span>";

echo '</div>';

Page 70: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 70/82

60

The output for the above piece of code is illustrated in Figure 6-2. Including more

options (i.e. the page drop-down provides page selection, and per page drop-down

provides flexibility of customizing number of records on the page etc).

Figure 6-2, Pagination Example 2

6.2.8  PERSIAN DATE 

Since there is no built-in method for using Persian calendar (Shamsi Date) in PHP, and

in the meantime the proposed system is required to be internationalized and localized, it

is required to provide a code for date conversion. The pdate.php makes it possible to

convert the Gregorian dates into Persian dates as follows:

// Persian calendar format of today date

<?php

$d = date ('Ymd'); //assign today date to variable $d

$jd = gregoriantojd (substr ($d, 4 , 2 ),substr ( $d, -2 ),substr ($d, 0, 4 )

);

$pdate = jd_to_persian ($jd);

//format numbers as it is Persian suitable like (3 => ۳)

$today_date = FormatPersianDate ($pdate);

echo $today_date;

?>

Page 71: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 71/82

61

6.3  CHALLENGES 

There are many challenges for implementing the proposed system as fast and user-

friendly as possible. The issues and challenges (i.e. immediate data validation, instantly

checking for duplication, adding new required data without delay, etc) are required to beimplemented in a powerful manner. There are as many ways to implement and

overcome challenges as there are opinions about the best ways to do this.

JQuery Framework is the best module, according to the research and investigation done

by the author, which is able to overcome all the mentioned challenges easily and with

less coding.

“ JQuery is a new kind of JavaScript Library. JQuery is a fast 

and concise JavaScript Library that simplifies HTML document 

traversing, event handling, animating, and Ajax interactions for 

rapid web development.  JQuery is designed to change the way

that you write JavaScript.” (jQuery, 2009)

Some of the benefits of jQuery are as follows:

  Cross-browser that is well-suited with Internet Explorer 6.0+, Firefox 2+, Opera

9.0+, Safari 3.0+ and last but not least Chrome (jQuery, 2009).

  Few lines of jQuery code can perform tasks better than 30 or more lines of 

traditional JavaScript code, as the concept of jQuery is ―write less and do more‖. 

  A large community supports this project. That is why there is various numbers

of plug-ins available.

  It simplifies the Ajax Development. Call the Ajax just with writing 5 or 6 lines

of code.

6.3.1  FORM LIVE VALIDATION 

JQuery validation is a small plug-in for the jQuery framework for making client-side

validation quick, easy, concise and powerful. It consists of two main parts. Firstly, it

provides developers with a rich set of core validation methods and rules, which can also

Page 72: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 72/82

62

be used outside the context of forms. Secondly, it offers users and visitors of the project

with immediate and real-time validation information as they fill out forms, helping them

to get it right the first time, making the forms easier, quicker and less intimidating to

complete.

Validation of the data before submitting the form to the server – which is extremely fast,

efficient and provides quick replies to the users in the event of any errors — is called

client-side validation as illustrated in Figure 6-3, which is possible to be disabled on the

browsers. However, it is advisable to also validate the data on the server-side before

adding them into the database.

Figure 6-3, Form Live Validation

6.3.2  SORT DATA INSTANTLY 

Sorting of data is very useful, as it helps users to access the desired data as quickly as

possible without any problem. For instance, if there is hundreds and thousands of books

which is unordered it is very cumbersome to find the required book; However if there

exists a sort feature based on ascending or descending order, then user will sort the list

of data (i.e. book title, book author, etc) to find the book easily.

Sort feature can be provided with PHP but since the project is required to be as efficientas possible, using jQuery search plug-in provides quick sort without delay and without

page reloading.

6.3.3  ADD DATA INSTANTLY 

Sometimes it is required that new needed data are added into the database and appear

immediately without page refresh for better efficiency. For instance during book 

registration process some new data is required to be available in order to register the

Page 73: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 73/82

63

book information successfully (i.e. author, category). Whenever book registration is

required a list of authors and categories are available on the form, but in case new ones

are required it is not efficient to leave the book registration page and go to author or

category page to add related data respectively and then come back to book registration

page. Using Ajax plug-in of jQuery framework will overcome the mentioned issue, and

provide a way for the user to add new required authors, categories, etc instantly.

Figure 6-4, Add Required Data Instantly

6.3.4  SEARCH DATA WITHOUT DELAY 

Occasionally, data is required to be filtered as quickly as possible. For example when

lending a book, the data is needed to be filtered by selecting the borrower from the list,

in order to know about his / her account conditions. Another example as that it is not

possible to include all book or user information in tabular format due to width limitation

of the screen, so would be more usable to display the whole information of the book or

user on mouse over of the link. Using jQuery plug-in provides these facilities without

much coding.

See Figure 6-5 which illustrates how using Ajax in jQuery provides the required

information for the users with mouse over.

Page 74: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 74/82

64

Figure 6-5, User Details with Mouse Over

6.3.5  INTERNATIONALIZATION AND LOCALIZATION APPROACH 

To adapt an application that can be used by users of different countries, cities speaking

different languages it is necessary to present the application messages and text in the

idioms spoken in those countries and cities.

In order to achieve this feature there are many solutions exist using database, gettext

and plain text files. For the convenience and simplicity of the system the plain text files

selected; it means to load configuration files that contain the texts and messages for

each of the supported idioms. 

The challenge is with left-to-right and right-to-left as well as carrying font-styles, dates

and times, numbers etc according to the language and culture. Thus, it is required to

have different style sheets for the left-to-right and right-to-left versions.

For the language selection there are many ways to achieve this mechanism (i.e. to pass a

parameter in the URL and then, according to that parameter decide which language and

style should be assigned). Problems arise with passing parameters to the URL as it is

possible that some of the pages have their own additional parameters in the URL and

some do not.

After investigation it was determined that the solution is to use cookies to overcome

these problems (cookies are a great way to remember settings or preferences or any

Page 75: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 75/82

65

other type of information). In this example, we will set a cookie that determines what

CSS and language file are to be load in the project). Besides, the URL is kept intact. All

in all, the below piece of code will provide the achievement.

6.3.6  401  ERROR PAGE 

The most important responsibility of the 401.php script is to send an authorization error

to the browser and redirect the user back to the login page (the response code for an

HTTP authorization error is 401). Because session_start () is called and $_SESSION

[‗access’] is checked, the error is only sent if the user has not been authenticated.

6.4  SUMMARY 

In this chapter the importance of directory structure plan and the concept of code

sharing described in details as well as the way of usage as the illustration in order to

help ones who would like to work on this open source project in future to improve and

expand by including new features and functionalities.

<script type="text/javascript">

function change(lang)

{

// Set cookie "lang"

var expiresdate=new Date();

expiresdate.setDate(expiresdate.getDate()+360);

document.cookie = "lang=" + lang +

";expires=" + expiresdate.toGMTString();

}

</script> 

Page 76: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 76/82

66

7  CONCLUSION 

The focus of this paper is to define the problems and challenges which currently exist in

the workflow of traditional libraries in general, and in that of Herat University libraries

in particular; a solution is illustrated which may be carried out to overcome and reduce

these problems by introducing automated and digital services in order to pave the way

for users to enjoy the benefits of a highly up-to-date system.

The current situation of Herat University libraries was described in detail covering the

existing issues, in the paper. One reason why Herat University libraries were chosen is

because the author had a better opportunity and much facility to conduct the research

there as being a lecturer in that university.

The author came up with the idea that digital library system and automation would be

the solution to fill the gaps and overcome the existing challenges which ought to be

addressed in Herat University libraries, and likewise in other Afghanistan‘s educational

and university libraries. One of the chapters is dedicated to a detailed and step by step

operational explanation of the digital and automation systems used in libraries. This

includes a description of nearly all the benefits and features of digital library systemsand automation which make these systems desirable and internationally accepted.

The current implementation of the digital library management system covers the most

crucial necessities of library workflow detailed as follows:

User Management Module: Library staff can easily register new members, as well as

update the existing members‘ information. Based on interviews, all sorts of data

validation can be implemented and such a system will immediately update the librarystaff whenever wrong entry happens during the user registration or edition processes.

Book Management Module: The implemented current library system provides

librarians the ability to keep track of books information by providing the registration

and edition modules as well as validating data entry.

Page 77: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 77/82

67

Authentication Module and Security: Most of the modules are secured and restricted

against unauthorized users. In order to access those modules it is required to log in the

system with appropriate access level. When new secure module is required to be added

into the library system, by using two lines of code it would be possible to keep it secure

against unauthorized and evil users. The library system is smart enough to avoid SQL

injection and other sort of security vulnerabilities by validating the entry data.

Search Module: Now library members can easily find their required and favorite books

by using the simple and advanced search. The search can be done based on multiple

criteria i.e. users can search for a book by its title, language, author, and category.

Internationalization (I18N) and Localization (L10N): The library system is

internationalized and currently localized in Dari language and includes text messages,

validation messages, dates, and logo. Also, it supports other languages by translation of 

the languages files without code manipulation.

Template: The prototype interface blueprint includes the public navigation links,

header; the left navigation area which carries out the administrative links, as well as the

news links the content includes the page title and contents and eventually the footer

using external css files for better usability. So, in order to use different layouts and

structures it is enough to manipulate the template files.

Configuration and Customization: As mentioned I had better opportunity to this

research in Herat University libraries but the system introduced here is applicable and

can be used in other Afghanistan‘s educational libraries. Besides supporting text and

validation messages and date localization, the system also provides navigation and

content localization through the administration interface. For instance, home, policy,

and services, news content etc can be easily localized through the user interface.

Additionally, the common database credentials and some other configurations such as

time period duration for lending can be updated by using the configuration files without

code manipulation.

Page 78: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 78/82

Page 79: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 79/82

Page 80: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 80/82

70

Bibliography 

Arms, W. Y. (2000). Digital Libraries. London, United Kingdom: MIT Press.

Ballad, J. V. (2008). PHP & MySQL Web Development All-in-One Desk Reference For 

 Dummies. Indianapolis, Indiana: Wiley Publishing, Inc.

Glass, E. N. (2005). Beginning PHP5, Apache, and MySQL Web Development. 

Indianapolis, Indiana: Wiley Publishing, Inc.

Information, E. o. (2002). Library Automation. (A. Hry, Ed.) Tehran, Iran: Islamic

Republic of Iran Library.

 jQuery, J. R. (2009). Home. Retrieved from jQuery: http://www.jquery.com/ 

Lavin, P. (2006). OBJECT-ORIENTED PHP: concepts, techniques, and code. San

Francisco, United States of America: William Pollock.

Mazinani, A. (2000). Library and Librarianship. Tehran, Iran: سزن طله و تو کب

داشگعىم ای .

Nabil, A. a. (1996). Digital Libraries: Research and Technology Advances. McLean:

Springer.

Navathe, R. E. (1999-2008). Fundamentals of Database Systems (Third ed.). Boston,

United States of America: Addison Wesley Publishing Company.

Powers, D. (2008). PHP Object-Oriented Solutions. Berkeley, United States of 

America: Apress.

Psinas, T. B. (2008). PHP and MySQL: Create-Modify-Reuse. Indianapolis, Indiana:

Wiley Publishing, Inc.

Riaz, M. (1992). Library Automation. New Delhi, India: Atlantic Publishers &

Distributors (p) Ltd.

Roman, S. (1999). Access Database Design & Programming (Second Edition ed.).

Sebastopol, United States of America: O'Reilly.

Page 81: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 81/82

71

Shiflett, C. (2005). Essential PHP Security. Sebastopol, United States of America:

O'Reilly.

Team, H. U. (2009, August 10). info-university. Retrieved October 5, 2009, from

hu.edu.af: http://hu.edu.af/en/info-university

Ullman, L. (2005). VISUAL QUICKPRO GUIDE PHP and MySQL FOR DYNAMIC 

WEB SITES (Second Edition ed.). Berkeley, 2005, United States of America: Peachpit

Press.

Page 82: Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

8/6/2019 Transforming a Paper-Based Library System to Digital in Example Herat University - Master Thesis

http://slidepdf.com/reader/full/transforming-a-paper-based-library-system-to-digital-in-example-herat-university 82/82

Eidesstattliche Versicherung

Die selbständige und eigenhändige Ausfertigung versichert an Eides statt 

Berlin, den

Unterschrift