Docsity

Library Management System Project (Report), Study Guides, Projects, Research of Database Programming

Partial preview of the text

Download Library Management System Project (Report) and more Study Guides, Projects, Research Database Programming in PDF only on Docsity!

DATABASE SYSTEMS

Library Management System

Project Advisor :

Prof. Tanveer Ahmad

Project Members :

Roshaan Malik (0007)

Abu Bakar (0009)

Muhammad Arqam (0013)

BS(CS)

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 University of

Central Punjab (UCP) that has provided a healthy environment to drive us to

achieve our ambitions and goals.

Place: UCP

Date: 12/06/

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.

Data Types and its Description

i. 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.

ii. 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.

  1. Data Requirements

i. Entities

▲ BOOK ▲ STUDENT ▲ DEPARTMENT ▲ LIBRARIAN ▲ ISSUES STATUS ▲ RETURN STATUS

ii. Attributes

▲ BOOK

  • Book_ID
  • Book_Name
  • Book_Author
  • Book_Edition
  • ISBM

▲ STUDENT

  • (^) STD_ID
  • STD_Name
  • STD_Gender
  • STD_Phone
  • STD_Address
  • STD_City
  • STD_State

▲ DEPARTMENT

  • DEP_ID
  • (^) DEP_Name
  • STD_ID

▲ LIBRARIAN

  • LIB_ID
  • LIB_Name
  • LIB_Gender
  • LIB_Phone
  • LIB_Address
  • LIB_City
  • (^) LIB_State

▲ ISSUES STATUS

  • Issue_ID
  • Book_ID
  • Issue_Date
  • Expiry_Date

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.

  1. 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.

Insert Query

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (1125, 'Data Structures and Algorithm Analysis', 'Clifford ' ,'3rd edition', '1-01-502772-5');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (2654, 'Introduction to Financial Accounting', 'Horngren' ,'9th edition', '1-85-157215-5');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (7485, 'Computer Architecture', 'Hennessy and Patterson' ,'4th edition', '1-01-252482-5');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (8666, 'Fundamentals of Database Systems', 'Ramez Elmasri' ,'6th edition', '1-91-245872-5');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (6463, 'Differential Equations', 'Richard Bronson' ,'3rd edition', '1-01-552854-6');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (2855, 'Human Communication', 'Judy C. Pearson' ,'4th edition', '1-01-525482-5');

INSERT INTO BOOK (Book_ID, Book_Name, Book_Author, Book_Edition ,ISBM) VALUES (1585, 'Fundamentals of Logic Design', 'Clifford' ,'5th edition', '1-01-502772-5');

Records

ii. SECOND TABLE IS STUDENT

Create Table STUDENT ( STD_ID int NOT NULL PRIMARY KEY, STD_Name varchar(50), STD_Gender varchar(10), );

Design view

Insert Query

INSERT INTO STUDENT (STD_ID, STD_Name, STD_Gender) VALUES (0003, 'Sheheryar', 'Male');

INSERT INTO STUDENT (STD_ID, STD_Name, STD_Gender) VALUES (0006, 'Daniyal', 'Male');

STD_ID int FOREIGN KEY REFERENCES STUDENT(STD_ID), STD_Address varchar(50), STD_City varchar(30), STD_State varchar(30), STD_Phone varchar(11) );

Design view

STD_ID is the Foreign Key in STUDENT Table

Insert Query

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (3, 'Sialkot', 'Lahore' ,'Punjab' , '03027755655');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (6, 'Sialkot', 'Sialkot' ,'Punjab' , '03005575455');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (7, 'Sialkot', 'Sialkot' ,'Punjab' , '03056454685');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (8, 'Sialkot', 'Karachi' ,'Punjab' , '03205454475');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (9, 'Sialkot', 'Sialkot' ,'Punjab' , '03565284245');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (12, 'Sialkot', 'Sialkot' ,'Punjab' , '04217442455');

INSERT INTO STUDENT_DETAIL (STD_ID, STD_Address, STD_City, STD_State ,STD_Phone) VALUES (13, 'Sialkot', 'Sialkot' ,'Punjab' , '03027755655');

Records

iv. FORTH TABLE IS DEPARTMENT

Create Table DEPARTMENT ( DEP_ID int NOT NULL PRIMARY KEY, DEP_Name varchar(50), STD_ID int FOREIGN KEY REFERENCES STUDENT(STD_ID), );

VALUES (5, 'Calculus', 12);

INSERT INTO DEPARTMENT (DEP_ID, DEP_Name, STD_ID) VALUES (6, 'DLD', 8);

INSERT INTO DEPARTMENT (DEP_ID, DEP_Name, STD_ID) VALUES (7, 'C++', 9);

INSERT INTO DEPARTMENT (DEP_ID, DEP_Name, STD_ID) VALUES (8, 'OOP', 6);

Records

v. FIFTH TABLE IS LIBRARIAN

Create Table LIBRARIAN ( LIB_ID int NOT NULL PRIMARY KEY, LIB_Name varchar(50), LIB_Gender varchar(10), );

Design view

Insert Query

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0003, 'Sheheryar', 'Male');

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0006, 'Daniyal', 'Male');

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0007, 'Roshaan', 'Female');

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0008, 'Ali Kazim', 'Male');

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0009, 'Abu Bakar', 'Male');

INSERT INTO LIBRARIAN (LIB_ID, LIB_Name, LIB_Gender) VALUES (0012, 'Hamza', 'Male');

LIB_ID is the Foreign Key in LIBRARIAN Table

Insert Query

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (3, 'Sialkot', 'Lahore' ,'Punjab' , '03027755655');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (6, 'Sialkot', 'Sialkot' ,'Punjab' , '03005575455');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (7, 'Sialkot', 'Sialkot' ,'Punjab' , '03056454685');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (8, 'Sialkot', 'Karachi' ,'Punjab' , '03205454475');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (9, 'Sialkot', 'Sialkot' ,'Punjab' , '03565284245');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (12, 'Sialkot', 'Sialkot' ,'Punjab' , '04217442455');

INSERT INTO LIBRARIAN_DETAIL (LIB_ID, LIB_Address, LIB_City, LIB_State ,LIB_Phone) VALUES (13, 'Sialkot', 'Sialkot' ,'Punjab' , '03027755655');

Records

vii. SEVENTH TABLE IS ISSUE_STATUS

Create table ISSUE_STATUS ( Issue_ID int NOT NULL PRIMARY KEY, Book_ID int FOREIGN KEY REFERENCES BOOK(Book_ID), Issue_Date varchar(10), Exp_Date varchar(10), STD_ID int FOREIGN KEY REFERENCES STUDENT(STD_ID) );

Design view