Book Shop Management System Project File (Advanced)
---
1. Title Page
Project Title: "Book Shop Management System"
Prepared By: [Your Name, Roll Number]
Class & Section: Class 12, Section [Your Section]
Submitted To: [Teacher’s Name]
School Name: [Your School]
Date of Submission: [Date]
---
2. Acknowledgment
Express gratitude to your teacher, classmates, and family members who supported your project
work.
---
3. Certificate of Completion
Certify that the project titled "Book Shop Management System" has been successfully
completed by [Your Name], under the supervision of [Teacher's Name].
---
4. Table of Contents
1. Introduction
2. Project Objective
3. System Requirements
4. Project Design
Modules and Features
Database Schema
ER Diagram and Flowchart
5. Coding Section
Database Setup
Class Definitions
Book Shop Management Functions
6. Testing and Output
7. Conclusion
8. Future Enhancements
9. References
---
5. Introduction
The Book Shop Management System is designed to help automate bookstore tasks such as
managing book inventory, tracking sales, and handling customer information. This system
reduces manual work, improves accuracy, and saves time, making bookstore operations more
efficient.
---
6. Project Objective
Objective: To create a Book Shop Management System that will:
Manage an inventory of books with details like title, author, price, and quantity.
Record customer information.
Track each sale, automatically adjust stock levels, and calculate revenue.
Generate reports summarizing sales, popular books, and stock levels.
---
7. System Requirements
Hardware: Minimum requirements for a PC/laptop.
Software: Python, SQLite/MySQL (for database), IDE (e.g., PyCharm, VS Code)
---
8. Project Design
Modules and Features
1. Inventory Management:
Add, update, delete, and search books.
2. Customer Management:
Store customer details and manage IDs.
3. Sales Management:
Record each sale, adjust stock, and calculate revenue.
4. Report Generation:
Summarize monthly sales, popular books, and generate low-stock alerts.
Database Schema
ER Diagram and Flowchart
An ER Diagram visualizes relationships between books, customers, and sales.
A Flowchart to illustrate the workflow of the book shop system.
---
9. Coding Section
Organized and modular code, with clear comments.
Database Setup
import sqlite3
# Establish connection
conn = sqlite3.connect('bookshop.db')
cursor = conn.cursor()
# Create tables
cursor.execute('''CREATE TABLE IF NOT EXISTS Books (
book_id INTEGER PRIMARY KEY,
title TEXT,
author TEXT,
price REAL,
quantity INTEGER)''')
cursor.execute('''CREATE TABLE IF NOT EXISTS Customers (
customer_id INTEGER PRIMARY KEY,
name TEXT,
contact TEXT)''')
cursor.execute('''CREATE TABLE IF NOT EXISTS Sales (
sale_id INTEGER PRIMARY KEY,
book_id INTEGER,
customer_id INTEGER,
quantity_sold INTEGER,
sale_date TEXT,
FOREIGN KEY (book_id) REFERENCES Books (book_id),
FOREIGN KEY (customer_id) REFERENCES Customers (customer_id))''')
conn.commit()
Class Definitions
Define classes for Book, Customer, and BookShop with relevant methods for managing books,
customers, and sales.
class Book:
def __init__(self, title, author, price, quantity):
self.title = title
self.author = author
self.price = price
self.quantity = quantity
class Customer:
def __init__(self, name, contact):
self.name = name
self.contact = contact
Book Shop Management Functions
class BookShop:
def __init__(self):
self.conn = sqlite3.connect('bookshop.db')
self.cursor = self.conn.cursor()
# Adding a book
def add_book(self, book):
self.cursor.execute("INSERT INTO Books (title, author, price, quantity) VALUES (?, ?, ?,
?)",
(book.title, book.author, book.price, book.quantity))
self.conn.commit()
# Adding a customer
def add_customer(self, customer):
self.cursor.execute("INSERT INTO Customers (name, contact) VALUES (?, ?)",
(customer.name, customer.contact))
self.conn.commit()
# Making a sale and updating stock
def make_sale(self, book_id, customer_id, quantity):
self.cursor.execute("SELECT quantity FROM Books WHERE book_id = ?", (book_id,))
book = self.cursor.fetchone()
if book and book[0] >= quantity:
new_quantity = book[0] - quantity
self.cursor.execute("UPDATE Books SET quantity = ? WHERE book_id = ?",
(new_quantity, book_id))
self.cursor.execute("INSERT INTO Sales (book_id, customer_id, quantity_sold,
sale_date) VALUES (?, ?, ?, date('now'))",
(book_id, customer_id, quantity))
self.conn.commit()
print("Sale recorded successfully!")
else:
print("Insufficient stock.")
---
10. Testing and Output
Run each function and take screenshots of results.
Include screenshots for tasks like adding books, adding customers, and making sales in this
section.
---
11. Conclusion
Summarize the skills you gained, including programming, database management, and
organizing code into logical functions.
---
12. Future Enhancements
GUI with Tkinter: Make the system user-friendly by adding a graphical interface.
Data Analysis: Use matplotlib to visualize sales data with charts.
Login System: Implement a simple login page for admin access.
Export Reports: Add an option to export sales and inventory data to Excel or CSV files.