Sunteți pe pagina 1din 97

LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 1


LIBRARY MANAGEMENT SYSTEM

1. SYNOPSIS

The main objective of the LIBRARY MANAGEMENT SYSTEM project is


discipline of managing the library tasks. Other than that, there will be less paper work just
because whole system will be computerized. The system is entering the records of new
books, retrieving the details of books available in the library. We can issue books to the
library member and maintain their records and can also checks how many books are issued
and stocks available in the library. In this project we can maintain the late fine of library
member who return the issued book after the due date. We are developing this system for our
college library at SWAMY SASWATHIKANANDA COLLEGE, Poothotta for advanced
functioning of our college library.

MODULES

 Registration
 Stock Entry
 Issue Management

PALTFORMS

Front End: Visual Basic 6.0

Back End: Microsoft SQL Server 2008

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 2


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 3


LIBRARY MANAGEMENT SYSTEM

2. INTRODUCTION

The project is entitled with “LIBRARY MANAGEMENT SYSTEM” that


allows the user for entering details of new books, retrieving the details of books available in
the library. A detailed report is also generated. It is more user friendly. We can issue books to
members and can maintain their details . Also we can calculate the late fine of members who
returns the issue book after the due date.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 4


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 5


LIBRARY MANAGEMENT SYSTEM

3. SYSTEM ANALYSIS

System analysis is a detailed study of the various operations performed by a


system and their relationship within and outside of the system. During analysis, data are
collected on valuable file, decision points and transactions handled by the present system.
Ones the analysis is completed the system analyst has a firm understanding of what is to be
done. For system analysis we went to our college library itself and then we collected required
data needed for our project.

3.1 EXISTING SYSTEM

The system we have currently in manual library system. There is a lot of book in
library but they have no serial number. Different writers have different books but no chart
about them. All the details of books are maintained in a single record and searching is very
time consuming and difficult. So searching and upgrading the details is a tedious task. In
order to overcome the disadvantages, the system is computerized.

DISADVANTAGES :

 It is very slow and time consuming.


 It is very difficult to maintain.
 It is not error free.
 Tracing a book is very difficult.
 Fast report generation is not possible.

3.2 PROPOSED SYSTEM

Proposed system is a computerized “LIBRARY MANAGEMENT SYSTEM”, it


tries to solve the problems of existing system. The main objective is to make the library
information details more efficient. This system should maintain different data files, so that
the data can be retrieved easily and in an efficient manner and it include registration of
student, staff, etc…storing their details into the system. Through our software users can add
member details & book details, search for members & books, update information & also
manage books with ease. This software also has facility to give a unique id for every
SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 6
LIBRARY MANAGEMENT SYSTEM

members who have membership in library and stores the details of each and every members
automatically. It includes a searching facility to find all the details of members and books.

ADVANTAGES :

 User friendly interface


 Faster access to database
 More storage capacity
 Search facility
 Issue and return of books can done quickly and effectively
 Through this, manual work can be eliminated and errors can be avoided easily
 Manage the library systematically.

MODULE DESCRIPTION

The “LIBRARY MANAGEMENT SYSTEM” deals with books and members


related with the library. This is a computerized user friendly system. It consists of seven
modules,

1) Registration

Suppose a staff or a student wish to take books from the library, you must
register otherwise you will not be allowed to access library. The admin can register the details
of new member such as name, register no, class, etc… Also the admin can update and delete
the records of members as per requirements.

2) Stock entry

In this module we can understand the details of books about author’s name, book
name, publisher’s name, type of book, etc… It also includes stock details of books.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 7


LIBRARY MANAGEMENT SYSTEM

3) Issue management

i. Book issue

Here the admin can check the membership details, book availability and also
how many books are issued for each member. There must be two books will issue for
students and six books for staffs.

ii. Book return

When you are done reading your book, you can return it at the specified time
(14 days).

3.3 FEASIBILITY STUDY

Feasibility is the study of impact, which happens in the organization by the


development of a system. The result can be either positive or negative.

Depending up on the result of feasibility study, further steps in the system


development is considered. During the feasibility study we actually compare the existing
system with the proposed system and a report will be made. The existing system, there is no
facility for maintenance of records, not error free, fast report generation is not possible and
difficult to track the book. For feasibility analysis some understanding of the major
requirements of the system is essential.

Three key considerations involved in the feasibility analysis are:

 Economic Feasibility
 Technical Feasibility
 Behavioural Feasibility

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 8


LIBRARY MANAGEMENT SYSTEM

3.3.1 Economic Feasibility

Economic analysis is most frequently used method for evaluating effectiveness


of the proposed system and it is also known as cost-benefit analysis. This procedure
determines the benefits and saving that are expected from the proposed system and compared
with the cost of the existing system.

Since our system works as a computer based system, it reduces a lot of manual
recording and man power. From the system study, we understood that several works were
done in records. It is very time consuming and manual effort. The proposed system will
reduce the manual effort and make it easier to store the book details and member details.
Here involves financial consideration, in this case of a new computer system. After
development of the proposed system it does not require a high cost for maintenance and
updation. Therefore the system is economically feasible.

3.3.2 Technical Feasibility

Technical feasibility assesses the current resources (such as hardware and


software) and technology, which are required to accomplish user requirements in the software
within the allocated time and budget.

As the library is not having a computer, first we should have money for
purchasing the required hardware and software. The proposed system is technically feasible,
since the proposed system can be developed in a computer with minimum expenditure and
specifications. The data stored in manual records are converted to databases. We can strongly
say that it is technically feasible, since there will not be much difficulty in getting the
required resources and data for development and maintenance of the system.

3.3.3 Behavioural Feasibility

Behavioural feasibility includes how strong the reaction of the staff towards the
development of new system that involves computer’s use in their daily work. People are not

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 9


LIBRARY MANAGEMENT SYSTEM

interested in changing from one system to another system. Computer have been known to
facilitate changes.

An estimate should be made to know the interest of the staff in the library
towards the department of the proposed system. Reaction of the staff was very encouraging.
So the system’s behavioural feasibility is alright.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 10


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 11


LIBRARY MANAGEMENT SYSTEM

4.REQUIREMENT ANALYSIS

Requirement analysis is a process of discovery refinement modeling and


specification. The analysis can be divided into :

 Problem recognition.
 Problem evaluation and synthesis.
 Modeling

4.1 PROBLEM RECOGNITION

The goal of this step is recognition of basic problems of elements as indicated


by customer. The basic purpose of this activity is to obtain a thorough understanding of the
needs of client and user what exactly is desired from the software is the constraints on
solution. The main problem of existing system are :

 Time consuming.
 More man power is wasted.
 Less accuracy, and data may be lost.

4.2 PROBLEM EVALUATION AND SYNTHESIS

