Front Page Certificate Ac
Front Page Certificate Ac
SESSION – 2024-25
SUBJECT –Computer Science (083)
This is to certify that Mr. Ruhani Devgon of class XII Commerce Roll
successful.
Introduction
System Implementation
Algorithm
Flow Chart
Programming
Output
Scope of Project
Conclusion
Bibliography
PYTHON
Python
Python is a popular programming language. It was created by Guido
van Rossum, and released in 1991.
It is used for:
Uses of Python
Python can be used on a server to create web applications.
Python can be used alongside software to create workflows.
Python can connect to database systems. It can also read and
modify files.
Python can be used to handle big data and perform complex
mathematics.
Python can be used for rapid prototyping, or for production-
ready software development.
MYSQL
MySQL
MySQL is an open source relational database management system
that was originally released in 1995.
MySQL is popular among all databases, and is ranked as the 2nd
most popular database, only slightly trailing Oracle Database. Among
open source databases, MySQL is the most popular database in use
today.
Usesof MySQL
Elastic Replication - Where an environment requires the number
OS servers to grow and shrink dynamically.
High Availability - Where sharding is used for write scale-out (in
which each shard maps to a replication group).
Source-Replica Replication Alternative - Which allows using a
single source server to make it a single point of contention.
Introduction
A Book Shop Management system is basically for management of
incoming and outgoing material from the Book shop. It will reduce
paper work & work load of user. It can be used in any Book Shop for
maintaining database details and their quantities. The features of
Bookshop system are:-
1. Book database management: The details of book like book
title,author’s name, book price and quantityof books can be
maintained.
Device Specification:
1. Device Name:- Vansh-PC
2. Processor:- 11th Gen Intel Core i3
3. Installed Ram:- 8.00 GB (7.65 GB usable)
4. System Type:- 64-bit operating system
5. Edition:- Windows 11
6. Pen and Touch:- No pen or touch
7. Manufacturer:- HP
Algorithm
1. Start the program.
2. Display the main menu:
Add a book
Update a book
Sell a book
List all books
Add a Customer
List all Customers
Quit
3. Add book function:
a) Asks for details of the new book
b) Print Book added successfully!
4. Update BookFunction:
a)Asks for new details of the book.
b)Print Book updated successfully!
5. Sell book function:
a)Get book ID from user
b)input book id = book id on the file
Yes:- Print Sold x copies of the book (ID: y) to customer.
No:- print Insufficient quantity available for sale.
cursor = db.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS books (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
author VARCHAR(255),
price DECIMAL(10, 2),
quantity INT
)
""")
# Create a table to store customer details
cursor.execute("""
CREATE TABLE IF NOT EXISTS customers (
customer_id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255),
email VARCHAR(255) UNIQUE
)
""")
def list_customers():
# List all the customers in the database
cursor.execute("SELECT * FROM customers")
customers = cursor.fetchall()
if customers:
print("List of Customers:")
for customer in customers:
print(f"ID: {customer[0]}, First Name: {customer[1]}, Last
Name: {customer[2]}, Email: {customer[3]}")
else:
print("No customers found in the database.")
def list_books():
# List all books in the database
cursor.execute("SELECT * FROM books")
books = cursor.fetchall()
if books:
print("List of Books:")
for book in books:
print(f"ID: {book[0]}, Title: {book[1]}, Author: {book[2]}, Price:
{book[3]}, Quantity: {book[4]}")
else:
print("No books found in the database.")
def main():
while True:
print("\nINDORE BOOK SHOP")
print("1. Add a book")
print("2. Update a book")
print("3. Sell a book")
print("4. List all books")
print("5. Add a Customer")
print("6. List all Customers")
print("7. Quit")
choice = input("Enter your choice : ")
if choice == "1":
title = input("Enter book title: ")
author = input("Enter book author: ")
price = float(input("Enter book price: "))
quantity = int(input("Enter book quantity: "))
add_book(title, author, price, quantity)
elif choice == "2":
book_id = int(input("Enter book ID to update: "))
title = input("Enter new book title: ")
author = input("Enter new book author: ")
price = float(input("Enter new book price: "))
quantity = int(input("Enter new book quantity: "))
update_book(book_id, title, author, price, quantity)
elif choice == "3":
book_id = int(input("Enter book ID to sell: "))
quantity_sold = int(input("Enter quantity to sell: "))
sell_book(book_id, quantity_sold)
elif choice == "4":
list_books()
elif choice == "5":
first_name = input("Enter customer's first name: ")
last_name = input("Enter customer's last name: ")
email = input("Enter customer's email: ")
add_customer(first_name, last_name, email)
elif choice == "6":
list_customers()
elif choice == "7":
print("Exiting the INDORE BOOK SHOP.")
break
else:
print("Invalid choice. Please enter a valid option.")
if __name__ == "__main__":
main()
Presentscope:
Theproject“BookShop Management System” will help in reducing
humanlabor. Itwillincreasetheworkingefficiencyandhelpindata
handling. Itsmainfeaturesare:
Easytofindbookdetails
Maintainingrecords
Reducehumaneffort
Userfriendly
Futurescope:
Thisprojectcanbeeasilyimplementedundervarioussituations.
Wecanaddnewfeaturesasandwhenwerequire.Reusabilityis
possibleasandwhenrequireinthisproject.All the modules are flexible.
Wecanalsoincludeonlinepaymentservicestothisprojectusing PayPal or
Paytm.Thiswillhelpcustomertopayonlinefortheirpurchases
usingCredit/Debitcard.Therearemanyfeatureswhichcouldbe
addedtothisprojectformakingthisprojectmoreproductive.
Conclusion