Class 12 Cs Project File On Store Mangement
Class 12 Cs Project File On Store Mangement
1
CERTIFICATE
2
Acknowlagement
3
General Store
Management System
This project is a Python-based application designed
to manage the stock of a general store. It leverages
MySQL for database management and Tkinter for
the graphical user interface (GUI). The system
supports functionalities such as adding items,
updating stock, purchasing items, and displaying all
stock details. Below, we discuss the key
components of the project and their respective
roles.
Features
Technologies Used
4
1. MySQL
MySQL is an open-source relational database
management system (RDBMS) used to store and manage
the stock details. The database consists of a table named
stock with the following structure:
2. Tkinter
Tkinter is Python’s standard library for creating GUI
applications. It is used in this project to design the user
interface, which includes:
Login Screen
Main Menu
Forms for adding, updating, and buying items
Display of stock details
5
The project utilizes the mysql.connector library for
connecting Python with the MySQL database. This library
allows seamless execution of SQL queries directly from
the Python script.
Key Functions:
connect( ): Establishes a connection to the MySQL
database.
Cursor ( ): Provides an interface to execute SQL
commands.
commit( ): Saves changes made to the database.
fetchone( ) and fetchall( ): Retrieve query results.
6
PROGRAM
7
8
9
10
Code Overview:
Login System
The application starts with a login interface where the
user must enter a username and password. Correct
credentials grant access to the main menu.
Main Menu
The main menu provides buttons for the following
operations:
Add Item: Captures item details through input fields
and inserts them into the database.
Update Item: Increases the quantity of an existing item
based on user input.
Buy Item: Decreases the quantity of an item after
validating stock availability.
Display All Items: Opens a new window displaying all
stock details fetched from the database.
11
Error Handling
The project incorporates error handling to ensure a
smooth user experience:
Database connection errors are caught and displayed.
User input validation prevents invalid data from being
processed.
Stock operations (e.g., buying more than available
quantity) are validated before executing queries.
12
OUTPUT
Login Window : Enter Username
And Root Password
Of Your SQL
Server
Main Window:
ADDING ITEMS:
MESSAGE BOX AFTER ADDING ITEMS:
STOCK AFTER ADDING ITEMS:
BUYING ITEMS:
Here User
Typed
insufficient
QUANTITY
There are
only 1 cold
drink in
stock.
The
Update
function
will add
the
quantity
writen by
user to the
quantity in
the stock.
CLOSE:
21
Bibliography
Python Documentation: https://docs.python.org/
MySQL Documentation: https://dev.mysql.com/doc/
Tkinter Guide: https://tkdocs.com/
GeeksforGeeks Articles on Python and MySQL
Integration: https://www.geeksforgeeks.org/
TutorialsPoint MySQL Tutorial:
https://www.tutorialspoint.com/mysql/index.htm
Stack Overflow Community Discussions:
https://stackoverflow.com/
Real Python’s Tkinter Tutorials: https://realpython.com/
22
23
24
25