0% found this document useful (0 votes)
7 views

CS Project

The document outlines the development of a Library Management System (LMS) using MySQL as the database and Python for the interface. It details the setup of the database, integration with Python, and the implementation of various functionalities for managing books and members. The project emphasizes efficient database operations, user-friendly interface, data consistency, and scalability, showcasing the effective combination of Python and SQL for robust system development.

Uploaded by

beastboylove bbl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

CS Project

The document outlines the development of a Library Management System (LMS) using MySQL as the database and Python for the interface. It details the setup of the database, integration with Python, and the implementation of various functionalities for managing books and members. The project emphasizes efficient database operations, user-friendly interface, data consistency, and scalability, showcasing the effective combination of Python and SQL for robust system development.

Uploaded by

beastboylove bbl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

1.

Setup MySQL Database


 Create a Database

 Create Tables (using mysql workbench)


Tables -> (Books , Members , Transactions)
2. Python and MySQL Integration

 Install Required Libraries


-Install mysql.connector module

 Connect Python to MySQL


3. Implementing various Operations

Adding Books:

Viewing All Books:

Updating Book Quantity:

Deleting a Book:

Search for Books:


Member Management:
Issue Books:

Return Books:
5. User Interface
Using a menu-driven interface in Python
6. Inserting data into the tables (through python-
Mysql connectivity)

Table –Books:

Table –Members:
Table –Transaction:

Running the code:


SUMMARY
Finally, we have Our database ->library_db :

It has 3 tables ->Books , Members , Transactions


Books

Members

Transactions
We have one python-connectivity programs ->
Library_manager

Where the Library_manager calls the mysql through


the module mysql.connector having menu function
containing all the functions.

Here s the List of all the functions added:


1. Book Management -->
add_book(title, author, genre, quantity)
Adds a new book to the library database.
view_books()
Displays all books in the library.
update_book_quantity(book_id, quantity)
Updates the quantity of a specific book.
delete_book(book_id)
Deletes a book from the database.
search_books(search_term)
Searches for books by title, author, or genre.
2. Member Management -->
add_member(name, email, phone)
Adds a new member to the library.
view_members()
Displays all members in the library.
update_member(member_id, name=None, email=None,
phone=None)
Updates details of a specific member (name, email, or
phone).
delete_member(member_id)
Deletes a member from the database.

3. Transaction Management -->


issue_book(book_id, member_id, issue_date, return_date)
Issues a book to a member and updates the database.

return_book(transaction_id)
Returns a book and updates the database by increasing the
quantity and removing the transaction record.
4. User Interface -->
menu()
Provides a text-based menu interface for the program.

< RUNNING THE PROGRAM >


USING ALL THE FUNCTIONS
Choice 1: Add books

Choice 2: View Books

Choice 3: Update Book Quantity


Choice 4: Delete Book

Choice 5: Issue Book


Choice 6: Return Book
Choice7: Add Member
Choice 8: View Members

Choice 9: Update Member

Choice 10: Delete Member


Choice 11: Search Books

Choice 12: Exit

Observations
1) Efficient Database Operations:
 SQL queries integrated with Python functions allow
seamless interaction with the database.
 Transactions like issuing and returning books are
accurately reflected in real-time.

2) User-Friendly Interface:
 The menu-driven approach makes it easy for users
to interact with the system without needing prior
technical expertise.

3) Data Consistency:
 Every operation, such as adding a book or issuing a
book, ensures the integrity of data across the
database tables.

4) Scalability:
 The system can be expanded to include additional
features, such as fine calculations, email
notifications, or detailed reporting.

5) Error Handling and Robustness:


 The program handles user inputs and database
transactions effectively, ensuring the system
doesn't crash due to invalid operations.

Conclusion
The Library Management System (LMS) project successfully
implements a Python-based interface to manage the
operations of a library using MySQL as the backend database.
The system provides functionalities for adding, updating,
viewing, searching, and deleting books and member records,
as well as issuing and returning books.

By integrating Python's mysql.connector with a structured


relational database, the LMS achieves an efficient and user-
friendly solution for managing a library's operations. The
system demonstrates the capability to handle various tasks
dynamically, ensuring data consistency and accuracy.

This project also highlights the importance of database


management in software applications, providing an example
of how Python and SQL can be combined to build robust
systems.

Project By:
Love pachauri (XII-A)

You might also like