In this step analyst must define all externally observable object, evaluating flow
and control of step of information, define and elaborate all software function, understand the
software behavior and design constraints etc. Evaluation and synthesis continues until both
analyst and customer felt confident about the project. Once the problem identified, the
evaluation process begins. After evaluation of current problem and the desired information,
the analyst may synthesis one or more solution.

 Cost effectiveness.
 Faster and records are accurate.
 More secure and easy retrieval of data.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 12


LIBRARY MANAGEMENT SYSTEM

4.3 MODELING

During a software requirement analysis, we create models to gain better


understanding of actual logical entity to be built. The model helps the analyst to
understanding information and function of the system. The model became the main reference
for the review to determine completeness, the main method used for this is DFD(Data Flow
Diagram).

DATA FLOW DIAGRAM(DFD)

A DFD, also known as the bubble chart has the purpose of clarifying system
requirements and identifying major information that will become programs in system design.
A DFD is a pictorial representation of network that describes the flow of data through a
system. The symbols used in Data Flow Diagram are :

 It represents a data source or destination.

 It represents floe of data.

 It represents a process that transforms data.

 It represents data storage (eg. table).

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 13


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 14


LIBRARY MANAGEMENT SYSTEM

5.SYSTEM SPECIFICATION

5.1 HARDWARE REQUIREMENTS

CPU Type : Intel Celeron or above

Base Memory : 128 MB RAM or above

Display Type : VGA or HDMI

Hard Disk Drive : 20 GB or greater

Floppy Disk Drive: 1.44 MB

Printer : Any printer supported by the OS

5.2 SOFTWARE REQUIREMENTS

Operating System: WINDOWS XP or Later

Front End : Visual Basic 6.0, Crystal Reports 8.0

Back End : Microsoft SQL Server 2000

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 15


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 16


LIBRARY MANAGEMENT SYSTEM

6.SYSTEM DESIGN

System design is a process of developing specifications for a candidate system


that meet the criteria established in the system analysis. Major steps in design are the
preparation of the input forms and output reports in a form applicable to user.

The main objective of the system design is to use the package easily by any computer
operator. System design is the creative act of invention, developing new inputs, a database,
offline files, method, procedure and output for processing business to meet an organization
objective. System design builds information gathered during the system analysis.

6.1 DATA DESIGN

Data design creates a model of data or information that is represented at a higher


level of abstraction. The structure of data has always been an important part of software
design. The software design activity translates this requirement model into the data structure
at the software component level.

Data design is required to manage the large volume of information. In this


system, normalization process, the redundant field will be eliminated and finally produce the
efficient table.

6.2 ARCHITECTURAL DESIGN

Architectural design is a comprehensive frame work that describes its form and
how they fit together. The properties of components interact with other components.
Architectural design focuses on the representation of the structure of the software.

6.3 PROCEDURAL DESIGN

Procedural design or component level design occurs after data, architectural and
interface design must be translated into operational software. The procedural design for each
component, represented in graphical, tabular or text based notation, is the primary work
product produced during component level design.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 17


LIBRARY MANAGEMENT SYSTEM

6.4 INTERFACE DESIGN

Interface design creates and effective communication medium between a human


and computer. Design identifies interface objects and actions then creates a screen layout that
forms the basis for user interface.

Interface design focus on :

1. The design of interfaced between software components and non-human producers


and consumers of information.
2. The design of interface between software components.
3. The design of interface between a human and computer.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 18


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 19


LIBRARY MANAGEMENT SYSTEM

7. CODING

A code provides a brief identifications of data item and replaces longer


description that would be more awkward to store and manipulate. A code can be defined as a
group of characters used to identify an item of data, while identification is the main function
of a code. A code may also show relationships between items of data.

A code plan identifies the particular characteristics that needed to be contained


within the code. Only information that makes possible efficient identification and retrieval of
coded items should be chosen. The method chosen must have the following features:

 Expandable: Codes must provide space for additional entries that may be required.
 Precise: The code must identify the specific item.
 Concise: The code must be brief, yet it should adequately describe the item.
 Meaningful: The code must be useful to that people dealing with it. If possible, it
should indicate some characteristics of the item.
 Operable: The code should be compatible with present and anticipated methods of
data processing.

A code dictionary is often developed to make it easier for human to work with
the codes. It is a listening of code and their corresponding data items. The dictionary allows
one to translate the code into identification of the data or to determine the code for a
particular item.

The code of “LIBRARY MANAGEMENT SYSTEM” is shown in the appendix.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 20


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 21


LIBRARY MANAGEMENT SYSTEM

8.SYSTEM TESTING

Testing is the process of executing the program with the intent of findings errors.
System testing is the stage of implementation, which is aimed at ensuring that the system
works accurately and efficiently before the live operation commences. Testing is vital to the
success of system. System testing makes a logical assumption that if at the part of the system
is correct the goal will be success achieved. The candidate system is subject to variety of
tests, online, response, volume, stress, recovery and usability rests. A series of tests
performed for the proposed system is ready for the user acceptance testing.

There are 3 types of system tests being implemented:

 Unit testing
 Integration testing
 Validation testing

8.1 TESTING PROCESS

Software testing is the stage of implementation, which is aimed at ensuring that


the system works accurately and efficiently before the live operation commences. Testing is
vital to the success of the system. Testing is the process if executing program with the
explicit intention of finding errors that is making the program to fail. Analyst knows that an
effective testing program does not guarantee system reliability. Therefore, reliability must be
design into system.

An elaborate testing of data is prepared and system is tested using this test data.
While testing error noted and correction are made. A series of testing are performed for the
proposed system before the system is ready for the user acceptance testing.

8.2 UNIT TESTING

Unit testing focuses verification effort on smallest unit of software design


module. Here, there are two modules namely, client system and estimation. In unit testing,

 Module interface is tested to ensure that information properly flows into and put of
the program under test.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 22


LIBRARY MANAGEMENT SYSTEM

 Local data structure are examined to ensure that data stored temporarily maintains its
integrity during al steps in algorithm execution.
 Boundary condition is tested to ensure that the module operates properly at
boundaries established to limited or restrict processing.
 All independent paths through the control structures are executed at least once.
 Error handling paths are also tested.

Unit testing focuses verification effort on smallest unit of software design


module. Here, the module interfaces local data structures, boundary conditions, and all
independent paths and last but not least, all error handling paths were verified by false data.
Tested of data flow across each module interface of this software were done before any other
test was initiated.

8.3 INTEGRATION TESTING

Integration testing is a systematic technique for constructing the program


structure while at the time constructing the tests to uncover errors associating with
interfacing. Unit test modules were taken and a single program structure was build that been
dictated by the design. Incremental integration was adopted here. The entire software was
developed and tested in small segments, where errors were easy to locate and rectify.

Program builds (group of modules) were constructed corresponding to the


