You are on page 1of 104

Web-Based

Library

INRTODUCTION

1
Web-Based
Library

Introduction

Abstract:

It is rightly said, Knowledge is Power. Knowledge achieved from reading Books.


Hence LIBRARY is an area where collection of books is done. Therefore Library is
one of the most key components of an education Institution. An excellent Library,
stocked with varied reference books from basics to advanced study helps the
Students to enrich their knowledge. The Library must be constantly updated with
the Latest books of knowledge. The library should guide the following values:
Knowledge, Service, Quality, Integrity, Respect, and Communication.

The most important department in and across the departments of an Educational


institution is Library department. It holds immense potential in terms of
effectively and efficiently learning information through various resources
available. The main purpose of the Library management system is to reduce the
work of the Librarian. Library management system is being maintained manually
till now, through this application it can be maintained in the database.

This is an Intranet based application that can be accessed throughout the web.
This system can be used to search for all books, search books based on author,
search books based on title and reserve books, find out book is in available
state or not. This is one integrated system that contains both the user component
and the librarian component.

The Librarian is granted administrative powers and can perform all the actions
such as adding new books to the library, updating existing books, deleting books,
see the students requests and issuing books, renewal & returning of books and
managing all the accounts. Librarian can access the account of any user and
modify it.

In this Web-Based Library project there are mainly 2 modules

1. Student.

2. Librarian.

2
Web-Based
Library

Student search all the books, books based on title and based on author Not only
see the books details can also reserve the book if the status of the book is
Available by using this system the reduce the librarian work.

Librarian can add the new book details, update existing book details, if Books are
old then deleting books into database, issue and renewal books. Librarian Can
see the list of all reservation forms, list of issued books, list of renewal books,
List of reservation forms, list all books, list books based on title, list books based
on Author, list of all students and also see the inventory details.

In Student module students are first enter into the site by using user id and
Password if these are correct then entered into site other wise rejects the
request. In This site students are first search all books, search books based on
title and search Books based on author in this students are seen the status of the
book if is available or not if it is available then see the book id for reservation
purpose and finally Reserving the book through web.

In Librarian module librarian add new book details into database if books are
Referenced once then keep the status as not available ate the time of adding new
Book details. If librarian wants to modify the book details then update book
details Option is available. If book are old then librarian can delete the book into
database.

Librarian can also see the search the all books, search books based on title and
search books based on author. And issue the books to students. Students
request forms are stored into reservation table. Librarian can see those forms by
clicking the option of list of reservation forms then issue the books to those
students who are requesting for what books. Librarian can see the inventory of all
books, list of issued books, list of renewal books, list of all students. If librarian
wants to send messages to students then see the students details and send
messages to their mail ids or call to their mobile numbers. Librarian can issue
books to students maximum of four.

3
Web-Based
Library

4
Web-Based
Library

Project Overview

This Web-Based Library project mainly deals with to adding, updating and
deleting books details into database. Then the members of the library means
students to see the list of all books list all books based on title and list all books
based on author this information is directly search by students and reserving
books through web. Then this request forms will be stored into reservation table
the librarian will see this requesting forms and issuing books if book issue is done
then the status is modified as not available in book table the librarian will issue
maximum of 4 books for each student. If students want to renewal book then the
librarian renewal the book and update the database. If students return the books
then the status is modified as available in book table so this book is available to
issuing. In this librarian can see the all students details of e-mail id, mobile
numbers and addresses by using e-mails librarian can send any messages to
students.

In Student module students are first enter into the site by using user id and
password if these are correct then entered into site other wise rejects the
request. In
this site students are first search all books, search books based on title and
search books based on author in this students are seen the status of the book if is
available or not if it is available then see the book id for reservation purpose and
finally reserving the book through web.

In Librarian module librarian add new book details into database if books are
referenced once then keep the status as not available ate the time of adding new
book details. If librarian wants to modify the book details then update book
details option is available. If book are old then librarian can delete the book into
database. Librarian can also see the search the all books, search books based on
title and search books based on author. And issue the books to students.
Students requests forms are stored into reservation table. Librarian can see
those forms by clicking the option of list of reservation forms then issue the
books to those students who are requesting for what books. Librarian can see the
inventory of all books, list of issued books, list of renewal books, list of all
students. If librarian wants to send messages to students then see the students

5
Web-Based
Library
details and send messages to their mail ids or call to their mobile numbers.
Librarian can issue books to students maximum of four.

Aim & Scope of the project

Aim:

The main purpose of the web-based Library is students can search the book and
reserving the books if it is in available state directly through web, in this there is
no need to librarian help for searching books and also to reduce the work of the
librarian.

Scope:

The proposed system targets the information contained in the library covers the
various books that are referred by the department for its manual reports. The
present system considers only works of information contained in the library
covers the various books that are referred by the department for its smooth
running. Though the interaction with the external systems is considered, in the
present release only their abstract interface is specified but not implemented.
By using this system students reserve the books through web.

Using this we can reduce the

1. Wastage of time.

2. Work delay

3. Decrease in the performance of the system.

4. More manpower is required

6
Web-Based
Library

SYSTEM ANALYSIS

7
Web-Based
Library

System Analysis

System Analysis is first stage according to System Development Life Cycle


model. This System Analysis is a process that starts with the analyst.

Analysis is a detailed study of the various operations performed by a system and


their relationships within and outside the system. One aspect of analysis is
defining the boundaries of the system and determining whether or not a
candidate should consider other related systems. During analysis, data is
collected from the available files, decision points, and transactions handled by the
present system.

Logical system models and tools are used in analysis. Training, experience, and
common sense are required for collection of the information needed to do the
analysis.

Student

A student can login to system, see the status of books. Search all books, for
particular book by Book Title or author name and reserving the book if it is
available.

Librarian

Include new books, delete some books from the library, add new users to the
system, see the purchase requests for new books and be able to approve or
reject the same. He has all the authorities to check the users accounts and to
retrieve their passwords and also Issuing and renewaling books.

8
Web-Based
Library

REQURIEMENTS ANALYSIS:

The requirement phase basically consists of three activities:

1. Requirement Analysis
2. Requirement Specification
3. Requirement Validation

Software Requirements Specifications:

The software requirements specification is produced at the culmination of the


analysis task. The function and performance allocated to the software as a part
of system engineering are refined by establishing a complete information
description, a detailed functional and behavioral description, and indication of
performance requirements and design constraints, appropriate validation criteria
and other data pertinent to requirements.

An outline of the Software Requirements Specification:

A simplified outline can be given for the framework of the specifications. This is
according to the IEEE Standards.

9
Web-Based
Library

Existing System:

This application maintains the details of books like what type of books are there,
what books are in available state, and how many books are there for same title of
different authors. This information is available only for librarian not for students.

The library management system is maintained manually till now, so the following
disadvantages are occurred.

1. Wastage of time.

2. Work delay.

3. Decrease in the performance of the system.

4. More man power is required.

Proposed System:

In this system students are no need to go to library for reserving Book, just go to
internet and search what types of books are there in library, search Books based
on author, search books based on title and see what books are in Available state.
In this way select which book we want and identify the book id and Reserve that
book through reservation form.

If more than one person requesting for single book, then the librarian See the list
of reservation forms and issue the books based on First in First out order of
reservation Forms and rejecting the other students requests.

In this proposed the work delay and wastage of time will be reduced.

10
Web-Based
Library

1. Student:

In this module student plays 4 roles,


They are,
a) View list of all books.
b) View list of books based on title.
c) View list of books based on author.
d) Reserve book.

2. Librarian:

In this module librarian plays 14 roles,


They are,
a) Add new book details.
b) Update existing book details.
c) Delete book details.
d) List all books.
e) List books based on title.
f) List books based on author.
g) Issue book.
h) Renewal book.
i) Return book.
j) List of reservation forms.
k) List of renewal books.
l) List of issue books.
m) List of all students.

11
Web-Based
Library

In Student module students are first enter into the site by using user id and
Password if these are correct then entered into site other wise rejects the
request. In
This site students are first search all books, search books based on title and
search Books based on author in this students are seen the status of the book if
is available
Or not if it is available then see the book id for reservation purpose and finally
Reserving the book through web.

