Professional Documents
Culture Documents
A Project Report ON Library Management System: Niranjan KC Sagar Kunjyang Tamang Prajwal Bhandari
A Project Report ON Library Management System: Niranjan KC Sagar Kunjyang Tamang Prajwal Bhandari
A Project Report ON Library Management System: Niranjan KC Sagar Kunjyang Tamang Prajwal Bhandari
PROJECT REPORT
ON
By
Niranjan KC
Sagar Kunjyang
Tamang
Prajwal Bhandari
Submitted to:
Min-Bhawan, Kathmandu
August 2019
Table of Contents
1. Introduction.............................................................................................................................1
1.1 Background......................................................................................................................1
1.2 Objectives........................................................................................................................ 1
2. Database Design and Development....................................................................................... 2
2.1 Database Design.............................................................................................................. 2
2.1.1 ER Diagram.............................................................................................................. 2
2.1.2 Schema Design......................................................................................................... 3
2.2 Database Development....................................................................................................3
2.2.1 Entity and Attributes Creation [DDL]...................................................................... 3
2.2.2 Anomalies and Normalization.................................................................................. 6
2.2.3 Integrity Constraint Management.............................................................................6
3. Database Testing....................................................................................................................7
3.1 Entry record in each table................................................................................................7
3.2 Updating, Deletion, Selection Records............................................................................8
3.2.1 Update records..........................................................................................................8
3.2.2 Delete the records..................................................................................................... 9
3.2.3 Selection Records..................................................................................................... 9
4. T-SQL..................................................................................................................................10
4.1 Simple Queries...............................................................................................................10
1........................................................................................................................................... 10
4.2 Subqueries......................................................................................................................10
1........................................................................................................................................... 10
4.3 Join.................................................................................................................................10
4.3.1 Inner join................................................................................................................10
4.3.2 Left join................................................................................................................. 11
4.3.3 Right join............................................................................................................... 11
4.3.4 Full outer join........................................................................................................ 11
5. Conclusion and Knowledge gained..................................................................................... 12
1. Introduction
1.1 Background
A library management system, also known as an automated library system is software that
has been developed to handle basic housekeeping functions of a library. It is an application
refers to other library system and it is suitable to use by small and medium size library. It
helps to provide information on any book present in library to the user as well as staff
member. It keeps a record of book issued, returned and added to library.
Ifbook issued, returned and added, records are carried out manually will be tedious and
includes chances of mistakes. These errors are avoided by allowing the system to keep track
of information such as issue date, last date to return the book and even fine information and
thus there is no need to keep manual track of this information which thereby avoids chances
of mistakes. Thus this system reduces manual work to a great extent which allows smooth
flow of library activities by removing chances of errors in the details.
1.2 Objectives
To eliminate the paper work in library.
To record every transection in computer system.
To design a user friendly graphical user interface which suit the user.
To save the cost and time.
To allow user to reserve book online.
Page 1 of 14
2. Database Design and Development
Fig:ER-diagram
Here, the figure shows the er diagram which shows the relationship between the entities.
Primary key:
Book_id
Publisher_id
member_id
Page 2 of 14
2.1.2 Schema Design
Book Publisher
Book_id M 1 Publisher_id
Book_name Book_id
Publisher_id
M M
Publish_by
Book_id
Publisher_id
Return_by
issued_date
member_id
Issued to Members
member_id M member_id
book_id member_name
issued_date member_type
Page 3 of 14
Rename:use to modify table name
Truncate: use to delete data from table
Entities and their Attributes are:
Member
member_id
member_name
member_type]
Book
book _id
book _name
Publisher
publisher_id
publisher_name
Book_publisher
book_id
publisher_id
Book_issued
member_id
book_id
issued_date
Book_return
member_id
book_id
return _date
Page 4 of 14
Creating Tables
Page 5 of 14
--create table for book_issued
Page 6 of 14
Example:
create table book
(
book_idintnotnull,
book_namevarchar(255)notnull,
primary key(book_id),
);
Referential Integrity
create table book_issued
(
member_idint,
book_idint,
issued_date date,
foreign key(member_id) references member,
foreign key(book_id) references book,
);
3. Database Testing
To test database,we have used DML commands like insert,delete,update and select.Using
these commands we hav prepare queries and tested it.
Page 8 of 14
3.2.2 Delete the records
1. Delete the record of DBMS published by Jonny Sins.
Delete from book_publisher where book_id=101 and publisher_id=11;
2. Delete record where member_id=1 does not borrow the book_id= 103.
Delete from book_issued where member_id =1 and book_id=103;
Page 9 of 14
4. T-SQL
4.1 Simple Queries
1. Find the members who are student.
select member_name from member where member_type='s';
4.2 Subqueries
1. Find the book borrowed by most of the student.
select b.book_name from book as b where b.book_id =(selecttop 1 book_id
from book_issued as bi groupby bi.book_id orderbyCOUNT(bi.book_id));
4.3 Join
4.3.1 Inner join
select book.book_name ,publisher.publisher_name from ((book innerjoin
book_publisher on book.book_id = book_publisher.book_id )innerjoin
publisher on book_publisher.publisher_id = publisher.publisher_id);
Page 10 of 14
4.3.2 Left join
select book.book_name ,publisher.publisher_name from ((book leftjoin
book_publisher on book.book_id = book_publisher.book_id )leftjoin publisher
on book_publisher.publisher_id = publisher.publisher_id);
Page 11 of 14
5. Conclusion and Knowledge gained
A library management system is software that keeps the complete records of the book
available in the library, book issued to whom and when, book returned date, new book added
to the library. We conclude that this system reduces manual work to a great extent which
allows smooth flow of library activities by removing chances of errors in the details.
We come to know about the importance of database design in library management system as
database design simplifies all the system and process in library management. Similarly, we
know about the way of solving data redundancy and inconsistency problem with the help of
database design. We gained knowledge about the importance of data integrity and how it can
be maintained in our management system with the help of database management system.
Database design helps us to store and retrieve the data in library management system so that
we can know who and when the book has been handover. Therefore, we can prepare our
library management system with the help of database design as it helps to achieve our
objectives i.e. to keep proper records of the library activities.So,with the help of these
management system we can easily find out the details of thebooks we need from the library.
Page 12 of 14