successful testing of user integration, data manipulation analysis and display processing and
data management. There tests can also be performed:

• Top down integration

• Bottom up integration

8.4 VALIDATION TESTING

Validation testing is done to ensure complete assembly of the error free software.
Validation can be is termed successfully if it functions in manner that is reasonably expected
by the customer.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 23


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 24


LIBRARY MANAGEMENT SYSTEM

9.SYSTEM IMPLEMENTATION

9.1 IMPLEMENTATION PROCEDURE

After the system is implemented successfully, training of the user is one of the
most important subtasks of the developer. Even well designed and technically elegant system
an succeed or fail, because of the way they are used and operated. For this purpose user
manually are prepared and handled over to the user to operate the developed systems
successfully in future. In order to put new application system into use the following activities
were taken care of:

• Preparation of user and system documentation.

• Conducting user training with demo and hands on.

• Test run for some period to ensure smooth switching over the system.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 25


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 26


LIBRARY MANAGEMENT SYSTEM

10.SOFTWARE MAINTENANCE

Maintenance is the enigma of system development. Maintenance covers a wide


range of activities including correcting code and design errors, updating documentation and
test data and upgrading users support.

Software maintenance means restoring something to its original condition.


Maintenance can be classified as corrective, adaptive or perfective maintenance means
repairing, processing or performance failures or making changes because of previously
uncorrected problem or false assumption. Adaptive maintenance means changing the
additional or changing needs.

Any system developer should be secured and protected against possible hazards.
Security measures are provided to prevent unauthorized access of the data base at various
levels. An uninterrupted power supply should be that the power failure or voltage fluctuations
will not erase the files.

Password protection and simple procedures to prevent the unauthorized access


are provided to the users. The system allows the users to enter the system only through proper
username and password.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 27


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 28


LIBRARY MANAGEMENT SYSTEM

11.CONCLUSION

The project entitled "LIBRARY MANAGEMENT SYSTEM" provides


maximum interaction and flexibility. The system was tested and the performance of the
system was provided to be much efficient and data maintenance and manipulation is achieved
practically. The system had been developed in an attractive fashion. The modules are tested
separately and put together to form the main system. Thus the system has fulfilled the entire
project is identified.

Using Visual Basic 6.0 as the front end and SQL Server 2000 as back end. the
system was developed and tested with all possible samples of data. The performance of the
system is provided to be efficient. The system provides flexibility for incorporating new
features which may be necessary in future.

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 29


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 30


LIBRARY MANAGEMENT SYSTEM

12.APPENDIX

12.1 APPENDICES - A(DATA FLOW DIAGRAM)

CONTEXT LEVEL

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 31


LIBRARY MANAGEMENT SYSTEM

FIRST LEVEL

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 32


LIBRARY MANAGEMENT SYSTEM

SECOND LEVEL

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 33


LIBRARY MANAGEMENT SYSTEM

SECOND LEVEL

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 34


LIBRARY MANAGEMENT SYSTEM

12.2 APPENDICES - B(TABLES)

Tables are also called grid charts because they are made up of intersecting
horizontal and vertical lines that form rows and columns. Tables are the convenient method
for expressing in summary form the relationships between two or more complex factors.

Table No : 1

Table Name : Login

Primary key : User_Name

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


User_Name Varchar(25) User name Primary key
Password Varchar(25) Password Not Null

Table No : 2

Table Name : Member

Primary key : Mem_Typeid

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Mem_Typeid Varchar(10) Member Type id Primary key
Mem_Type Varchar(10) Member Type Not Null
Limit Int Limit Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 35


LIBRARY MANAGEMENT SYSTEM

Table No : 3

Table Name : Department

Primary key : Dep_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Dep_id Varchar(10) Department id Primary Key
Dep_Name Varchar(25) Department Name Not Null

Table No : 4

Table Name : Designation

Primary Key : Des_id

Foreign Key : Dep_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Des_id Varchar(10) Designation id Primary Key
Des_Name Varchar(25) Designation Name Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 36


LIBRARY MANAGEMENT SYSTEM

Table No : 5

Table Name :Staff_Details

Primary Key : S_id

Foreign Key : Mem_Typeid,Des_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Mem_Typeid Varchar(10) Member Typeid ForeignKey
S_id Varchar(10) Staff id Primary Key
S_Firstname Varchar(15) Staff First Name Not Null
S_Lastname Varchar(15) Staff Last Name Not Null
Dep_id Varchar(10) Department id ForeignKey
Des_id Varchar(10) Designation id ForeignKey
S_Gender Varchar(10) Staff Gender Not Null
Sreg_Date Datetime Registration Date Not Null
Address Varchar(50) Address Allow Null
District Varchar(25) District Allow Null
Phno Varchar(12) Phone Number Not Null
S_status Varchar(10) Staff Status Not Null
Limit Int Limit Not Null

Table No : 6

Table Name : Course

Primary Key : Prog_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Prog_id Varchar(10) Program id Primary Key
Prog_name Varchar(10) Program Name Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 37


LIBRARY MANAGEMENT SYSTEM

Table No : 7

Table Name : Student _Details

Primary Key : Stud_id

Foreign Key : Mem_Typeid,Prog_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS

Mem_Typeid Varchar(10) Member Type id Foreign Key


Stud_id Varchar(10) Student id Primary Key
Stud_Firstname Varchar(15) Student First Name Not Null
Stud_Lastname Varchar(15) Student Last Name Not Null
Admin_No Varchar(10) Admission Number Not Null
Prog_id Varchar(10) Program id Foreign Key
Stud_Gender Varchar(6) Student Gender Not Null
Reg_date Datetime Register Date Not Null
YOS Numeric(18,0) Year Of Study Not Null
Stud_status Varchar(10) Student Status Not Null
Limit Int Limit Not Null

Table No : 8

Table Name : Book Category

Primary Key : Cat_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS

Cat_id Varchar(10) Category id Primary Key


Cat_name Varchar(25) Category Name Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 38


LIBRARY MANAGEMENT SYSTEM

Table No : 9

Table Name : Sub Category

Primary Key : Sub_id

Foreign Key : Cat_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS

Sub_id Varchar(10) Sub category id Primary Key


Sub_name Varchar(20) Sub category name Not Null
Cat_id Varchar(10) Category id Foreign Key

Table No : 10

Table Name : Stock Entry

Primary Key : B_id

ForeignKey : Sub_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS

B_id Varchar(10) Book id Primary Key


Cat_id Varchar(10) Category id Foreign Key
Sub_id Varchar(10) Sub category id Foreign Key
B_name Varchar(50) Book Name Not Null
Author Varchar(30) Author Not Null
No_of _copies Int Number Of Copies Not Null
Publisher Varchar(30) Publisher Not Null
Pub_ address Varchar(30) Publishing Address Not Null
Pub_year Numeric(18,0) Year of publishing Not Null
No_of _pages Numeric(18,0) Number of pages Not Null
Vol_no Int Volume Number Not Null
Edition_no Char(10) Edition Number Not Null
Reg_date Datetime Register Number Not Null
Price Float Price Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 39