In Librarian module librarian add new book details into database if books are
Referenced once then keep the status as not available ate the time of adding new
Book details. If librarian wants to modify the book details then update book
details Option is available. If book are old then librarian can delete the book into
database.
Librarian can also see the search the all books, search books based on title and
search books based on author. And issue the books to students. Students
requests
Forms are stored into reservation table. Librarian can see those forms by clicking
the
Option of list of reservation forms then issue the books to those students who are
Requesting for what books. Librarian can see the inventory of all books, list of
issued
Books, list of renewal books, list of all students. If librarian wants to send
messages
To students then see the students details and send messages to their mail ids or
call to their mobile numbers. Librarian can issue books to students maximum of
four.

12
Web-Based
Library

Software and Hardware Requirements Specification

Software Requirements:

Operating System : Windows 2000.

Back End : Oracle 10g.


Technologies : J2SDK 1.4, JDBC, SERVLETS, JSP.
Web Server : Apache Tomcat 5.0.
Web Technologies : HTML, JavaScript.
IDE : Eclipse IDE.
Documentation Tool : Microsoft word 2003.
Using Rational Rose98 EnterpriseEdition for UML Diagrams.

Hardware Requirements:

Processor : Intel P-III (min).


Processor Speed : 250 MHz to 833MHz.
RAM : 256 MB to 1GB
Hard Disk : 20 GB
Mouse : Logitech
Monitor : EGI/VGA
Key Board : 101 Standards (min).

13
Web-Based
Library

Feasibility Study

All projects are feasible, given unlimited resources and infinite time. But the
development of software is plagued by the scarcity of resources and difficult
delivery rates. It is both necessary and prudent to evaluate the feasibility of a
project at the earliest possible time.

Three key considerations are involved in the feasibility analysis.

Economic Feasibility:

This procedure is to determine the benefits and savings that are expected from a
candidate system and compare them with costs. If benefits outweigh costs, then
the decision is made to design and implement the system. Otherwise, further
justification or alterations in proposed system will have to be made if it is to have
a chance of being approved. This is an ongoing effort that improves in accuracy
at each phase of the system life cycle.

Economic feasibility talks about the benefits that which we get from this project.
Here with the introduction of this online process we are not only reducing the
time take for the registration of the entrants. We even reduce the burden on the
administrator. As this project is not only reducing the time but also the work
burden of the user we say that this product is economically feasible.

14
Web-Based
Library

Technical Feasibility:

Technical feasibility centers on the existing computer system (hardware,


software, etc.,) and to what extent it can support the proposed addition. If the
budget is a serious constraint, then the project is judged not feasible.

Technical feasibility speaks about the existing hardware and the software that we
are using and the deviations that we have to make from the existing one, as we
are developing the application using java there is no change in the hardware that
the we are using. So we a say that this application is technically feasible as there
is no change in the configuration more over it is cost effective.

Operational Feasibility:

People are inherently resistant to change, and computers have been known to
facilitate change. It is understandable that the introduction of a candidate system
requires special effort to educate, sell, and train the staff on new ways of
conducting business.

As this project is a user friendly version there is not much training required for
the people to use. This product is not only making the task of the administrator
easy but it is reducing the time that is taken otherwise. So we say that this
product is operationally feasible.

15
Web-Based
Library

SYSTEM DESIGN

16
Web-Based
Library

System Design

Introduction:

The most creative and challenging phase of the life cycle is system design. The
term design describes a final system and the process by which it is developed. It
refers to the technical specifications that will be applied in implementations of the
candidate system. The design may be defined as the process of applying
various techniques and principles for the purpose of defining a device, a process
or a system with sufficient details to permit its physical realization.

The designers goal is how the output is to be produced and in what format.
Samples of the output and input are also presented. Second input data and
database files have to be designed to meet the requirements of the proposed
output. The processing phases are handled through the program Construction
and Testing. Finally, details related to justification of the system and an estimate
of the impact of the candidate system on the user and the organization are
documented and evaluated by management as a step toward implementation.

The importance of software design can be stated in a single word Quality.


Design provides us with representations of software that can be assessed for
quality. Design is the only way where we can accurately translate a customers
requirements into a complete software product or system. Without design we risk
building an unstable system that might fail if small changes are made. It may as
well be difficult to test, or could be one whos quality cant be tested. So it is an
essential phase in the development of a software product.

17
Web-Based
Library

Data Base Design:


Overview:

This document defines what data are stored and how they are organized. Its
purpose is to clarify what all developers involved in database access can expect
from the database.

The Logical Database Design evolves from the conceptual database design
represented by the class diagrams in the Software Requirements Specification. It,
in turn, is the basis for the Physical Database Design, which takes into account
the practical constraints that the Logical Database Design does not (i.e., the
limitations of the platform or technology chosen for the software development
and deployment).

The Logical Database Design presents the data in normalized form. Any de-
normalization occurs as part of the Physical Database Design.

The data pertaining to proposed system is voluminous hence a careful


design of the database must proceed before storing the data in the
database.

database management system provides flexibility in the storage and


retrieval of data.

Normalization:
Normal forms are table structures with minimum redundancy.
The most important and widely used normal forms are

First Normal Form (1NF)

Second Normal Form (2NF)

18
Web-Based
Library
Third Normal Form (3NF)

Boyce-Codd Normal Form (BCNF)

First Normal Form (1NF):

First Normal form states that the domain of an attribute must include only
atomic values and that the value of any attribute in a tuple must be a
Single value from the domain of that attribute.

All the relations in this proposed system satisfy the First Normal Form.

Second Normal Form (2NF):

Second Normal Form is based on the concept of functional dependency. A relation


is said to be in 2NF when it is 1NF and every non-primary key attribute
should depend on entire primary key but not on part of primary key. All
the relational schemas obtained after applying 1NF are satisfying 2NF.mn

Third Normal Form (3NF):

Third Normal Form is based on the concept of transitive dependency. A relation


is said to be in 3Nf when it is in 2NF and every non key attribute is
non transitively dependent on the primary key.
The relational schemas obtained after applying 2NF are satisfying 3NF.

Boyce-Code Normal Form (BCNF):

A relation is said to be in BCNF if none of the attribute of a composite


key are dependent on an attribute of other composite key.
All relations obtained after applying 3NF are satisfying BCNF.

19
Web-Based
Library

Data Dictionary:

Table No.: 1
Table Name: Student
Table Description This table contains the Student details.
Field Field Constraints Field
Name Type Size Description Remarks

Student id We will not


Sid 10 PK enter Sid.
Number This is given
by server.

sname Varchar2 25 Student name

Email Varchar2 User ID of a


50 particular user

Password Varchar2 10 Password

Address Varchar2 100 Student address

Mobile Varchar2 20 Student mobile

Role Varchar2 15 Student


role(Librarian/Stu
dent)

20
Web-Based
Library

Table No.: 2
Table Name:
Books
Table Description: This table contains the information of all the books in the library.
Field Name Field Type Size Constraints Field Description
Remarks

PK We will not
bookid Number 10 Serial number enter bookid,
server will
gives.
booktitle Book title
Varchar2 30

author Varchar2 20 Author name

publications Varchar2 30 Book publishers name

No. of pages
totalpages Varchar2 10 containing this book

Price of this book


price Varchar2 10

It shows book is
status Varchar2 20 available or not

21
Web-Based
Library

Table No.: 3
Table Name:
Inventory
Table Description: This table contains the information of all the stock
Field Name Field Type Size Constraints Field
Description Remarks

FK
Bookid Number 10 Serial number

booktitle Varchar2 30 Book name

author Varchar2 20 Name of the


author

quantity Number 7 How many copies


are maintaining
for this book

Table No.: 4
Table Name:
Reservation
Table Description: This table contains the information of student requests
Field Name Field Type Size Constraints Field Description
Remarks

It is giving by
Rid Number 10 PK Reserve id the server

Sid Number 10 FK Student id

bookid Number 10 FK Book id

dateofreserve Varchar2 12 Date of student

22
Web-Based
Library
requesting for book

Table No.: 5
Table Name:
Issue
Table Description: This table contains the information of the books issued to
students
Field Name Field Type Size Constraints Field Description
Remarks

Number This will give the


Issueid 10 PK Book issuing id server

Number Student id
sid 10 FK

