DBMS LAB
DBMS LAB
on
BACHELOR OF TECHNOLOGY
JULY-DEC ,2024
1
Acknowledgement
We would like to express our heartfelt gratitude to everyone who contributed to the successful
completion of this project.
First and foremost, we extend our sincere thanks to our instructor, Prof Taman Kumar, for
their invaluable guidance, expertise, and encouragement throughout the project. Their support
and constructive feedback were essential in bringing this project to fruition.
We also wish to acknowledge the collaborative efforts and insights shared by our classmates,
which greatly enriched our understanding and helped us refine various aspects of the project.
Finally, we would like to thank our families and friends for their unwavering support and
motivation during this journey.
Karan Singh
Tejas Joshi
2
Introduction
In today’s data-driven world, databases play a crucial role in storing, managing, and retrieving
data efficiently. SQL (Structured Query Language) is a powerful tool that allows developers
and analysts to interact with relational databases to perform these tasks. This project focuses
on the design and implementation of a library management system using SQL, providing a
robust database structure to manage essential operations within a library.
The system includes various entities, such as Users, Books, Admins, Logins, and Book
Records, each essential for organizing library data. By structuring these entities and
establishing clear relationships among them, this database provides a comprehensive solution
for managing library activities. The database supports functionalities such as adding new users,
tracking book availability, monitoring book borrowing, and managing user credentials through
an ER (Entity-Relationship) diagram that visually outlines these relationships.
The project covers all essential SQL operations, from Data Definition Language (DDL) to
create tables and set relationships, to Data Manipulation Language (DML) for inserting and
modifying records. Additionally, it includes various SQL concepts such as joins, aggregate
functions, string and date functions, constraints, and views to enable complex queries and
advanced data management capabilities.
This project demonstrates foundational SQL skills, showcasing the use of logical operators,
subqueries, joins, and aggregate functions in a structured manner. Through this project, we aim
to develop a deeper understanding of database management and the practical use of SQL to
support real-world applications.
3
Project Objectives
4
ER Diagram
5
o Borrows: Users can borrow books from the library, establishing a relationship
between the USER and BOOK entities.
o Login Requirement: Users are required to log in to the system through the
LOGIN entity.
2. BOOK Entity
• Purpose: The BOOK entity represents all books in the library, containing essential
information about each book.
• Attributes:
o Book Barcode No: A unique barcode assigned to each book for identification
and tracking.
o Place: The location or section where the book is stored within the library.
o Title: The title of the book.
o Author: The author of the book.
o Status: The current status of the book (e.g., available, issued).
• Relationships:
o Borrowed by USER: A book can be borrowed by a user, showing the
connection between the USER and BOOK entities.
o Issued by ADMIN: The ADMIN entity is responsible for issuing books to
users, creating a relationship with the BOOK entity.
3. LOGIN Entity
• Purpose: The LOGIN entity facilitates user and admin authentication, ensuring secure
access to the system.
• Attributes:
o Login ID: A unique identifier used for login.
o Password: The password associated with the login ID to authenticate users or
admins.
• Relationships:
o Login Requirement: The LOGIN entity is connected to both the USER and
ADMIN entities, as both need to log in to access the system's features.
4. ADMIN Entity
• Purpose: The ADMIN entity represents library administrators responsible for
managing book records and user interactions.
• Attributes:
o Admin ID: A unique ID for each administrator.
o Name: The name of the administrator.
o Phone No: The contact number of the administrator.
• Relationships:
o Login Requirement: Administrators are required to log in through the LOGIN
entity.
o Maintains BOOK RECORD: The ADMIN entity is responsible for managing
the BOOK RECORD entity, which includes updating, deleting, and adding
book records.
o Issues BOOK: The ADMIN entity has the authority to issue books to users,
establishing a relationship with the BOOK entity.
5. BOOK RECORD Entity
6
• Purpose: The BOOK RECORD entity stores and manages all book-related data,
including inventory details.
• Attributes:
o Total Books Available: The total number of books available in the library.
• Relationships:
o Maintained by ADMIN: The ADMIN entity maintains the BOOK RECORD
entity. This includes actions such as updating records, deleting records, and
adding new records, allowing for effective inventory management.
7
Database Design
Table Definitions
8
9
10
11
12
13
14
15
Conclusion
The Library Management System project successfully provides a streamlined and efficient
solution for managing library operations. Through the integration of entities like USER,
BOOK, ADMIN, LOGIN, and BOOK RECORD, the system allows for a smooth flow of
information, ensuring easy access, borrowing, and record-keeping. By automating routine
processes and enabling secure login for both users and administrators, the system minimizes
manual work, reduces errors, and improves overall efficiency.
In summary, this project achieves its objective of creating a user-friendly, reliable, and secure
system for library management. It can be further expanded with additional features, such as
overdue book reminders, user activity tracking, and a recommendation system, making it an
adaptable foundation for larger, more complex library management applications in the future.
16