LIBRARY MANAGEMENT SYSTEM

Table No : 11

Table Name : Unique Book Id

Primary Key : Acc_no

Foreign Key : B_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


Acc_no Varchar(10) Accession Number Primary Key
B_id Varchar(10) Book id Foreign Key
ISBN Varchar(10) Unique number of Book Not NULL
Call_no Varchar(15) Call number Not NULL
B_Status Varchar(10) Book Status Not NULL

Table No : 12

Table Name : Book Issue

Primary Key : B_issueid

Foreign Key : S_id,Stud_id,Acc_no

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


B_issueid Varchar(10) Book issue id Primary Key
Mem_typeid Varchar(10) Member type id Foreign Key
Acc_no Varchar(10) Accession Number Foreign Key
Issue_Date Datetime Issue Date Not Null
Return_Date Datetime Return Date Allow Null
Renewel_Date Datetime Renewel Date Allow Null
Issue_Status Varchar(10) Issue Status Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 40


LIBRARY MANAGEMENT SYSTEM

Table No : 13

Table Name : Fine

Foreign Key : B_issueid,S_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


B_issueid Varchar(10) Book issue id Foreign Key
S_id Varchar(10) Member type id Foreign Key
Fine Float Fine Not Null
F_Status Varchar(20) Fine Status Allow Null

Table No : 14

Table Name : Book _Loss

Foreign Key : B_issueid,S_id

FIELDS DATA TYPE DESCRIPTION CONSTRAINTS


B_issueid Varchar(10) Book issue id Foreign Key
S_id Varchar(10) Member type id Foreign Key
B_Fine Float Fine Not Null
Fbl_Status Varchar(20) Fine Status Not Null

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 41


LIBRARY MANAGEMENT SYSTEM

12.3 APPENDICES – C (INPUT AND OUTPUT FORMS)

LOADING FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 42


LIBRARY MANAGEMENT SYSTEM

LOGIN FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 43


LIBRARY MANAGEMENT SYSTEM

MDI FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 44


LIBRARY MANAGEMENT SYSTEM

MEMBER TYPE FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 45


LIBRARY MANAGEMENT SYSTEM

STAFF REGISTRATION FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 46


LIBRARY MANAGEMENT SYSTEM

STUDENT REGISTRATION FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 47


LIBRARY MANAGEMENT SYSTEM

DEPARTMENT FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 48


LIBRARY MANAGEMENT SYSTEM

DESIGNATION FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 49


LIBRARY MANAGEMENT SYSTEM

COURSE FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 50


LIBRARY MANAGEMENT SYSTEM

STOCK ENTRY FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 51


LIBRARY MANAGEMENT SYSTEM

UNIQUE FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 52


LIBRARY MANAGEMENT SYSTEM

CATEGORY FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 53


LIBRARY MANAGEMENT SYSTEM

SUBCATAGORY FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 54


LIBRARY MANAGEMENT SYSTEM

BOOK SEARCH FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 55


LIBRARY MANAGEMENT SYSTEM

MEMBER SEARCH FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 56


LIBRARY MANAGEMENT SYSTEM

ISSUE FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 57


LIBRARY MANAGEMENT SYSTEM

FINE (Late Return) FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 58


LIBRARY MANAGEMENT SYSTEM

FINE (Book Loss) FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 59


LIBRARY MANAGEMENT SYSTEM

REPORT FORM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 60


LIBRARY MANAGEMENT SYSTEM

ISSUE REPORT

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 61


LIBRARY MANAGEMENT SYSTEM

STOCK REPORT

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 62


LIBRARY MANAGEMENT SYSTEM

FINE REPORT

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 63


LIBRARY MANAGEMENT SYSTEM

12.4 APPENDICES – D (CODES)

LOGIN FORM

Private Sub CANCEL_Click()

Unload Me

End Sub

Private Sub Form_Load()

CONNECT

End Sub

Private Sub LOGIN_Click()

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Login", con, adOpenKeyset, adLockOptimistic

If username.Text = RS.Fields(0) And password.Text = RS.Fields(1) Then

Me.Hide

MDI1.Show

Else

MsgBox "Incorrect username or password"

username = ""

password = ""

username.SetFocus

End If

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 64


LIBRARY MANAGEMENT SYSTEM

MDI FORM

Private Sub Add_Department_Click()

DEPARTMENT.Show

End Sub

Private Sub Add_Designation_Click()

DESIGNATION.Show

End Sub

Private Sub Add_Programme_Click()

COURSE.Show

End Sub

Private Sub Book_Category_Click()

CATEGORY.Show

End Sub

Private Sub Book_Issue_Click()

ISSUE.Show

End Sub

Private Sub Book_Loss_Click()

BOOKLOSS.Show

End Sub

Private Sub BookSearch_Click()

BSEARCH.Show

End Sub

Private Sub Late_Return_Click()

LFINE.Show

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 65


LIBRARY MANAGEMENT SYSTEM

Private Sub Member_Click()

FMEMTYPE.Show

End Sub

Private Sub MembeSearch_Click()

MEMSEARCH.Show

End Sub

Private Sub New_Stock_Click()

STOCKENTRY.Show

End Sub

Private Sub reports_Click()

REPORT.Show

End Sub

Private Sub Staff_Click()

RSTAFF.Show

End Sub

Private Sub Student_Click()

LSTUDENT.Show

End Sub

MEMBER TYPE FORM

Public RS1 As New ADODB.Recordset

Private Sub display()

With RS

memtid.Caption = .Fields(0)

MEMTYPE.Text = .Fields(1)

mlimit.Text = .Fields(2)

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 66


LIBRARY MANAGEMENT SYSTEM

End With

End Sub

Private Sub CLOSE_Click()

Unload Me

End Sub

Private Sub memtype_Click()

X = MEMTYPE.Text

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Member where mem_type='" & X & "'", con, adOpenKeyset,
adLockOptimistic

If RS.EOF = False And RS.BOF = False Then

display

End If

End Sub

Private Sub UPDATE_Click()

Dim TMP As Integer

Dim I As Integer

y = InputBox("ENTER NEW LIMIT")

TMP = y - mlimit.Text

If y <= mlimit.Text Then

MsgBox ("Limit Cannot be Less than or Equal to Existing!")

Else

RS.Fields(2) = y

RS.UPDATE

mlimit.Text = y

MsgBox ("Limit Updated!")

If MEMTYPE.Text = "STAFF" Then

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 67