bookid Number 10 FK Book id

Date of issuing
dateofissue Varchar2 20 book

Table No.: 6
Table Name:
Renewals
Table Description: This table contains the information of the books renewal to the
student members
Field Name Field Type Size Constraints Field Description
Remarks

Bookid Number 10 FK It describes the


bookid
It describes the date
dateofrenewal Varchar2 20 of renewal
the book

23
Web-Based
Library

7
Table No.:
Table Name:
Librarian
Table Description: This table contains the information of the librarian details like
userid and password
Seq. #Field Name Field Type Size Constraints Field
Description Remarks

1 Userid Varchar2 20 PK It describes the


librarian userid

2 Password Varchar2 20 It describes the


librarian
password

3 Role Varchar2 15 Librarian

Here, PKPrimary Key.


FKForeign Key.

24
Web-Based
Library

UML Diagrams:
Introduction:

UML is a notation that resulted from the Unification of Object Modeling


Technique and Object Oriented Software Technology .UML has been designed for
broad range of application. Hence, it provides constructs for a broad range of
systems and activities.

1. Use case diagrams:

Use cases are used during requirements elicitation and analysis to represent the
functionality of the system. Use cases focus on the behavior of the system from
the external point of view. The actor is outside the boundary of the system,

where as the use cases are inside the boundary of the system.
a) Use case for Student Module :

25
Web-Based
Library

View List of all books

View List Books based on Title

Student
View List Books based on Author

Reserve Book

The above use case describes the roles of student.

b) Use case for Librarian Module :

26
Web-Based
Library

View List all Books


List Books based on Title

View Inventory List

Add new book details

View List of reservation Forms

Update book details

View List of Issued Books


Delete Book

librarian

View List of all Students


Issue Book

View List of Renewald Books Renewal Book

List Books based on Author Return Book

The above use case describes the operations performed by librarian.

c) Librarian Login:

27
Web-Based
Library

This use case describes the log in process of librarian. If user id and password is

correct then enter into site else request failed message displayed.

28
Web-Based
Library
d) Updating Module:

This use case describes the librarian operations on book that is add new book
details, Issuing book and delete book details into database.

29
Web-Based
Library
e) Returned Book:

This use case describes that if students returned books then librarian update the
status of book as available in database.

30
Web-Based
Library
e) Renewal the Books:

This use case describes that, If students want to renewal the books then librarian
can update the data base.

2. Activity Diagrams:

Activity Diagram for Book:

31
Web-Based
Library

This activity diagram tells that those different operations performed on book by
librarian.

Activity Diagram for Issuing Book:

32
Web-Based
Library

This diagram tells that if librarian wants to Issue the book to students then the
status of the book is checked in this way.

3. Sequence Diagrams:

Sequence diagram depicts the interactions between class instances, in


the form of method calls and call returns shows a specific scenario of execution in the

33
Web-Based
Library
system in terms of object instances. This diagram focuses on the time ordered
messages between objects that collaborate to accomplish some task

Sequence Diagram for Maintaining Details of Book:

This diagram tells that the operations performed on book by librarian.

Sequence Diagram for Issuing Book Transactions:

34
Web-Based
Library

The above diagram tells that the issuing transactions of book.

4. Class diagram:

35
Web-Based
Library

Class diagrams to describe the structure of the system.


Classes are abstraction that specifies the common structure and behavior of a set
of objects. Class diagrams describe the system in terms of objects, classes,
attributes, operations and their associations

Issue
issueid number
sid number
Returns bookid number
Student date of issue varchar2
bookid number
Librarian
sid number +m_Returns Issue book() email varchar2
sname varchar2 Returned book()
email varchar2 password varchar2
password varchar2 role varchar2
address varchar2 Reservations
mobile varchar2 rid number Add new book()
sid number update book()
View all books() +m_Reservations
bookid number Delete book()
list books based on title() dateofreserve varchar2 Issue book()
list books based on author() Renewal book()
Reserve book() reserve book() Return book()
View all students()
View reservation forms()

Renewals
+m_Book
Book sid number
bookid number bookid number
booktitle varchar2 dateofrenewal varchar2
author varchar2
noofpages varchar2 renewal book()
Inventory
price varchar2 +m_Book
status varchar2 bookid_number
booktitle_varchar2
add() quantity_number
update()
delete()

The above class diagram describes the data base tables of attributes and
performed which operations and also describes the relationship between tables.

36
Web-Based
Library

5.State Transition Diagrams:

Diagram1:

37
Web-Based
Library

Diagram2:

38
Web-Based
Library

SYSTEM TESTING

39
Web-Based
Library
System Testing

1. Introduction:

Software Testing is a critical element of software quality assurance and


represents the ultimate review of specification, design and coding, Testing
presents an interesting anomaly for the software engineer.

Testing is one of the most important phases in the software development activity.
In software development life cycle (SDLC), the main aim of testing process is the
quality; the developed software is tested against attaining the required
functionality and performance.

During the testing process the software is worked with some particular test cases
and the output of the test cases are analyzed whether the software is working
according to the expectations or not.

The success of the testing process in determining the errors is mostly depends
upon the test case criteria, for testing any software we need to have a description
of the expected behavior of the system and method of determining whether the
observed behavior confirmed to the expected behavior.

40
Web-Based
Library

2. Types of Testing:

Since the errors in the software can be injured at any stage. So, we have to carry
out the testing process at different levels during the development. The basic
levels of testing are Unit, Integration, System and Acceptance Testing.

The Unit Testing is carried out on coding. Here different modules are tested
against the specifications produced during design for the modules. In case of
integration testing different tested modules are combined into sub systems and
tested in case of the system testing the full software is tested and in the next
level of testing the system is tested with user requirement document prepared
during SRS.

Unit Testing:

Unit testing focuses verification effort on the smallest unit of software design that
is the module. Using procedural design description as a guide, important control
paths are tested to uncover errors within the boundaries of the module. The unit
test is normally white box testing oriented and the step can be conducted in
parallel for multiple modules.

Integration Testing:

Integration testing is a systematic technique for constructing the program


structure, while conducting test to uncover errors associated with the interface.
The objective is to take unit tested methods and build a program structure that
has been dictated by design.

41
Web-Based
Library

Functional Testing:

In Functional Testing test cases are decided solely on the basis of requirements of
the program or module and the internals of the program or modules are not
considered for selection of test cases. This is also called Black Box Testing

Structural Testing:

In Structural Testing test cases are generated on actual code of the program or
module to be tested. This is called White Box Testing.

Top-down Integration:

Top down integrations is an incremental approach for construction of program


structure. Modules are integrated by moving downward through the control
hierarchy, beginning with the main control program. Modules subordinate to the
main program are incorporated in the structure either in the breath-first or depth-
first manner.

Bottom-up Integration:

This method as the name suggests, begins construction and testing with atomic
modules i.e., modules at the lowest level. Because the modules are integrated in
the bottom up manner the processing required for the modules subordinate to a
given level is always available and the need for stubs is eliminated.

System Testing:

42
Web-Based
Library

System testing is actually a series of different tests whose primary purpose is to


fully exercise the computer-based system. Although each test has a different
purpose, all work to verify that all system elements have been properly
integrated to perform allocated functions.

Security Testing:

Attempts to verify the protection mechanisms built into the system.

Performance Testing:

This method is designed to test runtime performance of software within the


context of an integrated system.

Validation Testing:

At the conclusion of integration testing software is completely assembled as a


package, interfacing errors have been uncovered and corrected and a final series
of software tests begins, validation test begins. Validation test can be defined in
many ways. But the simple definition is that validation succeeds when the
software function in a manner that can reasonably expected by the customer.
After validation test has been conducted one of two possible conditions exists.

One is the function or performance characteristics confirm to specifications and


are accepted and the other is deviation from specification is uncovered and a
deficiency list is created. Proposed system under consideration has been tested
by using validation testing and found to be working satisfactorily.

Output Testing:

43
Web-Based
Library
After performing validation testing, the next step is output testing of the
proposed system since no system could be useful if it does not produce the
required output in the specified format. Asking the users about the format
required by them tests the outputs generated by the system under consideration.
Here the output format is considered in two ways, one is on the screen and other
is the printed format. The output format on the screen is found to be correct as
the format was designed in the system designed phase according to the user
needs. For the hard copy also the output comes as the specified requirements by
the users. Hence output testing does not result any corrections in the system.

