SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
K L UNIVERSITY
Green Fields, Vaddeswaram
Department of Computer science and Engineering
2016
DATABASE SYSTEMS
Library Management System
Submitted by
Faculty K.Chakitha-150030458
Bhupesh Deka S.V.Rohith-150031000
section-10, batch-24
CERTIFICATE
This is to certify that the Project entitled “Library Management
System”, being submitted by K.Chakitha-150030458, S.V.Rohith-150031000
in partial fulfillment for the award of degree of Bachelor of Technology in
Computer science Engineering is a record of detailed work carried out under the
guidance, during the academic year 2017 and it has been found worthy of
acceptance according to the requirements of the university.
Faculty In charge
Bhupesh Deka
ACKNOWLEDGEMENTS
We are very much thankful to our loving Parents and
Faculty for their care and responsibility in helping us to achieve this work done.
We are also greatly indebted to our KLUniversity that has provided a healthy
environment to drive us to achieve our ambitions and goals.
Place: KLU
Date: 11/04/2017
TABLE OF CONTENTS
Content Pg. No
1 Introduction 1
2 Data types 2
3 Data Requirements
 Entities
 Attributes
 Relationships - cardinality
3
4 Entity Relationship Diagram 5
5 Schema Diagram 6
6 Creating database using MySQL 7
7 Test-case Queries
8 Conclusion
9 References
1. INTRODUCTION
A library is a collection of organized information and
resources which is made accessible to a well-defined community for borrowing
or reference sake. The collection of the resources and information are provided
in digital or physical format in either a building/room or in a virtual space or
even both. Library’s resources and collections may include newspapers, books,
films, prints, maps, CDs, tapes, videotapes, microform, database etc. The main
aim of this system is to develop a new programmed system that will conveying
ever lasting solution to the manual base operations and to make available a
channel through which staff can maintain the record easily and customers can
access the information about the library at whatever place they might find
themselves.
Library Management System allows the user to store the book details and the
customer details. The system is strong enough to withstand regressive yearly
operations under conditions where the database is maintained and cleared over a
certain time of span. The implementation of the system in the organization will
considerably reduce data entry, time and also provide readily calculated reports.
OBJECTIVE: - It keeps track of all the information about the books in the
library, their cost, status and total number of books available in the Library. The
user will find it easy in this automated system rather than using the manual
writing system. The system contains a database where all the information will
be stored safely.
2. Data types and its description
1. Integer: one optional sign character (+ or -) followed by at least one digit
(0-9). Leading and trailing blanks are ignored. No other character is
allowed.
2. Varchar: It is used to store alpha numeric characters. In this data type
we can set the maximum number of characters up to 8000 ranges by
defaults SQL server will set the size to 50 characters range.
3. Date: The DATE data type accepts date values. No parameters are
required when declaring a DATE data type. Date values should be
specified in the form: YYYY-MM-DD. However, Point Base will also
accept single digits entries for month and day values.
4. Time: The TIME data type accepts time values. No parameters are
required when declaring a TIME data type. Date values should be
specified in the form: HH:MM: SS. An optional fractional value can be
used to represent nanoseconds.
3. Data Requirements
Entities
 BRANCH
 EMPLOYEE
 CUSTOMER
 ISSUE STATUS
 RETURN STATUS
 BOOKS
Attributes
 BRANCH
 Manager_id
 Branch_id
 Address
 Contact_no
 Branch_h_no
 Street
 City
 State
 Zipcode
 CUSTOMER
 Customer_id
 Books_issued
 Name
 Address
 Registration_date
 ISSUE STATUS
 Issue_book_name
 Issue_id
 Issue_date
 ISBN
 Customer_id
 RETURN STATUS
 Return_id
 Return_date
 Customer_id
 Return_book_name
 ISBN
 BOOKS
 ISBN
 Title
 Category
 Rental_price
 Author
 Publisher
 Status