LIBRARY MANAGEMENT SYSTEM

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "SELECT * from Staff_Details", con, adOpenKeyset, adLockOptimistic

I = 12

Else

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "SELECT * from Student_Details", con, adOpenKeyset, adLockOptimistic

I = 10

End If

While RS1.EOF = False

RS1.Fields(I) = RS1.Fields(I) + TMP

RS1.UPDATE

RS1.MoveNext

Wend

Me.Hide

End If

End Sub

CONNECT

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Member", con, adOpenKeyset, adLockOptimistic

While RS.EOF = False

MEMTYPE.AddItem RS.Fields(1)

RS.MoveNext

Wend

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 68


LIBRARY MANAGEMENT SYSTEM

STUDENT REGISTRATION FORM

Dim flag As Integer

Public RS1 As New ADODB.Recordset

Private Sub display()

With RS

Option1.Value = False

Option2.Value = False

MTYPE.Caption = .Fields(0)

SID.Caption = .Fields(1)

FNAME.Text = .Fields(2)

LNAME.Text = .Fields(3)

ADMIN.Text = .Fields(4)

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Course where prog_id='" & .Fields(5) & "'", con, adOpenKeyset,
adLockOptimistic

PROGNAME.Text = RS1.Fields(1)

If .Fields(6) = "MALE" Then

Option1.Value = True

Else

Option2.Value = True

End If

REGDATE.Value = .Fields(7)

YOS.Text = .Fields(8)

STATUS.Text = .Fields(9)

LIMIT.Caption = .Fields(10)

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 69


LIBRARY MANAGEMENT SYSTEM

End With

End Sub

Private Sub ADD_Click()

flag = 0

Dim str As String

Dim X As Integer

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Student_Details ", con, adOpenKeyset, adLockOptimistic

If RS.EOF = True Then

SID.Caption = "ST1"

Else

RS.MoveLast

str = RS.Fields(1)

X = Val(Mid(str, 3))

SID.Caption = "ST" & (X + 1)

End If

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Student_Details", con, adOpenKeyset, adLockOptimistic

If FNAME.Text = "" Then

MsgBox ("MISSING STUDENT NAME!")

Else

RS.AddNew

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Member where mem_type='" & MTYPE.Caption & "'", con,
adOpenKeyset, adLockOptimistic

RS.Fields(0) = RS1.Fields(0)

RS.Fields(1) = SID.Caption

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 70


LIBRARY MANAGEMENT SYSTEM

RS.Fields(2) = FNAME.Text

RS.Fields(3) = LNAME.Text

RS.Fields(4) = ADMIN.Text

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Course where prog_name='" & PROGNAME.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS.Fields(5) = RS1.Fields(0)

If Option1.Value = True Then

RS.Fields(6) = Option1.Caption

Else

RS.Fields(6) = Option2.Caption

End If

REGDATE.Format = dtpShortDate

RS.Fields(7) = REGDATE.Value

RS.Fields(8) = YOS.Text

RS.Fields(9) = STATUS.Text

RS.Fields(10) = LIMIT.Caption

RS.UPDATE

MsgBox ("NEW STUDENT ADDED")

flag = 1

End If

End Sub

Private Sub CLEAR_Click()

SID.Caption = ""

FNAME.Text = ""

LNAME.Text = ""

ADMIN.Text = ""

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 71


LIBRARY MANAGEMENT SYSTEM

YOS.Text = ""

PROGNAME.Text = "<PLEASE SELECT>"

STATUS.Text = "<PLEASE SELECT>"

Option1.Value = False

Option2.Value = False

End Sub

Private Sub CLOSE_Click()

Unload Me

End Sub

Private Sub Command1_Click()

CrystalReport1.Action = 1

End Sub

Private Sub DELETE_Click()

If flag = 1 Then

RS.DELETE

SID.Caption = ""

FNAME.Text = ""

LNAME.Text = ""

ADMIN.Text = ""

YOS.Text = ""

LIMIT.Caption = ""

PROGNAME.Text = "<PLEASE SELECT>"

STATUS.Text = "<PLEASE SELECT>"

Option1.Value = False

Option2.Value = False

MsgBox ("STUDENT DETAILS DELETED!")

flag = 0

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 72


LIBRARY MANAGEMENT SYSTEM

Else

MsgBox ("NO DETAILS SELECTED!")

End If

End Sub

Private Sub Form_Load()

CONNECT

flag = 0

STATUS.AddItem "STUDYING"

STATUS.AddItem "NOT-STUDYING"

Option1.Value = False

Option2.Value = False

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Course", con, adOpenKeyset, adLockOptimistic

While RS.EOF = False

PROGNAME.AddItem RS.Fields(1)

RS.MoveNext

Wend

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Member where mem_type='STUDENT'", con, adOpenKeyset,


adLockOptimistic

If RS.EOF = False Then

LIMIT.Caption = RS.Fields(2)

End If

End Sub

Private Sub SEARCH_Click()

X = InputBox("ENTER FIRST NAME")

y = InputBox("ENTER LAST NAME")

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 73


LIBRARY MANAGEMENT SYSTEM

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Student_Details where stud_firstname='" & X & "' and
stud_lastname='" & y & "'", con, adOpenKeyset, adLockOptimistic

If RS.EOF = True Then

flag = 0

MsgBox ("NO RECORD FOUND")

Else

flag = 1

display

MsgBox ("FOUND!")

End If

End Sub

Private Sub UPDATE_Click()

If flag = 1 Then

RS.Fields(2) = FNAME.Text

RS.Fields(3) = LNAME.Text

RS.Fields(4) = ADMIN.Text

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Course where prog_name='" & PROGNAME.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS.Fields(5) = RS1.Fields(0)

If Option1.Value = True Then

RS.Fields(6) = Option1.Caption

Else

RS.Fields(6) = Option2.Caption

End If

REGDATE.Format = dtpShortDate

RS.Fields(7) = REGDATE.Value

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 74


LIBRARY MANAGEMENT SYSTEM

RS.Fields(8) = YOS.Text

RS.Fields(9) = STATUS.Text

RS.Fields(10) = LIMIT.Caption

RS.UPDATE

MsgBox ("STUDENT DETAILS UPDATED!")

flag = 0

Else

MsgBox ("NO DETAILS SELECTED!")

End If

End Sub

STOCK ENTRY FORM

Public RS1 As New ADODB.Recordset

Dim flag As Integer

Private Sub display()

With RS

BID.Caption = .Fields(0)

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Book_Category where cat_id='" & .Fields(1) & "'", con,
adOpenKeyset, adLockOptimistic

CATNAME.Text = RS1.Fields(1)

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Sub_Category where sub_id='" & .Fields(2) & "'", con,
adOpenKeyset, adLockOptimistic

SUBCATNAME.Text = RS1.Fields(1)

BNAME.Text = .Fields(3)