User Acceptance Testing:

User acceptance of a system is the key factor of the success of any system. The
system under study is tested for the user acceptance by constantly keeping in
touch with the prospective system users at the time of developing and making
changes wherever required.

Test Case:

If Librarian/Student enters the user id and password and clicks the sign in button
then checks into database, if it is correct then entered into site otherwise
displaying the error message of user id and password is incorrect and you could
not login as Librarian/Student role.

If librarian can issue more than 4 books to each student then the message will be
displayed as `this student already taken 4 books so issuing is not possible with
out returning any book`.

44
Web-Based
Library

SYSTEM IMPLEMENTATION

45
Web-Based
Library

System Implementation

The implementation is the final and important phase. It involves user training,
system testing and successful running of the developed proposed system. The
user tests the developed system and changes are made according to their needs.
The testing phase involves the testing of developed system using various kinds of
data.

An elaborate testing of data is prepared and the system is tested using the test
data. While testing, errors are noted and corrections are made. The corrections
are also noted for future use. The users are trained to operate the developed
system.

The implementation phase of software development involves translation of design


specification into source code, and debugging, documenting and unit testing the
source code. To enhance the quality of the software the methods are structured
control constructs, built in and user defined data types, secure type checking,
flexible scope rules exception handling mechanism, concurrency constructs and
separates compilation modules.

46
Web-Based
Library

SCREENS

Screens

47
Web-Based
Library

Home page:

If any people entered into this site if he/she is a new user then clicks on New
Student other wise clicks on Sign In.

48
Web-Based
Library
Registration Form:

If user clicks on New Student then this screen will appeared then user will must
and should fill all fields then clicks on SUBMIT button then this data will send to
server, If user clicks on RESET button then all the data you entered in the fields
are deleted means the page will be refreshed.

49
Web-Based
Library

Server Response:

If user submited the registration form then server will give the Student Id. This
Id is usefull at the time of Reserving Books and Renewalling Books.

50
Web-Based
Library

Sign In Form:

If user clicks on Sig In on homepage then this screen will appears. In this the
user enter the User Id, Password and select Librarian/Student in the dropdown
list of the field role and clicks on Sign In button . If user id and password is
correct then only user entered into his roles. If user id and password is incorrect
then the message of `your user id and password is incorrect so you could not
login as a Librarian/Student`.

51
Web-Based
Library

Student Menu:

If user id, password and role as Student are correct then Student Menu screen
will be displayed.

52
Web-Based
Library

List all Books:

In Student Menu student clicks on list all books then this screen will appeared .In
this student see the status if the status is not available means this book is either
reference book or it is already taken by someone so this book is not available for
reserving .If status is available then remember the book id and click on Reserve
Book for reserving book.

53
Web-Based
Library

Book Reservation Form:

If student clicks on Reserve Book then this screen will appeared in this user enter
the student id and book id of which book he wants to reserve and click on reserve
button.

54
Web-Based
Library

Librarian Menu:

If user id, password and role as Librarian are correct then Librarian Menu screen
will be displayed.

55
Web-Based
Library

Add New Book:

If Librarian wants to add new book then librarian clicks on add new book in
Librarian menu and fill the fields on this menu. If book is a reference book then
select notavilable in dropdown list of status and clicks on ADD button.

56
Web-Based
Library

List Books Based On Title:

If Student/Librarian wants to search books based on title, just click on list books
based on title on Librarian/Student menu this screen appears in this type the title
of the book which user want and click on SEARCH button.

57
Web-Based
Library

List all books based on book title:

In this all the books based on `java` title of different different authors are
displayed

58
Web-Based
Library

List of Reserved Books:

Librarian clicks the list of reservation forms in Librarian Menu,if students reserve
for books through web then that requests are stored in to this form then librarian
see those requests and clicks on Issue Book for Issuing book to students.

59
Web-Based
Library

Issue Book:

The librarian will issue the books to students by entering student id and book id
and click on ISSUE button. Then server gives the response of `book id :4 Issued
to student id :1 on 16-mar-08` and updated status of book table as `not
available` means this is not available to other students until user returns this
book.

60
Web-Based
Library

Renewal Book:

If students want to renewal the book then librarian will enter the book id and date
of renewal and click on RENEWAL button, then server gives the response of book
renewald successfully

61
Web-Based
Library

Return Book:

If student want to return the book then just enter the book id and click on
RETURN button. Then server gives the response of book returned successfully
and updated status of book table as available means it is available to other
students.

62
Web-Based
Library

View Inventory:

By using this screen librarian will see the stock.How many copies are available in
library for each book.This data displayed on this screen.

63
Web-Based
Library

List of all students:

If librarian wants to see the students details click on List of all students in
Librarian Menu then this screen will be displayed.If any message send to students
by e-mail or call to mobile number.

64
Web-Based
Library

TECHNOLOGY SPECIFICATION

65
Web-Based
Library

Technology Specification

Introduction to JAVA:
CREATION OF JAVA

Java was conceived by James Gosling, Patrick Naughton, Chris Wrath, Ed Frank
and Mike Sheridan at SUN Microsystems Incorporation in the year 1991.It took 18
months to develop the 1st working version. This language was initially called
OAK, but was renamed JAVA in 1995, many more contributed to the design
and evolution of the language.

Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank
and Mike Sheridan at Sun Microsystems Inc. in 1991. It took 18 months to
develop the first working version. This language was initially called Oak but was
renamed as Java in 1995. Between the initial implementation of Oak in the fall
of 1992 and the public announcement of Java in the spring of 1995, many more
people contributed to the design and evolution of the language.

The main properties of the java, which made java so popular, are as follows:

1. Simple
2. Secure
3. Portable
4. Object-oriented
5. Robust
6. Multithreaded
7. Architecture-neutral
8. Interpreted
9. High Performance
10. Distributed
11. Dynamic

66
Web-Based
Library

JAVAS MAGIC: THE BYTE CODE

The key that allows Java to solve both the security and the portability problems
just described is that the output of a Java compiler is not executable code.
Rather, it is Byte code. Byte code is a highly optimized set of instructions
designed to be executed by the Java run-time system, which is called the Java
Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for
Byte code. This may come as a bit of a surprise.

Translating a Java program into Byte code helps makes it much easier to run a
program in a wide variety of environments. The reason is straightforward: only
the JVM needs to be implemented for each platform. Once the run-time package
exists for a given system, any Java Program can run on it. Remember, although
the details of the JVM will differ from platform to platform, all interpret the same
Java Byte code.

JAVA ENVIRONMENT

Java environment includes a large number of development tools and hundreds of


classes and methods. The development tools are part of the system known as
Java Development Kit (JDK) and the classes and methods are part of the Java
Standard Library (JSL), also known as the Application Programming
Interface (API).

JAVA DEVELOPMENT KIT

The Java Development Kit comes with a collection of tools that are used for
developing and running Java programs. They include:

1. Applet viewer (for viewing Java applets)


2. Javac (Java Compiler)
3. Java (Java Interpreter)
4. Javap (Java Disassembler)
5. Javah (for C header files)
6. Javadoc (for creating HTML documents)
7. Jdb (Java debugger)

67
Web-Based
Library

APPLICATION PROGRAMMING INTERFACE

The Java Standard Library (or API) includes hundreds of classes and methods
grouped into several functional packages. Most commonly used packages are:

Language Support Package: A collection of classes and methods


required for implementing basic features of Java.

Utilities Package: A collection of classes to provide utility functions such


as date and time functions.

Input/output Package: A collection of classes required for input/output


manipulation.

Networking Package: A collection of classes for communicating with


other computers via Internet.

AWT Package: The Abstract Window Tool Kit package contains classes
that implements platform-independent graphical user interface.

Applet Package: This includes a set of classes that allows us to create


Java applets.

68
Web-Based
Library

JAVA OVERVIEW

Java is a powerful but lean object-oriented programming language. It has


generated a lot of excitement because it makes it possible to program for
Internet by creating Applets. Programs that can be embedded in web page. The
context of an applet can be an animation with sound, an interactive game or a
ticker tape. With constantly updated stock prices. Applets can be just little
decorations to liven up web page, or they can be serious applications like Word
processor or Spreadsheet.