RELATIONSHIPS - CARDINALITY
 MANAGER manages the BRANCH (1 - N)
 CUSTOMER registers in the respective BRANCH (N – 1)
 CUSTOMER issues BOOKS (1 – N)
 CUSTOMER returns BOOKS (N – 1)
 EMPLOYEE updates BOOKS (N – N)
4. Entity-Relationship-DIAGRAM
Entity Relationship Diagram is used in modern database software engineering to
illustrate logical structure of database. It is a relational schema database
modelling method used to Model a system and approach. This approach
commonly used in database design. The diagram created using this method is
called ER-diagram.
The ER-diagram depicts the various relationships among entities, considering
each object as entity. Entity is represented as rectangle shape and relationship
represented as diamond shape. It depicts the relationship between data object.
The ER-diagram is the notation that is used to conduct the data modelling
activity.
5. SCHEMA DIAGRAM
A schema is the structure behind data organization. It is a visual representation
of how different table relationships enable the schema’s underlying mission
business rules for which the database is created. Database schema defines its
entities and the relationship among them.
It contains a descriptive detail of the database, which can be depicted by means
of schema diagrams. It's the database designers who design the schema to help
programmers understand the database and make it useful.
Schema diagrams have an important function because they force database
developers to transpose ideas to paper. This provides an overview of the entire
database, while facilitating future database administrator work.
6. CREATING DATABASE USING MYSQL
mysql> create database libproject;
mysql> use libproject;
Database changed
mysql> CREATE TABLE BOOKS(ISBN int(100) not null,book_title
varchar(50) not null,category varchar(50) not null,rental_price int(10) not
null,status varchar(50),author varchar(50) not null,publisher varchar(50) not
null,primary key(ISBN)) ;
Query OK, 0 rows affected (1.44 sec)
mysql> CREATE TABLE EMPLOYEE(employ_id int(10) not
null,employ_name varchar(50) not null,position varchar(30) not null,salary
int(10) not null,primary key(employ_id));
Query OK, 0 rows affected (0.35 sec)
mysql> create table customer(customer_id int(10) not null,customer_name
varchar(50),customer_address varchar(100) not null,registration_date date not
null,primary key(customer_id));
Query OK, 0 rows affected (0.38 sec)
mysql> create table brach(branch_no int(10) not null,manager_id int(10) not
null,branch_address varchar(100) not null,contact_no int(10) not null,primary
key(branch_no));
Query OK, 0 rows affected (0.49 sec)
mysql> create table issue_status(issue_id int(10) not null,issued_cust int(10) not
null,issued_book_name varchar(50) not null,issue_date date not null,isbn_book
int(10) not null,primary key(issue_id),constraint foreign key(isbn_book)
references BOOKS(ISBN),constraint foreign key(issued_cust) references
customer(customer_id));
Query OK, 0 rows affected (0.66 sec)
mysql> alter table brach rename branch;
Query OK, 0 rows affected (0.50 sec)
mysql> create table return_status(return_id int(10) not null,return_cust int(10)
not null,returned_book_name varchar(50) not null,return_date date not
null,isbn_book2 int(10) not null,primary key(return_id),constraint foreign
key(isbn_book2) references BOOKS(ISBN),constraint foreign key(return_cust)
references issue_status(issued_cust));
Query OK, 0 rows affected (0.39 sec)
mysql> insert into books
values(1000,'book1','comedy',5,'available','author1','pub1');
Query OK, 1 row affected (0.18 sec)
mysql> insert into books
values(1001,'book2','scifi',3,'available','author2','pub2');
Query OK, 1 row affected (0.08 sec)
mysql> insert into books values(1003,'book3','romance',1,'un-
available','author3','pub3');
Query OK, 1 row affected (0.06 sec)
mysql> insert into books
values(1004,'book4','thriller',7,'available','author4','pub4');
Query OK, 1 row affected (0.07 sec)
mysql> alter table branch add constraint foreign key(manager_id) references
employee(employ_id);
Query OK, 0 rows affected (1.20 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> insert into employee values(991,'emp1','manager',30000);
Query OK, 1 row affected (0.06 sec)
mysql> insert into employee values(992,'emp2','worker',10000);
Query OK, 1 row affected (0.07 sec)
mysql> insert into employee values(993,'emp3','worker',10000);
Query OK, 1 row affected (0.05 sec)
mysql> insert into employee values(994,'emp4','reader',20000);
Query OK, 1 row affected (0.07 sec)
mysql> insert into employee values(995,'emp5','assist',20000);
Query OK, 1 row affected (0.07 sec)
mysql> insert into branch values(1,991,'branch_addr1',987654321);
Query OK, 1 row affected (0.07 sec)
mysql> insert into branch values(3,993,'branch_addr3',987654323);
Query OK, 1 row affected (0.09 sec)
mysql> insert into customer values(11,'cus1','hom1','2008:10:10');
Query OK, 1 row affected (0.07 sec)
mysql> insert into customer values(12,'cus2','hom2','2008:03:03');
Query OK, 1 row affected (0.09 sec)
mysql> insert into customer values(13,'cus3','hom3','2009:03:03');
Query OK, 1 row affected (0.07 sec)
mysql> insert into customer values(14,'cus4','hom4','2009:04:04');
Query OK, 1 row affected (0.06 sec)
mysql> insert into issue_status values(51,12,'book1','2010:01:01',1001);
Query OK, 1 row affected (0.08 sec)
mysql> insert into issue_status values(52,14,'book4','2010:01:01',1004);
Query OK, 1 row affected (0.06 sec)
mysql> insert into return_status values(61,12,'book1','2010:10:01',1001);
Query OK, 1 row affected (0.08 sec)
mysql> insert into return_status values(62,13,'book1','2010:10:01',1001);
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint
fails (`libproject`.`return_status`, CONSTRAINT `return_status_ibfk_2`
FOREIGN KEY (`return_cust`) REFERENCES `issue_status` (`issued_cust`))
Since customer id-13 isn’t taken any book, we cannot
blindly give the input!!
7. TEST QUERIES
1. Display the customer name who took the book of type comedy.
Mysql>select customer_name from customer where
book_type=’comedy’;
2. Display issue id ,issued customer name whose ibsn book
number is 1004.
Mysql>select issue_id , issued_cust from issue_status where
isbn_book=1004;
3. Display all contents in issue status table where isbn book of
issue table and return table are equal.
Mysql>select p.* from issue_status p, return_status r where
p.isbn_book=r.isbn_book2;
4. Add a column called book type in customer table.
Mysql>alter table customer add book_type varchar(10) not null;
Query ok,4 rows affected(0.37sec)
Records:4 Duplicates:0 Warnings:0
Mysql>describe customer;
8. CONCLUSION
• SQL database management application which is very well used in the
modern world in organising and manipulating a database.
• Though SQL doesn’t have the GUI interface like Microsoft access is
having and they all manage the database comfortable.
• Depending on the user or users, if an organisation has multiple users then
they should go for SQL server based application.
• This project shows how to create tables in SQL and how to create simple
data manipulation language and data definition language with how to
execute them.
• It also shows how relationships are established with the concepts of
primary and foreign key within a table.
• Lastly, the project shows how queries are created in SQL server, queries
like the create command, view, update, alter etc.
9. REFERENCES
 http://people.cs.pitt.edu/~chang/156/03ERmodel.html
 http://www.academia.edu/13780884/Database_system_for_library_man
agement_system
 https://lbsitbytes2010.wordpress.com/2013/09/21/er-diagram-of-
library-management-rno15s5cs2/
 https://www.slideshare.net/fiu025/library-management-
32343393?next_slideshow=1
 http://www.c-sharpcorner.com/UploadFile/ea3ed6/database-design-for-
library-management-system/
 http://stackoverflow.com/questions/17641134/what-is-different-
between-er-diagram-and-database-schema
A mini project on designing a DATABASE for Library management system using mySQL

Weitere ähnliche Inhalte

Was ist angesagt?

Library mangement system project srs documentation.doc
Library mangement system project srs documentation.docLibrary mangement system project srs documentation.doc
Library mangement system project srs documentation.doc
jimmykhan
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system project
Himani Chopra
 
Library management system
Library management systemLibrary management system
Library management system
ashu6
 

Was ist angesagt? (20)

Pharmacy management system project report
Pharmacy management system project reportPharmacy management system project report
Pharmacy management system project report
 
Railway management system, database mini project
Railway management system, database mini projectRailway management system, database mini project
Railway management system, database mini project
 
Banking Management System Project
Banking Management System ProjectBanking Management System Project
Banking Management System Project
 
SRS for Hospital Management System
SRS for Hospital Management SystemSRS for Hospital Management System
SRS for Hospital Management System
 
Software Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management SystemSoftware Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management System
 
College admission system
College admission system College admission system
College admission system
 
Library Management System Project Report
Library Management System Project Report Library Management System Project Report
Library Management System Project Report
 
College Web Site HTML PROJECT
College Web Site HTML PROJECTCollege Web Site HTML PROJECT
College Web Site HTML PROJECT
 
Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"
 
Attendance management system project report.
Attendance management system project report.Attendance management system project report.
Attendance management system project report.
 
Library mangement system project srs documentation.doc
Library mangement system project srs documentation.docLibrary mangement system project srs documentation.doc
Library mangement system project srs documentation.doc
 
Library management system presentation
Library management system presentation Library management system presentation
Library management system presentation
 
Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)
 
PATIENT MANAGEMENT SYSTEM project
PATIENT MANAGEMENT SYSTEM projectPATIENT MANAGEMENT SYSTEM project
PATIENT MANAGEMENT SYSTEM project
 
Hospital management system project
Hospital management system projectHospital management system project
Hospital management system project
 
Online Voting System Project File
Online Voting System Project FileOnline Voting System Project File
Online Voting System Project File
 
Student management system
Student management systemStudent management system
Student management system
 
Java questions for viva
Java questions for vivaJava questions for viva
Java questions for viva
 
Software Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management systemSoftware Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management system
 
Library management system
Library management systemLibrary management system
Library management system
 

Andere mochten auch (7)

A database design_report_for_college_library final
A database design_report_for_college_library finalA database design_report_for_college_library final
A database design_report_for_college_library final
 
Online Book Reading and Virtual Library Management System
Online Book Reading and Virtual Library Management SystemOnline Book Reading and Virtual Library Management System
Online Book Reading and Virtual Library Management System
 
Top down approach
Top down approachTop down approach
Top down approach
 
Library Management system Database queries
Library Management system Database queriesLibrary Management system Database queries
Library Management system Database queries
 
Entity Relationship Diagram of Library System
Entity Relationship Diagram of Library SystemEntity Relationship Diagram of Library System
Entity Relationship Diagram of Library System
 
Student management system
Student management systemStudent management system
Student management system
 
Student database management system
Student database management systemStudent database management system
Student database management system
 

Ähnlich wie A mini project on designing a DATABASE for Library management system using mySQL

Ähnlich wie A mini project on designing a DATABASE for Library management system using mySQL (20)

At the core you will have KUSTO
At the core you will have KUSTOAt the core you will have KUSTO
At the core you will have KUSTO
 
MYSQL-Database
MYSQL-DatabaseMYSQL-Database
MYSQL-Database
 
Brief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehBrief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas mosleh
 
SSAS Tabular model importance and uses
SSAS  Tabular model importance and usesSSAS  Tabular model importance and uses
SSAS Tabular model importance and uses
 
Cassandra Data Modelling
Cassandra Data ModellingCassandra Data Modelling
Cassandra Data Modelling
 
qwe.ppt
qwe.pptqwe.ppt
qwe.ppt
 
Lecture 15 - MySQL- PHP 1.ppt
Lecture 15 - MySQL- PHP 1.pptLecture 15 - MySQL- PHP 1.ppt
Lecture 15 - MySQL- PHP 1.ppt
 
Data Mining Presentation on Science Day 2023
Data Mining Presentation on Science Day 2023Data Mining Presentation on Science Day 2023
Data Mining Presentation on Science Day 2023
 
Structured Query Language (SQL) _ Edu4Sure Training.pptx
Structured Query Language (SQL) _ Edu4Sure Training.pptxStructured Query Language (SQL) _ Edu4Sure Training.pptx
Structured Query Language (SQL) _ Edu4Sure Training.pptx
 
Library management system project
Library management system projectLibrary management system project
Library management system project
 
Cassandra data modelling best practices
Cassandra data modelling best practicesCassandra data modelling best practices
Cassandra data modelling best practices
 
Librarymanagement 140315062611-phpapp02
Librarymanagement 140315062611-phpapp02Librarymanagement 140315062611-phpapp02
Librarymanagement 140315062611-phpapp02
 
Librarymanagement 140315062611-phpapp02
Librarymanagement 140315062611-phpapp02Librarymanagement 140315062611-phpapp02
Librarymanagement 140315062611-phpapp02
 
Mi0034 database management system
Mi0034 database management systemMi0034 database management system
Mi0034 database management system
 
KCS-501-3.pdf
KCS-501-3.pdfKCS-501-3.pdf
KCS-501-3.pdf
 
SQL cheat sheet.pdf
SQL cheat sheet.pdfSQL cheat sheet.pdf
SQL cheat sheet.pdf
 
Enabling SQL Access to Data Lakes
Enabling SQL Access to Data LakesEnabling SQL Access to Data Lakes
Enabling SQL Access to Data Lakes
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
Indic threads pune12-nosql now and path ahead
Indic threads pune12-nosql now and path aheadIndic threads pune12-nosql now and path ahead
Indic threads pune12-nosql now and path ahead
 
Presentation1
Presentation1Presentation1
Presentation1
 

Mehr von svrohith 9

10_CERITIFICATE
10_CERITIFICATE10_CERITIFICATE
10_CERITIFICATE
svrohith 9
 

Mehr von svrohith 9 (15)

Simple Blockchain Eco System for medical data management
Simple Blockchain Eco System for medical data managementSimple Blockchain Eco System for medical data management
Simple Blockchain Eco System for medical data management
 
A Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shiftersA Computers Architecture project on Barrel shifters
A Computers Architecture project on Barrel shifters
 
A JAVA project on Marriage bureau management system
A JAVA project on Marriage bureau management systemA JAVA project on Marriage bureau management system
A JAVA project on Marriage bureau management system
 
A Measurements Project on Light Detection sensor
A Measurements Project on Light Detection sensorA Measurements Project on Light Detection sensor
A Measurements Project on Light Detection sensor
 
A Software Engineering Project on Cyber cafe management
A Software Engineering Project on Cyber cafe managementA Software Engineering Project on Cyber cafe management
A Software Engineering Project on Cyber cafe management
 
A project on Ecology case studies
A project on Ecology case studiesA project on Ecology case studies
A project on Ecology case studies
 
A project on advanced C language
A project on advanced C languageA project on advanced C language
A project on advanced C language
 
A MATLAB project on LCR circuits
A MATLAB project on LCR circuitsA MATLAB project on LCR circuits
A MATLAB project on LCR circuits
 
10_CERITIFICATE
10_CERITIFICATE10_CERITIFICATE
10_CERITIFICATE
 
Pedal power hacksaw
Pedal power hacksawPedal power hacksaw
Pedal power hacksaw
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
The taipei 101 tower
The taipei 101 towerThe taipei 101 tower
The taipei 101 tower
 
Mac book
Mac bookMac book
Mac book
 
Apple i phone presentation
Apple i phone presentationApple i phone presentation
Apple i phone presentation
 

Kürzlich hochgeladen

Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
soniya singh
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
TusharBahuguna2
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
aroranaina404
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
anilsa9823
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptx
jeswinjees
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
amitlee9823
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
tbatkhuu1
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
tbatkhuu1
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
amitlee9823
 

Kürzlich hochgeladen (20)

Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
 
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptx
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
 
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Jigani Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
 

A mini project on designing a DATABASE for Library management system using mySQL

  • 1. K L UNIVERSITY Green Fields, Vaddeswaram Department of Computer science and Engineering 2016 DATABASE SYSTEMS Library Management System Submitted by Faculty K.Chakitha-150030458 Bhupesh Deka S.V.Rohith-150031000 section-10, batch-24
  • 2. CERTIFICATE This is to certify that the Project entitled “Library Management System”, being submitted by K.Chakitha-150030458, S.V.Rohith-150031000 in partial fulfillment for the award of degree of Bachelor of Technology in Computer science Engineering is a record of detailed work carried out under the guidance, during the academic year 2017 and it has been found worthy of acceptance according to the requirements of the university. Faculty In charge Bhupesh Deka
  • 3. ACKNOWLEDGEMENTS We are very much thankful to our loving Parents and Faculty for their care and responsibility in helping us to achieve this work done. We are also greatly indebted to our KLUniversity that has provided a healthy environment to drive us to achieve our ambitions and goals. Place: KLU Date: 11/04/2017
  • 4. TABLE OF CONTENTS Content Pg. No 1 Introduction 1 2 Data types 2 3 Data Requirements  Entities  Attributes  Relationships - cardinality 3 4 Entity Relationship Diagram 5 5 Schema Diagram 6 6 Creating database using MySQL 7 7 Test-case Queries 8 Conclusion 9 References
  • 5. 1. INTRODUCTION A library is a collection of organized information and resources which is made accessible to a well-defined community for borrowing or reference sake. The collection of the resources and information are provided in digital or physical format in either a building/room or in a virtual space or even both. Library’s resources and collections may include newspapers, books, films, prints, maps, CDs, tapes, videotapes, microform, database etc. The main aim of this system is to develop a new programmed system that will conveying ever lasting solution to the manual base operations and to make available a channel through which staff can maintain the record easily and customers can access the information about the library at whatever place they might find themselves. Library Management System allows the user to store the book details and the customer details. The system is strong enough to withstand regressive yearly operations under conditions where the database is maintained and cleared over a certain time of span. The implementation of the system in the organization will considerably reduce data entry, time and also provide readily calculated reports. OBJECTIVE: - It keeps track of all the information about the books in the library, their cost, status and total number of books available in the Library. The user will find it easy in this automated system rather than using the manual writing system. The system contains a database where all the information will be stored safely.
  • 6. 2. Data types and its description 1. Integer: one optional sign character (+ or -) followed by at least one digit (0-9). Leading and trailing blanks are ignored. No other character is allowed. 2. Varchar: It is used to store alpha numeric characters. In this data type we can set the maximum number of characters up to 8000 ranges by defaults SQL server will set the size to 50 characters range. 3. Date: The DATE data type accepts date values. No parameters are required when declaring a DATE data type. Date values should be specified in the form: YYYY-MM-DD. However, Point Base will also accept single digits entries for month and day values. 4. Time: The TIME data type accepts time values. No parameters are required when declaring a TIME data type. Date values should be specified in the form: HH:MM: SS. An optional fractional value can be used to represent nanoseconds.
  • 7. 3. Data Requirements Entities  BRANCH  EMPLOYEE  CUSTOMER  ISSUE STATUS  RETURN STATUS  BOOKS Attributes  BRANCH  Manager_id  Branch_id  Address  Contact_no  Branch_h_no  Street  City  State  Zipcode  CUSTOMER  Customer_id  Books_issued  Name  Address  Registration_date  ISSUE STATUS  Issue_book_name  Issue_id  Issue_date  ISBN  Customer_id  RETURN STATUS  Return_id  Return_date
  • 8.  Customer_id  Return_book_name  ISBN  BOOKS  ISBN  Title  Category  Rental_price  Author  Publisher  Status RELATIONSHIPS - CARDINALITY  MANAGER manages the BRANCH (1 - N)  CUSTOMER registers in the respective BRANCH (N – 1)  CUSTOMER issues BOOKS (1 – N)  CUSTOMER returns BOOKS (N – 1)  EMPLOYEE updates BOOKS (N – N)
  • 9. 4. Entity-Relationship-DIAGRAM Entity Relationship Diagram is used in modern database software engineering to illustrate logical structure of database. It is a relational schema database modelling method used to Model a system and approach. This approach commonly used in database design. The diagram created using this method is called ER-diagram. The ER-diagram depicts the various relationships among entities, considering each object as entity. Entity is represented as rectangle shape and relationship represented as diamond shape. It depicts the relationship between data object. The ER-diagram is the notation that is used to conduct the data modelling activity.
  • 10. 5. SCHEMA DIAGRAM A schema is the structure behind data organization. It is a visual representation of how different table relationships enable the schema’s underlying mission business rules for which the database is created. Database schema defines its entities and the relationship among them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It's the database designers who design the schema to help programmers understand the database and make it useful. Schema diagrams have an important function because they force database developers to transpose ideas to paper. This provides an overview of the entire database, while facilitating future database administrator work.
  • 11. 6. CREATING DATABASE USING MYSQL mysql> create database libproject; mysql> use libproject; Database changed mysql> CREATE TABLE BOOKS(ISBN int(100) not null,book_title varchar(50) not null,category varchar(50) not null,rental_price int(10) not null,status varchar(50),author varchar(50) not null,publisher varchar(50) not null,primary key(ISBN)) ; Query OK, 0 rows affected (1.44 sec) mysql> CREATE TABLE EMPLOYEE(employ_id int(10) not null,employ_name varchar(50) not null,position varchar(30) not null,salary int(10) not null,primary key(employ_id)); Query OK, 0 rows affected (0.35 sec) mysql> create table customer(customer_id int(10) not null,customer_name varchar(50),customer_address varchar(100) not null,registration_date date not null,primary key(customer_id)); Query OK, 0 rows affected (0.38 sec) mysql> create table brach(branch_no int(10) not null,manager_id int(10) not null,branch_address varchar(100) not null,contact_no int(10) not null,primary key(branch_no)); Query OK, 0 rows affected (0.49 sec) mysql> create table issue_status(issue_id int(10) not null,issued_cust int(10) not null,issued_book_name varchar(50) not null,issue_date date not null,isbn_book int(10) not null,primary key(issue_id),constraint foreign key(isbn_book) references BOOKS(ISBN),constraint foreign key(issued_cust) references customer(customer_id)); Query OK, 0 rows affected (0.66 sec) mysql> alter table brach rename branch;
  • 12. Query OK, 0 rows affected (0.50 sec) mysql> create table return_status(return_id int(10) not null,return_cust int(10) not null,returned_book_name varchar(50) not null,return_date date not null,isbn_book2 int(10) not null,primary key(return_id),constraint foreign key(isbn_book2) references BOOKS(ISBN),constraint foreign key(return_cust) references issue_status(issued_cust)); Query OK, 0 rows affected (0.39 sec)
  • 13.
  • 14. mysql> insert into books values(1000,'book1','comedy',5,'available','author1','pub1'); Query OK, 1 row affected (0.18 sec) mysql> insert into books values(1001,'book2','scifi',3,'available','author2','pub2'); Query OK, 1 row affected (0.08 sec) mysql> insert into books values(1003,'book3','romance',1,'un- available','author3','pub3'); Query OK, 1 row affected (0.06 sec) mysql> insert into books values(1004,'book4','thriller',7,'available','author4','pub4'); Query OK, 1 row affected (0.07 sec)
  • 15. mysql> alter table branch add constraint foreign key(manager_id) references employee(employ_id); Query OK, 0 rows affected (1.20 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> insert into employee values(991,'emp1','manager',30000); Query OK, 1 row affected (0.06 sec) mysql> insert into employee values(992,'emp2','worker',10000); Query OK, 1 row affected (0.07 sec) mysql> insert into employee values(993,'emp3','worker',10000); Query OK, 1 row affected (0.05 sec) mysql> insert into employee values(994,'emp4','reader',20000); Query OK, 1 row affected (0.07 sec) mysql> insert into employee values(995,'emp5','assist',20000); Query OK, 1 row affected (0.07 sec)
  • 16. mysql> insert into branch values(1,991,'branch_addr1',987654321); Query OK, 1 row affected (0.07 sec) mysql> insert into branch values(3,993,'branch_addr3',987654323); Query OK, 1 row affected (0.09 sec) mysql> insert into customer values(11,'cus1','hom1','2008:10:10'); Query OK, 1 row affected (0.07 sec) mysql> insert into customer values(12,'cus2','hom2','2008:03:03'); Query OK, 1 row affected (0.09 sec) mysql> insert into customer values(13,'cus3','hom3','2009:03:03'); Query OK, 1 row affected (0.07 sec) mysql> insert into customer values(14,'cus4','hom4','2009:04:04'); Query OK, 1 row affected (0.06 sec) mysql> insert into issue_status values(51,12,'book1','2010:01:01',1001);
  • 17. Query OK, 1 row affected (0.08 sec) mysql> insert into issue_status values(52,14,'book4','2010:01:01',1004); Query OK, 1 row affected (0.06 sec) mysql> insert into return_status values(61,12,'book1','2010:10:01',1001); Query OK, 1 row affected (0.08 sec) mysql> insert into return_status values(62,13,'book1','2010:10:01',1001); ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`libproject`.`return_status`, CONSTRAINT `return_status_ibfk_2` FOREIGN KEY (`return_cust`) REFERENCES `issue_status` (`issued_cust`)) Since customer id-13 isn’t taken any book, we cannot blindly give the input!!
  • 18. 7. TEST QUERIES 1. Display the customer name who took the book of type comedy. Mysql>select customer_name from customer where book_type=’comedy’; 2. Display issue id ,issued customer name whose ibsn book number is 1004. Mysql>select issue_id , issued_cust from issue_status where isbn_book=1004; 3. Display all contents in issue status table where isbn book of issue table and return table are equal. Mysql>select p.* from issue_status p, return_status r where p.isbn_book=r.isbn_book2;
  • 19. 4. Add a column called book type in customer table. Mysql>alter table customer add book_type varchar(10) not null; Query ok,4 rows affected(0.37sec) Records:4 Duplicates:0 Warnings:0 Mysql>describe customer;
  • 20. 8. CONCLUSION • SQL database management application which is very well used in the modern world in organising and manipulating a database. • Though SQL doesn’t have the GUI interface like Microsoft access is having and they all manage the database comfortable. • Depending on the user or users, if an organisation has multiple users then they should go for SQL server based application. • This project shows how to create tables in SQL and how to create simple data manipulation language and data definition language with how to execute them.
  • 21. • It also shows how relationships are established with the concepts of primary and foreign key within a table. • Lastly, the project shows how queries are created in SQL server, queries like the create command, view, update, alter etc. 9. REFERENCES  http://people.cs.pitt.edu/~chang/156/03ERmodel.html  http://www.academia.edu/13780884/Database_system_for_library_man agement_system  https://lbsitbytes2010.wordpress.com/2013/09/21/er-diagram-of- library-management-rno15s5cs2/  https://www.slideshare.net/fiu025/library-management- 32343393?next_slideshow=1  http://www.c-sharpcorner.com/UploadFile/ea3ed6/database-design-for- library-management-system/  http://stackoverflow.com/questions/17641134/what-is-different- between-er-diagram-and-database-schema