AUTHOR.Text = .Fields(4)

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 75


LIBRARY MANAGEMENT SYSTEM

COPIES.Text = .Fields(5)

PUBLISHER.Text = .Fields(6)

ADDRESS.Text = .Fields(7)

PYEAR.Text = .Fields(8)

PAGES.Text = .Fields(9)

VOLNO.Text = .Fields(10)

ENO.Text = .Fields(11)

REGDATE.Value = .Fields(12)

PRICE.Text = .Fields(13)

End With

End Sub

Private Sub CLOSE_Click()

Unload Me

End Sub

Private Sub DELETE_Click()

If flag = 1 Then

RS.DELETE

BID.Caption = ""

ACCNO.Text = ""

VOLNO.Text = ""

ENO.Text = ""

PRICE.Text = ""

BNAME.Text = ""

COPIES.Text = ""

PAGES.Text = ""

CALLNO.Text = ""

REGDATE.Value = ""

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 76


LIBRARY MANAGEMENT SYSTEM

AUTHOR.Text = ""

ISBN.Text = ""

BSTATUS.Text = ""

CATNAME.Text = ""

SUBCATNAME.Text = ""

PUBLISHER.Text = ""

ADDRESS.Text = ""

PYEAR.Text = ""

flag = 0

Else

MsgBox ("No Stock Selected!")

End If

End Sub

Private Sub Form_Load()

CONNECT

flag = 0

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Book_Category", con, adOpenKeyset, adLockOptimistic

While RS1.EOF = False

CATNAME.AddItem RS1.Fields(1)

RS1.MoveNext

Wend

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Sub_Category", con, adOpenKeyset, adLockOptimistic

While RS1.EOF = False

SUBCATNAME.AddItem RS1.Fields(1)

RS1.MoveNext

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 77


LIBRARY MANAGEMENT SYSTEM

Wend

End Sub

Private Sub NEWCOPY_Click()

flag = 0

BID.Caption = ""

VOLNO.Text = ""

ENO.Text = ""

PRICE.Text = ""

BNAME.Text = ""

COPIES.Text = ""

PAGES.Text = ""

AUTHOR.Text = ""

CATNAME.Text = ""

SUBCATNAME.Text = ""

PUBLISHER.Text = ""

ADDRESS.Text = ""

PYEAR.Text = ""

End Sub

Private Sub SAVE_Click()

K=0

Dim str As String

Dim X As Integer

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Stock_Entry", con, adOpenKeyset, adLockOptimistic

If RS.EOF = True Then

BID.Caption = "B1"

Else

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 78


LIBRARY MANAGEMENT SYSTEM

RS.MoveLast

str = RS.Fields(0)

X = Val(Mid(str, 2))

BID.Caption = "B" & (X + 1)

End If

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Stock_Entry", con, adOpenKeyset, adLockOptimistic

RS.AddNew

RS.Fields(0) = BID.Caption

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Book_Category where cat_name='" & CATNAME.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS.Fields(1) = RS1.Fields(0)

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Sub_Category where sub_name='" & SUBCATNAME.Text & "'",
con, adOpenKeyset, adLockOptimistic

RS.Fields(2) = RS1.Fields(0)

RS.Fields(3) = BNAME.Text

RS.Fields(4) = AUTHOR.Text

RS.Fields(5) = COPIES.Text

RS.Fields(6) = PUBLISHER.Text

RS.Fields(7) = ADDRESS.Text

RS.Fields(8) = PYEAR.Text

RS.Fields(9) = PAGES.Text

RS.Fields(10) = VOLNO.Text

RS.Fields(11) = ENO.Text

RS.Fields(12) = REGDATE.Value

RS.Fields(13) = PRICE.Text

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 79


LIBRARY MANAGEMENT SYSTEM

RS.UPDATE

BUNIQUE.Show

MsgBox ("New Stock Successfully Added!")

flag = 1

End Sub

Private Sub SEARCH_Click()

X = InputBox("ENTER BOOK NAME")

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Stock_Entry where b_name='" & X & "'", con, adOpenKeyset,
adLockOptimistic

If RS.EOF = True Then

flag = 0

MsgBox ("NO RECORD EXIST")

Else

display

MsgBox ("FOUND!")

flag = 1

End If

SAVE.Enabled = False

End Sub

Private Sub UNIQUE_Click()

BUNIQUE.Show

End Sub

Private Sub UPDATE_Click()

If flag = 1 Then

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Book_Category where cat_name='" & CATNAME.Text & "'", con,
adOpenKeyset, adLockOptimistic

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 80


LIBRARY MANAGEMENT SYSTEM

RS.Fields(1) = RS1.Fields(0)

If RS1.State = 1 Then RS1.CLOSE

RS1.Open "select * from Sub_Category where sub_name='" & SUBCATNAME.Text & "'",
con, adOpenKeyset, adLockOptimistic

RS.Fields(2) = RS1.Fields(0)

RS.Fields(3) = BNAME.Text

RS.Fields(4) = AUTHOR.Text

RS.Fields(5) = COPIES.Text

RS.Fields(6) = PUBLISHER.Text

RS.Fields(7) = ADDRESS.Text

RS.Fields(8) = PYEAR.Text

RS.Fields(9) = PAGES.Text

RS.Fields(10) = VOLNO.Text

RS.Fields(11) = ENO.Text

RS.Fields(12) = REGDATE.Value

RS.Fields(13) = PRICE.Text

RS.UPDATE

MsgBox ("Stock Updated!")

flag = 1

Else

MsgBox ("No Book Selected!")

End If

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 81


LIBRARY MANAGEMENT SYSTEM

BOOK SEARCH FORM

Private Sub AUTHOR_Change()

If AUTHOR.Text = "" Then

Else

y = AUTHOR.Text

If RS.State = 1 Then RS.CLOSE

RS.Open "select
b_name,author,no_of_copies,publisher,pub_address,pub_year,no_of_pages,vol_no,edition_n
o,price from Stock_Entry where author like '" & y & "%'", con, adOpenKeyset,
adLockOptimistic

Set DataGrid1.DataSource = RS

End If

End Sub

Private Sub BNAME_Change()

If BNAME.Text = "" Then

Else

X = BNAME.Text

If RS.State = 1 Then RS.CLOSE

RS.Open "select
b_name,author,no_of_copies,publisher,pub_address,pub_year,no_of_pages,vol_no,edition_n
o,price from Stock_Entry where b_name like '" & X & "%'", con, adOpenKeyset,
adLockOptimistic

Set DataGrid1.DataSource = RS

End If

End Sub

Private Sub Form_Load()

CONNECT

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 82


LIBRARY MANAGEMENT SYSTEM

End Sub

ISSUE FORM

Public RS1 As New ADODB.Recordset

Public RS2 As New ADODB.Recordset