But Java is more than a programming language for writing Applets. It is being
used more and more for writing standalone applications as well. It is becoming so
popular that many people believe it will become standard language for both
general purpose and Internet programming.

There are many buzzwords associated with Java, but because of its spectacular
growth in popularity, a new buzzword has appeared ubiquitous. Indeed, all
indications are that it will soon be everywhere.

Java builds on the strength of C++. It has taken the best features of C++ and
discarded the more problematic and error prone parts. To this lean core, it has
added garbage collection (automatic memory management), multithreading (the
capacity for one program to do more than one thing at a time), security
capabilities. This result is that Java is simple, elegant, and powerful and easy-to-
use.

Java is actually a platform consisting of 3 components:


Java Programming Language.
Java Library of Classes and Interfaces.
Java Virtual Machine

69
Web-Based
Library

The following sections will say more about these components.

JAVA IS PORTABLE:

One of the biggest advantages Java offers is that it is portable. An application


written in Java will run on all the major platforms. Any computer with a Java-
based browser can run the applications or Applets written in the Java-
Programming-Language. A programmer no longer has to write one program to
run on a Macintosh, another program to run on a Windows-machine still another
to run on a UNIX-machine and so on. In other words, with Java developers write
their programs only once.

The Virtual Machine is what gives Java is cross platform capabilities. Rather being
compiled into machine language, which is different for each OSs and computer
architecture, Java code is compiled into Byte codes. With other languages, the

Program code is compiled into a language that the computer can understand. The
problem is that other computers with different machine instruction set cannot
understand that language. Java code on the other hand is compiled into Byte-
Code rather than a machine language. These byte codes go to the JVM, which
executes them directly or translates them into the language that is understood by
the machine running it.

In summary, these means that with the JDBC API extending Java, a programmer
writing Java code can access all the major RDBMS on any platform that supports
the JVM.

70
Web-Based
Library

JAVA IS OBJECT-ORIENTED

The Java programming language is OBJECT-ORIENTED, which makes program


design focus on what you are dealing with, rather than on how your are going
to do something. This makes it more useful for programming in sophisticated
projects, because one can break the things into understandable components.
A big benefit is that these components can then be reused.

Object-Oriented Languages use the paradigm of classes. In simplest term, a class


includes both the data and the functions to operate on data. You can create an
instance of a class, also called an object, which will have all the data members
and functionality of its class. Because of this, you can think of a class as being
like template, with each object being a specific instance of a particular type of
class.
The class paradigm allows one to encapsulate data so that specific data values
are those using the data cannot see the function implementation. Encapsulation
makes it possible to make the changes in code without breaking other programs
that use that code.

If for example, the implementation of a function is changed, the change is


invisible to any programmer who invokes that function, and does not affect
his/her program, except hopefully to improve it.
Java includes inheritance, or the ability to derive new classes from existing
classes. The derived class, is also called as Sub-Class, inherits all the data in the
functions of the existing class.

JAVA DEVOLPMENT ENVIRONMENT

To code, edit, debug and test the java programs, one needs to have a java
development environment. At the minimum this will consists of a java compiler
interpreter and applet viewer where applets can be tested. Suns java
development kit (JDK) latest version is 2.2 can be freely downloaded from the
Internet. Java compiler is available on DOS, Win95, WINNT, Solaris and MAC etc.

71
Web-Based
Library

Introduction to HTML:

The hypertext markup language (HTML) is a simple markup language. Used to


create a hypertext documents that are portable from one platform to another
HTML documents are SGML (Standard generalized mark up language) documents
with generic semantics that are appropriate for representing information from a
wide range of applications. This specification defines HTML version 3.2. HTML 3.2
aims to capture recommended practice as of early 96 and as such a replacement
for HTML2.0 (RFC 1866).

A set of instructions embedded in a document is called mark up language. These


instructions describe what the document text means and how it should look like in
a display. Hyper Text Mark Up language (HTML) is the language used to encode
World Wide Web documents.

The Hypertext Mark up Language (HTML) is a simple markup language used to


create hypertext documents that are portable from one platform to another.
HTML documents are SGML documents with the generic Semantics that are
appropriate for representing the information from wide range of applications.
Html version 3.2

A set of instruction embedded in a document is called the mark up language.


These instructions describe what the document text means and how is should
look like in a display hyperlink specification language that define the syntax and
placement of special embedded directories that are not displayed by a web
browser, but it tell how to displays the content of the documents including text,
images and other supported media.

72
Web-Based
Library

BASIC MARKUP TAGS

An HTML documents starts with <HTML> tag. This element tells the browser that
the file contains HTML coded information. HTML document contain two parts
namely the head and body

HEAD

<HEAD></HEAD>

This is the first part of HTML document, which contain description of the HTML
page.

TITLE
<TITLE></TITLE>

These tags are embedded within the Head tags. Each HTML page should have a
short and descriptive title. The browser at the top usually displays the title.

A TITLE

Is used in the indexes as well as in browsers history list and bookmarks.


Cannot contain any formatting, images, or links to other pages.
Can have animated titles.

Example
<HTML>
<HEAD>
<TITLE>this is an html title</TITLE>
</HEAD>

</HTML>

73
Web-Based
Library

SOME POPULAR BROWSERS

Netscape Navigator
Netscape Communicator
Internet Explorer 3.0
Internet Explorer 4.0

ADVANTAGES: -

An HTML document is small and hence easy to send over the net. It is small
because it does not include format information.

HTML documents are cross platform compatible and device independent. We only
need an HTML readable browser to view them. For names, locations etc. are
not required.

WHY TO USE HTML?

Website is a collection of pages, publications, and documents that reside on web


server. While these pages publications and a document as a formatted in a single
format, you should use HTML for home page and all primary pages in the site.
This will enable the millions of web users can easily access and to take advantage
of your website.

HTML is considered first for formatting any new material you plan to publish on
the web. HTML documents are platform independent, meaning that they dont
confirm to any standard. If they are created properly you can move home page to
any server platform or you can access them with any complaint www browser.

74
Web-Based
Library

STRUCTURE OF HTML:

HTML elements perform a defined task. HTML uses two types of elements
. Empty Tags
. Container Tags

These tags differ because of what they represent. Empty tags represent
formatting constricts such as line breaks and horizontal rules. Container tags
define a section of text, formats and dot all of the selected text. A container tag
has both a beginning and an ending.

HTML LAYOUT:

An HTML document consists of text, which comprises the content of the document
and tags, which, defines the structure, and appearance of the document. The
structure of an HTML document is simple, consists of outer.
<BODY>
This is where the actual HTML documents
Text lies, which is displayed in the browse
</BODY>
</HTML>
Each document has a head and body delimited by the <HEAD> and <BODY> tag.
The head is where you give your HTML document a title and where you indicate
other parameters the browser may use when displaying the document. This
includes the text for displaying the text. Tag also references special and indicates
the hot spots that link your document to other documents.

HTML FORMS:
Creating a form usually involves two independent steps: Creating the layout for
the form itself and then writing a script program on the server side to process the
formation you get back from a form.

75
Web-Based
Library
To create a form, You use the <FORM> tag. Inside the opening and closing FORM
tags are each of the individual form elements plus any other HTML content to
create a layout for that form.

The opening tag of the FORM element usually includes the attributes: METHOD
and ACTION. The METHOD attributes can be either GET or POST which
determines how your form data is sent to the script to process it.

The ACTION attribute is a pointer to the script that processes the form on the
server side. The ACTION can be included by a relative path or by a full URL to a
script on your server or somewhere else. For example, the following <FORM> tag
would call a script called form-name in cgi-bin directory on server
www.myservser.com
<FORM Method= post action=http://www.mytservser.com/cgi-bin/form-
name.pl>
.</FORM>

METHOD ATTRIBUTE:

The other required attribute for the <form> tag sets the methods by which the
browser forms data to the server for processing. There are two ways: the POST
method and GET method. With POST method, the browser sends the data in two
steps: the browser first contacts the form-processing server specified in the
action attributes, and once contact is made, sends the data.

The GET method in the other hand contacts the form processing server and sends
the form data in a single transaction step: the browser appends the data to the
forms action URL, separated by the question mark (?) character.

