C.S 2
C.S 2
SUBMITTED BY:
MILIND PRASAD
12-A
BHARATIYA VIDYA BHAVAN SCHOOL
PERUMTHIRUTHI, CALICUT-673303
Affiliated to CBSE No: 930910
Signature
INDEX
SLNO DESCRIPTION PAGE NO
1 PROJECT SYNOPSIS
2 INTODUCTION TO PYTHON
3 MYSQL
4 HARDWARE CONFIGURATION
5 SOFTWARE CONFIGURATION
6 SOURCE CODE
7 OUTPUT
8 BIBLIOGRAPHY
PROJECT SYNOPSIS
Title of the Project
Library Management System
Team Members
Adith k
Deva k
Milind P
Aim
This project allows students to apply their programming knowledge to real-world situations,
demonstrating how these programs can be useful in a variety of contexts.
1. The main objective of the library management is that it manages all the information
about books,members,transactions etc.
2. The purpose of the project is to build an application program to reduce manual effort
in tracking library books and users.
3. Library management saves our time by automate routine tasks such as due date
reminders, overdue fines, and inventory updates.
4. It will provide a modern, efficient solution to managing library resources, improving
accessibility and reducing operational overhead.
Introduction
To design and develop a Library Management System that allows efficient management of
library resources, including book inventory, user records, and borrowing activities, while
providing an easy-to-use interface for both library staff and user .
Software Used:python,MySQL
Modules used:mysql.connector
User Defined Functions
Connect_db()-This function establishes a connection to the MySQL database.
add_book()-This function adds a new book to the library
remove_book()-This function removes a book from the library
view_book()-This function retrieves and displays a list of all books in the books table.
add_member()-This function adds a new member to the library
remove_member()-This function removes a member from the library
list_all_member()-This function retrieves and displays a list of all members in the members
table.
borrow_book()-This function allows a member to borrow a book in the transactions table.
return_book()-This function allows a member to return a borrowed book in the transactions
table.
Future Enhancement
In any project,though present satisfaction is important but also it is equally important to see
and visualize the future scope.This project which is developed now may be need to undergo
some changes in future in order to match up the technology prevailing that time,thus change
due to development in technology are advisable.
Some of the future scope are:-
1.AI can be used for personalized book recommendations, predictive analytics for
inventory management, and voice search for easier navigation.
2.Enhance scalability and facilitate the management of both physical and digital resources in
one platform.
What is Python?
Python is an Open source, General Purpose, Object-oriented High-level
programming language. It was Developed By Guido Van Rossum In 1991.
Python programming is a highly interpreted and object-oriented language with
built-in data structures, combined with dynamic typing and dynamic binding,
which makes it very attractive for Rapid Application Development.
MySQL
MySQL is an open – sourced and freely available relational database
management system (RDBMS) that uses SQL.
MySQL is developed and supported by Sweden based company, MySQL
AB. which is know today as Oracle Corporation.
It provides features for creating, storing maintaining and accessing data,
stored in the form database and their tables.
SQL is used for creation, modification and extraction of data from a
relational database.
Using SQL we can search for any data in the database and perform
functions like creating tables, adding records, modifying data, removing
rows, dropping tables etc…
Features of MySQL
Easy to use and Flexible
Client/Server Architecture
Free to use
High Productivity
No coding required.
Works with different languages
SOFTWARE CONFIGURATION
Operating System:
Edition: Windows 11 home
Version: 21H2
Software Used: Python,MySQL
HARDWARE CONFIGURATION
Processor: 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz 3.00 GHz
System Type: 64-bit operating system, x64-based processor
RAM:8.00 GB
Solid state drive(SSD):512GB
SOURCE CODE
import mysql.connector as mc
from datetime import datetime
# Borrow a book
def borrow_book(book_id, member_id):
db = connect_db()
cursor = db.cursor()
cursor.close()
db.close()
# Return a book
def return_book(transaction_id):
db = connect_db()
cursor = db.cursor()
db.commit()
cursor.close()
db.close()
print("Book returned successfully!")
if choice == '1':
book_id = int(input("Enter book ID: "))
title = input("Enter book title: ")
author = input("Enter book author: ")
quantity = int(input("Enter book quantity: "))
add_book(book_id, title, author, quantity)
MYSQL TABLE
OUTPUT
To view all books:
Adding book:
Removing book:
https://www.google.com/
https://www.geeksforgeeks.com/
computer science textbook class 12 by
Preeti Arora
NCERT computer science textbook class
12 textbook