Public RS3 As New ADODB.Recordset

Public RS11 As New ADODB.Recordset

Public RS12 As New ADODB.Recordset

Public RS21 As New ADODB.Recordset

Public RS22 As New ADODB.Recordset

Public RS31 As New ADODB.Recordset

Public K As String

Public J As Integer

Dim flag As Integer

Public Sub ADD()

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Book_Issue", con, adOpenKeyset, adLockOptimistic

RS.AddNew

RS.Fields(0) = BISSUEID.Caption

RS.Fields(1) = K & J

RS.Fields(2) = ACCNO.Text

RS.Fields(3) = ISSUEDATE.Value

'RS.Fields(4) = RETURNDATE.Value

'RS.Fields(5) = RENEWDATE.Value

RS.Fields(6) = NO.Caption

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 83


LIBRARY MANAGEMENT SYSTEM

RS.UPDATE

MsgBox ("BOOK ISSUED")

End Sub

Private Sub CLEAR_Click()

BISSUEID.Caption = ""

BNAME.Caption = ""

ACCNO.Text = ""

MEMTYPE.Text = "< Please Select >"

MEMID.Text = ""

YES.Value = False

NO.Value = False

End Sub

Private Sub CLOSE_Click()

Unload Me

End Sub

Private Sub Command1_Click()

If RS11.State = 1 Then RS11.CLOSE

RS11.Open "SELECT * FROM Book_Issue WHERE ACC_NO='" & ACCNO.Text & "'
AND ISSUE_STATUS='NO'", con, adOpenKeyset, adLockOptimistic

If RS11.EOF = False Then

MsgBox ("Book is Already Issued!")

flag = 1

BISSUEID.Caption = RS11.Fields(0)

ACCNO.Text = RS11.Fields(2)

If ACCNO.Text = "" Then

BNAME.Caption = ""

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 84


LIBRARY MANAGEMENT SYSTEM

Else

If RS21.State = 1 Then RS21.CLOSE

RS21.Open "SELECT * FROM Unique_Book_Id WHERE ACC_NO='" & ACCNO.Text &


"'", con, adOpenKeyset, adLockOptimistic

If RS21.EOF = True Then

BNAME.Caption = ""

Else

If RS22.State = 1 Then RS22.CLOSE

RS22.Open "SELECT * FROM Stock_Entry WHERE B_ID='" & RS21.Fields(1) & "'", con,
adOpenKeyset, adLockOptimistic

BNAME.Caption = RS22.Fields(3)

End If

End If

If RS11.Fields(1) = "SF" Then

MEMTYPE.Text = "STAFF"

Else

MEMTYPE.Text = "STUDENT"

End If

MEMID.Text = RS11.Fields(1)

ISSUEDATE.Value = RS11.Fields(3)

If IsNull(RS11.Fields(4)) Then

Else

RETURNDATE.Value = RS11.Fields(4)

End If

If IsNull(RS11.Fields(5)) Then

Else

RENEWDATE.Value = RS11.Fields(5)

End If

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 85


LIBRARY MANAGEMENT SYSTEM

If RS11.Fields(6) = "YES" Then

YES.Value = True

Else

NO.Value = True

End If

Else

If ACCNO.Text = "" Then

BNAME.Caption = ""

Else

If RS11.State = 1 Then RS11.CLOSE

RS11.Open "SELECT * FROM Unique_Book_Id WHERE ACC_NO='" & ACCNO.Text &


"'", con, adOpenKeyset, adLockOptimistic

If RS11.EOF = True Then

BNAME.Caption = ""

Else

If RS12.State = 1 Then RS12.CLOSE

RS12.Open "SELECT * FROM Stock_Entry WHERE B_ID='" & RS11.Fields(1) & "'", con,
adOpenKeyset, adLockOptimistic

BNAME.Caption = RS12.Fields(3)

End If

End If

End If

End Sub

Private Sub Form_Load()

CONNECT

ISSUEDATE.Value = Now

flag = 0

YES.Value = False

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 86


LIBRARY MANAGEMENT SYSTEM

NO.Value = False

If RS.State = 1 Then RS.CLOSE

RS.Open "SELECT * FROM Member", con, adOpenKeyset, adLockOptimistic

While RS.EOF = False

MEMTYPE.AddItem RS.Fields(1)

RS.MoveNext

Wend

End Sub

Private Sub ISSUE_Click()

flag = 0

Dim str As String

Dim X As Integer

If MEMTYPE.Text = "STAFF" Then

K = "SF"

Else

K = "ST"

End If

J = Val(Mid(MEMID.Text, 3))

If RS.State = 1 Then RS.CLOSE

RS.Open "select * from Book_Issue ", con, adOpenKeyset, adLockOptimistic

If RS.EOF = True Then

BISSUEID.Caption = "ISS1"

Else

RS.MoveLast

str = RS.Fields(0)

X = Val(Mid(str, 4))

BISSUEID.Caption = "ISS" & (X + 1)

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 87


LIBRARY MANAGEMENT SYSTEM

End If

If ACCNO.Text = "" Or MEMTYPE = "" Or MEMID = "" Then

MsgBox ("MISSING!")

Else

If MEMTYPE.Text = "STAFF" Then

If RS2.State = 1 Then RS2.CLOSE

RS2.Open "select * from Staff_Details where s_id='" & K & J & "'", con, adOpenKeyset,
adLockOptimistic

If RS2.EOF = True Then

MsgBox ("NO MEMBER FOUND WITH THIS ID")

ElseIf RS2.Fields(12) = 0 Then

MsgBox ("CANNOT ISSUE LIMIT EXCEEDED!")

Else

RS2.Fields(12) = RS2.Fields(12) - 1

RS2.UPDATE

ADD

End If

Else

If RS3.State = 1 Then RS3.CLOSE

RS3.Open "select * from Student_Details where stud_id='" & K & J & "'", con,
adOpenKeyset, adLockOptimistic

If RS3.EOF = True Then

MsgBox ("NO MEMBER FOUND WITH THIS ID")

ElseIf RS3.Fields(10) = 0 Then

MsgBox ("CANNOT ISSUE LIMIT EXCEEDED!")

Else

RS3.Fields(10) = RS3.Fields(10) - 1

RS3.UPDATE

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 88


LIBRARY MANAGEMENT SYSTEM

ADD

End If

End If

End If

End Sub

Private Sub memtype_Click()

If MEMTYPE.Text = "STAFF" Then

MEMID.Text = "SF"

Else

MEMID.Text = "ST"

End If

End Sub

Private Sub RENEW_Click()

RENEWDATE.CheckBox = False

If flag = 1 Then

RS11.Fields(5) = RENEWDATE.Value

RS11.UPDATE

MsgBox ("Book Renewed!")

Else

MsgBox ("No Book Choosen To Renew!")