76
Web-Based
Library

Introduction to JavaScript :

JavaScript is a new scripting language for WebPages. Scripts written with java
script can be embedded into your HTML pages. With java script you have many
possibilities for enhancing your HTML page with interesting elements. For
example you are able to respond to user-initiated events quite easily. Some
effects that are now possible with java script were some time ago only possible
with CGI. So you can create really sophisticated pages with the helps of java
script on the Internet.

Java script is a scripting language developed jointly by sun Netscape and is


meant for the WWW. A scripting language is a simple script based programming
language designed to enable programming to write useful programs quickly. A
script is similar to a macro, which tells a program how to perform a specific
procedure. As you go through this chapter we will bet a better understand of
what a scripting is how Java Script brings about interactive wed pages with HTML.

JAVA SCRIPT IS EMBEDDED INTO HTML

Java Script code usually embedded into HTML document and is executed within
them. By it self-JavaScript has no user interface. It rallies on HTML to provide the
mean of interaction with the user. Most of JavaScript object have HTML by
providing events to HTML tags and provide event driven code to execute it.

77
Web-Based
Library

JAVA SCRIPT IS BROWSER DEPENDENT

JavaScript depends on the web browser to support it. If the browser doesnt
support it, JavaScript code will be ignored. Internet Explorer 3.0 and Netscape
Navigator 2.0 onwards support JavaScript.

JAVA SCRIPT IS AN INTERPRETED LANGUAGE

Java script is interpreted at runtime by the browser before it is executed. It is


not completed into a separate program like a.exe but remains part of the
HTML file.

JAVA SCRIPT IS A LOOSELY TYPE LANGUAGE

Java script is very flexible compared to java. We need not specify the data
type of a variable while declaring it. Also we need not declare variable
explicitly. It is perfectly legal to declare variable as when we required them.

JAVA SCRIPT IS AN OBJECT-BASED LANGUAGE

Java Script is an object-based language. We can work with objects that


encapsulate data and behavior. However JavaScript object model is instanced-
based and there is no inheritance. This is basic difference between an object
oriented and objects based language.

JAVASCRIPT IS NOT JAVA

Java applet is stored in a separate file and connected to HTML file through the
<applet> tag, and it strongly typed, object oriented compiled language.
JavaScript is loosely typed object based, interpreted language meant to create
script. JavaScript can be used to

78
Web-Based
Library

Enhance Html pages.


Develop client side application.
Built to a certain extend client/server web application.
Create extension to a web server.
Provide database connectivity without using CGI.

CLIENT SIDE FRAMEWORK

The client side framework include the following

Web Browser
Html client extension (java applets, active x controls and Netscape
plugging) scripts language (JavaScript) JavaScript role in web
application development.

Client Side Application


JavaScript has good capabilities when working with Html tags &
associated objects compared to java. For certain cases JavaScript
provides a programming backbone with which to develop application.

Identifiers
Represent variable method or objects. Must start with a letter or under
score (_) subsequent character can be numbers or alphabets.

Keywords
Break, if, this, continue, in time, else, return, but, false, new, while,
for, null, with, function.

79
Web-Based
Library

Literals

Integer literals.
Floating-point literals.
Boolean literals.
String literals.
Special literals.
Special Character.

A function is declared in the <HEAD> part of the Html Script so that the
browser loads the function before the body executes it.

Java Script Object Model

JavaScript is an object-based language. It has no inheritance. The relationship


between objects at different levels is not of ancestor descent but of container.
When an object properties or methods are referenced is used to denote
ownership.

Difference between java and Java Script

Although the names are almost the same Java is not the same as Java Script.
These are two different techniques for Internet programming. Java is
programming language. JavaScript is a scripting language as the name implies.
The difference is that we can create real programs with java. But java script in
not real programming. Java Script is meant to be easy to understand and easy to
use. JavaScript authors should not have to care too much about programming.

80
Web-Based
Library
We could say that Java Script is rather an extension to HTML than a separate
computer language. Of course this is not the official definition but it makes it
easier to understand the difference between java and java script.

How can Java Script scripts run?

The first browser to support java script was the Netscape Navigator 2.0 of course
the higher versions do have java script as well. You might know that java does
not run on all Netscape Navigators 2.0 (or higher versions) versions. But this is
not true for java script -although there are some problems with the different
versions.

The Mac version for example seems to have many bugs. In the near future there
are going to be some other browsers, which support java script. The Microsoft
Internet explorer 3.0 is going to support java script. JavaScript enabled browsers
are going to spread soon - it is worth learning this new technique now. You might
realize that is really easy to write Java Script scripts.

We have to know is some basic techniques and some work-around for problems
you might encounter. Of course we need a basic. Understanding HTML before
reading this tutorial you can find many really good online resources about HTML.
Best you make an online search about html at yahoo if you want to get informed
about HTML. Now I want to show some small scripts so you can learn how they
are implemented into HTML-documents and to show which possibilities you have
with the new scripting language. The following is a very small script, which will
only print a text into an HTML document.

<Html>
<Head>
My first JavaScript
</head>
<Body><br>
This is a normal HTML document
<Br>
<script language=JavaScript>

81
Web-Based
Library
Document. Write (this is a java script)
</script><b r>
Backing HTML again</body>
</html>

If you are using a java script enabled-browser at the moment then you will have
the possibility to see this script working. If your browser doesnt support Java
Script then this output might be some kind of strange
This is a normal HTML document
This is java script!
Back in HTML again.

Functions:
Functions are best declared between the <Head> tag of HTML page. Functions
are called by user-initiated events. Seems reasonable to keep the functions
between the <Head> tags. They are loaded first before a user can do anything
that might call a function. Scripts can be placed between inside comment fields
to ensure that older browser do not display the script itself.

<Html>
<Head>
<script language=JavaScript>
Function pushbutton (){
Alert (Hello!);
}
</script>
</head>
<Body>
<Form>
<input type=button name=Button1 value=push me onclick=pushbutton
()>
</form>
</body>
</html>

If we want to test this one immediately and you are using a Java Script enabled
browser then please go ahead and push the button. This script will create a

82
Web-Based
Library
button and when you press it a window will pop up saying hello!. In fact we
have a lot of possibilities just by adding functions to our scripts.
The common browsers transmit the form information by either method: heres
the complete tag including the GET transmission method attribute for the
previous form
Example
<Form method =GET action=http://www.mycompany.com/cgi-bin/upfdate.pl>
</form>

Input elements:

Use the <input> tag to define any one of a number of common form elements
including text fields multiple choice lists click able images and submission
buttons. There are many attributers for this tag only that types and name
attributes are required for each element, each type of input element uses only a
subset of the followed attributes. Additional <input> attributes may be required
based upon which type of the form element you specify.

Submit button:

The submit button (<input type=submit>) does what its name implies, settings in
motion the forms submission to the server from the browser. We many have
more than submit buttons will be added to the parameter list the browser sends
along to the server.

Example
< Input type =submit>
<Input type=submit value=submit name=name>

Reset button:

The reset button if firm <input> button is nearly self- explanatory; it lets the user
reset erase or set to some default value all elements in the form. By default the
browser displays a reset button worth the label reset. We can change that by
specifying a value attribute with tour own button label.

83
Web-Based
Library

Introduction to JDBC:

JDBC (Java Database connectivity) is a front-end tool for connecting to a server


to ODBC in that respect, however JDBC can connect only java client and it uses
ODBC for the connectivity. JDBC is essentially a low-level API since any data
manipulation, storage and retrieval has to be done by the program itself. Some
tools, which provide a higher-level abstraction, are expected shortly.

The next question that needs to be answered is why we need JDBC, once we have
ODBC on hand. We can use the same ODBC to connect the entire database and
ODBC is a proven technology. Problem for doing this is ODBC gives a c language
API, which uses pointers extensively. Since java does not have any pointers and
is object-oriented sun Microsystems, inventor of java developed to suit its needs.

Requirements to use JDBC:

To use JDBC you need a basic knowledge of databases and SQL. A part from this
you need the jdk1.1 (Java Development Kit1.1 available javasofts website) or a
version of Java since jdk1.1 and above come bundled with JDBC Software

After that you need to have a back-end database engine for which a JDBC driver
is available. When JDBC drivers are not available JDBC-ODBC bridge drivers are
used to access the database through ODBC. Back-end is not needed when JDBC
driver is capable of storing and retrieving the data itself, or if JDBC-ODBC Bridge
and the ODBC driver can be used to store and retrieve the information.

84
Web-Based
Library

DATABASE MODELS:

JDBC and accessing the database through applets and JDBC API via an
intermediate server resulted server resulted in a new type of database model
which is different from the client-server model. Based on number of intermediate
server through the request should go it is named as single tire, two tire and multi
tire architecture

Single Tier:

In a single tier the server and client are the same in the sense that a client
program that needs information (client) and the source of this type of
architecture is also possible in java, in case flat files are used to store the data.
However this is useful only in case of small applications. The advantage with this
is the simplicity and portability of the application developed.

Server and
client

Database

Two Tiers (client-server):

In two tier architecture the database resides in one machine and client in
different machine they are connected through the network. In this type of
architecture a database management takes control of the database and provides
access to clients in a network. This software bundle is also called as the server.
Software in different machines, requesting for information are called as the
clients.

85
Web-Based
Library

Client
Database
Database
Server

Client

Three tier and N-Tier:


In the three-tier architecture, any number servers can access the database that
resides on server. Which in turn serve clients in a network? For example, you
want to access the database using java applets, the applet running in some other
machine, can send request only to the server from which it is down loaded. For
this reason we will need to have a intermediate server which will accept the
requests from applets and them to the actual database server. This intermediate
server acts as a two-way communication channel also. This is the information or
data from the database is passed on to the applet that is requesting it. This can
be extended to make n tiers of servers, each server carrying to specific type of
request from clients; however in practice only 3 tiers architecture is popular.

JDBC Driver Types:

The JDBC drivers that we are aware of at this time fit into one of four categories

1. JDBC-ODBC BRIDGE PLUS ODBC DRIVER

The java soft bridge product provides JDBC access via ODBC drivers. Note that
ODBC binary code end in many cases database client code must be loaded on
each client machine that uses this driver. As a result, this kind of driver is most

86
Web-Based
Library
appropriate on a corporate network where client installations are not major
problem, or for application server code written in java in a 3-tier architecture.

2. NATIVE API PARTLY-JAVA DRIVER:

This kind of driver converts JDBC calls into calls on the client API for oracle
Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style
of driver requires that some binary code be loaded on each client machine.

3. JDBC-NET ALL-JAVA DRIVER

This driver translates JDBC calls into a DBMS independent net protocol, which is
then translated, to a DBMS protocol by a server. This net server middle-ware is
able to connect its all java clients to many different databases. The Specific
protocol used depends on the vendor. In general, this most flexible JDBC
alternative. It is likely that all vendors of this solution will provide products
suitable for intranet use. In order for these products to also support Internet
access, they must handle the additional requirements for security, access through
firewalls, etc that the web imposes. Several vendors are adding JDBC drivers to
their existing database middleware products.

4. NATIVE PROTOCOL ALL-JAVA DRIVER

This kind of driver converts JDBC calls into the network protocol used by DBMS
directory. This allows a direct call from the client machine to the DBMS server
that is practical solution for intranet access. Since many of these protocols are
proprietary, the database vendors themselves will be the primary source. Several
database vendors have these in progress. Eventually, we expect that driver
categories 3 and 4 will be the preferred way to access databases from JDBC.
Driver categories one and two are interim solutions where direct all java drivers
are not yet available. Category 4 is in some sense the ideal; however, there are
many cases where category 3 may be preferable: eg: -where a thin DBMS-

87
Web-Based
Library
independent client is desired, or if a DBMS independent protocol is standardized
and implemented directly by many DBMS vendors.

Servlets:

Introduction

The Java web server is JavaSoft's own web Server. The Java web server is just a
part of a larger framework, intended to provide you not just with a web server,
but also with tools. To build customized network servers for any Internet or
Intranet client/server system. Servlets are to a web server, how applets are to
the browser.

About Servlets

Servlets provide a Java-based solution used to address the problems currently


associated with doing server-side programming, including inextensible scripting
solutions, platform-specific APIs, and incomplete interfaces.

Servlets are objects that conform to a specific interface that can be plugged into
a Java-based server. Servlets are to the server-side what applets are to the
client-side - object byte codes that can be dynamically loaded off the net. They
differ from applets in that they are faceless objects (without graphics or a GUI
component). They serve as platform independent, dynamically loadable,
pluggable helper byte code objects on the server side that can be used to
dynamically extend server-side functionality.

For example, an HTTP Servlets can be used to generate dynamic HTML content.
When you use Servlets to do dynamic content you get the following advantages:

Theyre faster and cleaner than CGI scripts


They use a standard API (the Servlets API)
They provide all the advantages of Java (run on a variety of servers
without needing to be rewritten).

88
Web-Based
Library

Attractiveness of Servlets

There are many features of Servlets that make them easy and attractive to use.
These include:
Easily configured using the GUI-based Admin tool
Can be loaded and invoked from a local disk or remotely across the
network.
Can be linked together, or chained, so that one Servlets can call
another Servlets, or several Servlets in sequence.
Can be called dynamically from within HTML pages, using server-
side include tags.
Are secure - even when downloading across the network, the
Servlets security model and Servlets sandbox protect your system
from unfriendly behavior.

Advantages of the Servlet API

One of the great advantages of the Servlet API is protocol independence. It


assumes nothing about:
The protocol being used to transmit on the net
How it is loaded
The server environment it will be running in

These qualities are important, because it allows the Servlet API to be embedded
in many different kinds of servers. There are other advantages to the Servlet API
as well. These include:
Its extensible - you can inherit all your functionality from the base
classes made available to you.
Its simple, small, and easy to use.

89
Web-Based
Library

Features of Servlets

Servlets are persistent. Servlet are loaded only by the web server and
can maintain services between requests.
Servlets are fast. Since Servlets only need to be loaded once, they
offer much better performance over their CGI counterparts.
Servlets are platform independent.
Servlets are extensible. Java is a robust, object-oriented programming
language, which easily can be extended to suit your needs
Servlets are secure.
Servlets can be used with a variety of clients.

Loading Servlets

Servlets can be loaded from three places

From a directory that is on the CLASSPATH. The CLASSPATH of the


JavaWebServer includes service root/classes/ which is where the system classes
reside.

From the <SERVICE_ROOT /Servlets/ directory. This is *not* in the servers


class path. A class loader is used to create Servlets from this directory. New
Servlets can be added - existing Servlets can be recompiled and the server will
notice these changes.

90
Web-Based
Library
From a remote location. For this a code base like http: // nine.eng / classes /
foo / is required in addition to the Servlets class name. Refer to the admin GUI
docs on Servlet section to see how to set this up.

Loading Remote Servlets

Remote Servlets can be loaded by:

1. Configuring the Admin Tool to setup automatic loading of remote Servlets


2. Setting up server side include tags in. shtml files
3. Defining a filter chain configuration

Invoking Servlets

A Servlet invoker is a Servlet that invokes the "service" method on a named


Servlet. If the Servlet is not loaded in the server, then the invoker first loads the
Servlet (either from local disk or from the network) and the then invokes the
"service" method. Also like applets, local Servlets in the server can be identified
by just the class name. In other words, if a Servlet name is not absolute, it is
treated as local.

A client can invoke Servlets in the following ways:

The client can ask for a document that is served by the Servlet.
The client (browser) can invoke the Servlet directly using a URL, once it
has been mapped using the Servlet Aliases section of the admin GUI.
The Servlet can be invoked through server side include tags.
The Servlet can be invoked by placing it in the Servlets/ directory.
The Servlet can be invoked by using it in a filter chain.

91
Web-Based
Library

Java Server Pages (JSP):

Java Server Pages is a simple, yet powerful technology for creating and
maintaining dynamic-content web pages. Based on the Java programming
language, Java Server Pages offers proven portability, open standards, and a
mature re-usable component model.

PORTABILITY

Java Server Pages files can be run on any web server or web-enabled
application server that provides support for them. Dubbed the JSP engine, this
support involves recognition, translation and management of the Java Server
Pages lifecycle and its interaction with associated components.

PROCESSING