End If

End Sub

Private Sub RETURN_Click()

RETURNDATE.CheckBox = False

If flag = 1 Then

RS11.Fields(4) = RETURNDATE.Value

RS11.Fields(6) = "YES"

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 89


LIBRARY MANAGEMENT SYSTEM

YES.Value = True

RS11.UPDATE

If MEMTYPE.Text = "STUDENT" Then

If RS31.State = 1 Then RS31.CLOSE

RS31.Open "select * from Student_Details where stud_id='" & MEMID.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS31.Fields(10) = RS31.Fields(10) + 1

RS31.UPDATE

Else

If RS31.State = 1 Then RS31.CLOSE

RS31.Open "select * from Staff_Details where s_id='" & MEMID.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS31.Fields(12) = RS31.Fields(12) + 1

RS31.UPDATE

End If

Else

MsgBox ("No Book Choosen To Return!")

End If

End Sub

FINE (Late Return) FORM

Public RS1 As New ADODB.Recordset

Public RS2 As New ADODB.Recordset

Public RS3 As New ADODB.Recordset

Public RS4 As New ADODB.Recordset

Public RS5 As New ADODB.Recordset

Public RS31 As New ADODB.Recordset

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 90


LIBRARY MANAGEMENT SYSTEM

Dim DD As Integer

Private Sub CLEAR_Click()

BISSUEID.Text = ""

MEMTYPE.Text = "< Please Select >"

MEMID.Text = ""

AMOUNT.Text = ""

PAID.Value = False

NPAID.Value = False

LATE.Enabled = True

End Sub

Private Sub CLOSE_Click()

Unload Me

End Sub

Private Sub Command1_Click()

PAID.Value = False

NPAID.Value = False

If BISSUEID.Text = "" Or MEMTYPE.Text = "< Please Select >" Then

MsgBox ("Book Issue ID & MEMBER TYPE Required!")

Else

If RS1.State = 1 Then RS1.CLOSERS1.Open "SELECT * FROM Book_Issue where


b_issueid='" & BISSUEID.Text & "'", con, adOpenKeyset, adLockOptimistic

If RS1.EOF = False Then

T1 = RS1.Fields(2)

TMP = RS1.Fields(1)

Else

End If

If RS2.State = 1 Then RS2.CLOSE

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 91


LIBRARY MANAGEMENT SYSTEM

RS2.Open "SELECT * FROM Unique_Book_Id where acc_no='" & T1 & "'", con,
adOpenKeyset, adLockOptimistic

If RS2.EOF = False Then

T2 = RS2.Fields(1)

Else

End If

If RS3.State = 1 Then RS3.CLOSE

RS3.Open "SELECT * FROM Stock_Entry where b_id='" & T2 & "'", con, adOpenKeyset,
adLockOptimistic

If RS3.EOF = False Then

If IsNull(RS1.Fields(5)) Then

DD = DateDiff("d", RS1.Fields(3), Now)

AMOUNT.Text = (DD - 14) * 1

Else

DD = DateDiff("d", RS1.Fields(5), Now)

AMOUNT.Text = (DD - 7) * 1

End If

End If

If MEMTYPE.Text = "STAFF" Then

If RS4.State = 1 Then RS4.CLOSE

RS4.Open "SELECT * FROM Staff_Details where s_id='" & TMP & "'", con,
adOpenKeyset, adLockOptimistic

If RS4.EOF = False Then

MEMID.Text = RS4.Fields(1)

Else

End If

Else

If RS4.State = 1 Then RS4.CLOSE

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 92


LIBRARY MANAGEMENT SYSTEM

RS4.Open "SELECT * FROM Student_Details where stud_id='" & TMP & "'", con,
adOpenKeyset, adLockOptimistic

If RS4.EOF = False Then

MEMID.Text = RS4.Fields(1)

Else

End If

End If

If RS5.State = 1 Then RS5.CLOSE

RS5.Open "SELECT * FROM Fine where mem_typeid='" & MEMID.Text & "' and
b_issueid='" & BISSUEID.Text & "'", con, adOpenKeyset, adLockOptimistic

If RS5.EOF = True Then

NPAID.Value = True

Else

PAID.Value = True

End If

If MEMID.Text = "" Then

AMOUNT.Text = ""

PAID.Value = False

NPAID.Value = False

LATE.Enabled = False

MsgBox ("Member Not Found!")

End If

If PAID.Value = True Then

MsgBox ("Fine Already Paid!")

LATE.Enabled = False

End If

End If

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 93


LIBRARY MANAGEMENT SYSTEM

Private Sub Form_Load()

CONNECT

MEMTYPE.AddItem "STAFF"

MEMTYPE.AddItem "STUDENT"

PAID.Value = False

NPAID.Value = False

End Sub

Private Sub LATE_Click()

If MEMTYPE.Text = "STAFF" Then

K = "SF"

Else

K = "ST"

End If

J = Val(Mid(MEMID.Text, 3))

If RS.State = 1 Then RS.CLOSE

RS.Open "SELECT * FROM Fine", con, adOpenKeyset, adLockOptimistic

RS.AddNew

RS.Fields(0) = BISSUEID.Text

RS.Fields(1) = K & J

RS.Fields(2) = AMOUNT.Text

RS.Fields(3) = PAID.Caption

PAID.Value = True

RS.UPDATE

RS1.Fields(4) = Format(Now, "yyyy/mm/dd hh:mm:ss")

RS1.Fields(6) = "YES"

RS1.UPDATE

If MEMTYPE.Text = "STUDENT" Then

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 94


LIBRARY MANAGEMENT SYSTEM

If RS31.State = 1 Then RS31.CLOSE

RS31.Open "select * from Student_Details where stud_id='" & MEMID.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS31.Fields(10) = RS31.Fields(10) + 1

RS31.UPDATE

Else

If RS31.State = 1 Then RS31.CLOSE

RS31.Open "select * from Staff_Details where s_id='" & MEMID.Text & "'", con,
adOpenKeyset, adLockOptimistic

RS31.Fields(12) = RS31.Fields(12) + 1

RS31.UPDATE

End If

MsgBox ("Fine Successfully Paid")

LATE.Enabled = False

End Sub

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 95


LIBRARY MANAGEMENT SYSTEM

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 96


LIBRARY MANAGEMENT SYSTEM

13.BIBLIOGRAPHY

For SQL:

https://www.tutorialspoint.com/sql

For Visual Basic 6.0:

1. https://www.vbtutor.net/vbtutor.html
2. Way to Visual Basic 6.0-By PETER NORTON
3. Experts guide to Visual Basic 6.0-By S FREEZE
4. System Analysis & Design –By AWARD E M

SWAMY SASWATHIKANANDA COLLEGE,POOTHOTTA 97

S-ar putea să vă placă și