A Java Server Pages file is essentially an HTML document with JSP scripting or
tags. It may have associated components in the form of. Class, .jar, or .ser
files- -or it may not. The use of components is not required.

The Java Server Pages file has a .jsp extension to identify it to the server as a
Java Server Pages file.

ACCESS MODELS

A Java Server Pages file may be accessed in at least two different ways:
A client request comes directly into a Java Server Page.

92
Web-Based
Library
A request comes through a servlet.

Servlet generates the dynamic content. To handle the response to the Client,
the servlet creates a Bean and stores the dynamic content (sometimes called
the result set) in the Bean. The servlet then invokes a Java Server Page that
will present the content along with the Bean containing the generated from
the servlet.

There are two APIs to support this model of request processing using Java
Server Pages. One API facilitates passing context between the invoking servlet
and the Java Server Page. The other API lets the invoking servlet specify
which Java Server Page to use.

In both of the above cases, the page could also contain any valid Java code.
The Java Server Pages architecture separation of content from presentation-
-it does not mandate it.

JDBC requires that the SQL statements be passed as Strings to Java methods.
For example, our application might present a menu of database tasks from
which to choose. After a task is selected, the application presents prompts and
blanks for filling information needed to carry out the selected task. With the
requested input typed in, the application then automatically invokes the
necessary commands.

93
Web-Based
Library

Oracle:

Introduction:

Oracle is a relational database management system, which organizes data in the


form of tables. Oracle is one of many database servers based on RDBMS model,
which manages a seer of data that attends three specific things-data structures,
data integrity and data manipulation. With oracle cooperative server technology
we can realize the benefits of open, relational systems for all the applications.
Oracle makes efficient use of all systems resources, on all hardware architecture;
to deliver unmatched performance, price performance and scalability. Any DBMS
to be called as RDBMS has to satisfy Dr.E.F.Codds rules.

Distinct Features of Oracle:

Oracle is portable:

The Oracle RDBMS is available on wide range of platforms ranging from PCs to
super computers and as a multi user loadable module for Novel NetWare, if you
develop application on system you can run the same application on other systems
without any modifications.

Oracle is compatible:

Oracle commands can be used for communicating with IBM DB2 mainframe
RDBMS that is different from Oracle, that is Oracle compatible with DB2. Oracle
RDBMS is a high performance fault tolerant DBMS, which is specially designed for
online transaction processing and for handling large database applications.

94
Web-Based
Library

Multithreaded server architecture:

Oracle adaptable multithreaded server architecture delivers scalable high


performance for very large number of users on all hardware architecture including
symmetric multiprocessors (sumps) and loosely coupled multiprocessors.
Performance is achieved by eliminating CPU, I/O, memory and operating system
bottlenecks and by optimizing the Oracle DBMS server code to eliminate all
internal bottlenecks.

Features of oracle:

Most popular RDBMS in the market because of its ease of use


Client/server architecture.
Data independence.
Ensuring data integrity and data security.
Managing data concurrency.
Parallel processing support for speed up data entry and online transaction
processing used for applications.
DB procedures, functions and packages.

Dr.E.F.CODDs Rules

These rules are used for valuating a product to be called as relational database
management systems. Out of 12 rules, a RDBMS product should satisfy at least 8
rules +rule called rule 0 that must be satisfied.

Rule 0: Foundation Rule:

For any system that is to be advertised as, or claimed to be relational DBMS. That
system should manage database with in it self, with out using an external
language.

95
Web-Based
Library

RULE 1.Information Rule

All information in relational database is represented at logical level in only one


way as values in tables.

RULE 2.Guaranteed Access:

Each and every data in a relational database is guaranteed to be logically


accessibility by using to a combination of table name, primary key value and
column name

RULE 3.Systematic Treatment of Null Values:

Null values are supported for representing missing information and inapplicable
information. They must be handled in systematic way, independent of data types.

RULE 4 Dynamic Online Catalog Based Relation Model:

The database description is represented at the logical level in the same way as
ordinary data so that authorized users can apply the same relational language to
its interrogation as they do to the regular data.

RULE 5: Comprehensive Data Sub Language

A relational system may support several languages and various models of


terminal use. However there must be one language whose statement can express
all of the following:
Data Definitions, View Definitions, Data Manipulations, Integrity, Constraints,
Authorization and transaction boundaries.

96
Web-Based
Library

RULE 6.View Updating:

Any view that is theoretical can be updatable if changes can be made to the
tables that effect the desired changes in the view.

RULE 7.High Level Update, Insert and Delete:

The capability of handling a base relational or derived relational as a single


operand applies not only retrieval of data also to its insertion, updating, and
deletion.

RULE 8.Physical Data Independence:

Application program and terminal activities remain logically unimpaired whenever


any changes are made in either storage representation or access method.

RULE 9.Logical Data Independence:

Application programs and terminal activities remain logically unimpaired


whenever any changes are made in either storage representation or access
methods.

RULE 10: Integrity Independence:

Integrity constraints specific to particular database must be definable in the


relational data stored in the catalog, not in application program.

97
Web-Based
Library

RULE 11: Distributed Independence:

Whether or not a system supports database distribution, it must have a data sub-
language that can support distributed databases without changing the application
program.

RULE 12: Non Sub-Version:

If a relational system has low level language, that low language cannot use to
subversion or by pass the integrity rules and constraints expressed in the higher
level relational language.

Oracle Supports The Following CODDS Rules:

Rule 1: Information Rule (Representation of information)-YES.


Rule 2: Guaranteed Access-YES.
Rule 3: Systematic treatment of Null values-YES.
Rule 4: Dynamic on-line catalog-based Relational Model-YES.
Rule 5: Comprehensive data sub language-YES.
Rule 6: View Updating-PARTIAL.
Rule 7: High-level Update, Insert and Delete-YES.
Rule 8: Physical data Independence-PARTIAL.
Rule 9: Logical data Independence-PARTIAL.
Rule 10: Integrity Independence-PARTIAL.
Rule 11: Distributed Independence-YES.
Rule 12: Non-subversion-YES.

98
Web-Based
Library

Conclusion

99
Web-Based
Library

Conclusion

This project named Web-Based Library is developed and designed as per the
requirements and necessities made by the library of St.Martins PG College of
Technology.

The main features of this project are providing user-friendly interface for both the
Librarian and the students and it also avoids carrying out the work manually and
reduces the wastage of paper as everything is done electronically and students
are directly see the books status with out librarian help and reserving books
through web.

We can make a view and modify data according to the users needs. The design of
the current system supports this type of facilities .As all the screens are self
explanatory, it is easy to work with a less training for a new operator. This
system eliminated the problems of the existing system and enhances its
capability.

100
Web-Based
Library

Bibliography and References

101
Web-Based
Library

Bibliography and References

References for the Project Development were taken from the following
Books and Web Sites.

Database Reference:

Ivan BayRoss SQL/PLSQL, Third revised edition-2005, BPB publications.

Ramakrishnan. Gehrke Database Management System, Third Edition-2003, Mc


GRAW-HILL publications.

HTML Reference:

Steven Holzner HTML Black Book, First Edition-2005, Dreamtech Press.

JAVA Reference:

Hrbert Schildt The Complete Reference of Java2, Fifth Edition-2002, Tata


McGraw-Hill Publishing Company Limited.

Robert Orfali. Dan Harkey Client/Server Programming with JAVA and CORBA,
Second Edition-2002, Wiley Computer Publishing.

102
Web-Based
Library

JavaScript Reference:

James Jaworski Mastering JavaScript & Jscript, First Edition-1999, BPB


Publications.

UML Reference:

Grady Booch, James Rumbaugh, Ivar Jacobson The Unified Modeling Laguage
UserGuide, Fifth Impression-2007, PEARSON Education.

James Rumbaugh, IvarJacobson, Grady Boach The Unified Modeling Language


Reference Manual, Second Impression-2006, PEARSON Education.

S/E Reference:

Sommerville Software Engineering, Seventh Edition-2004, PEARSON Education.

Web-Sites :
http://www.java.sun.com
http://www.java2s.com
http://www.koders.com
http://www.theserverside.com
http://codersguru.com
http://www.google.com
http://www.yahoosearch.com

103
Web-Based
Library

104

You might also like