Project Documentation
Project Documentation
Project Documentation
Apart from the efforts of me, the success of any project depends largely on the Encouragement
guidelines of many others. I take this opportunity to express my Gratitude to the people who
have been instrumental in the successful completion of this Project.
I express a deep sense of gratitude to almighty God for giving me strength for the
successful completion of the project.
I express my heartfelt gratitude to my parents for their constant encouragement While
carrying out this project.
I gratefully acknowledge the contribution of the individuals who contributed in bringing
this project up to this level, and who continue to look after me despite my flaws.
I express my deep sense of gratitude to the luminary The Principal of Kendriya Vidyalaya
No.1 Nausenabaugh who has been continuously motivating and Extending their helping hand
to us.
My sincere thanks to Mrs. Keerty Gupta, Master In-charge, a guide, and a Mentor, who critically
reviewed my project and helped in solving each problem, that occurred during the
implementation of the project.
The guidance and support received from all the members who contributed and who are
contributing to this project was vital for the success of the project. I am grateful for their
constant support and help.
Table of contents
INTRODUCTION
ABSTRACT
This stock management project empowers customers to place orders for a diverse
range of items via an intuitive server page interface. Through this system, users
can effortlessly select and order items, fostering a streamlined process. The
project incorporates essential features such as item cataloging, order submission,
and dynamic stock updates. It promotes effective inventory management by
enabling real-time tracking of stock levels and automating order processing. The
server efficiently handles customer requests, enhancing the overall stock
management experience. With an emphasis on user-friendly interactions and
robust functionality, this project strives to optimize the coordination between
customers and the server, ensuring smooth order placement and accurate stock
monitoring.
SYSTEM STUDY
OBJECTIVE OF THE PROJECT
The objective of this project is to let the students apply their programming knowledge to a real-
world situation/problem and expose the students to how programming skills help in developing
good software.
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings who want to stand against today’s
merciless competition where not too wise saying “to err is human” is no longer valid, it’s
outdated to rationalize your mistake. So, to keep pace with time, to bring about the best result
without malfunctioning, and greater efficiency to replace the unending heaps of flies with a
much-sophisticated hard disk of the computer.
One has to use the data management software. The software has been an ascent in atomization
in various organizations. Many software products are now in the markets, which have helped in
making organizations work easier and efficiently. Data management initially had to maintain a
lot of ledgers and a lot of paperwork had to be done but now software production in this
organization has made their work faster and easier. Now only this software has to be loaded on
the computer and work can be done.
This saves a lot of time and money. The Work becomes fully automated and any information
regarding the organization can be obtained by clicking the button. Moreover, now it's an age of
computers and automation. Such an organization gives a better look.
MODULE
1. `CREATE_DATABASE_AND_TABLES`:
- Establishes a connection to a mysql database server.
- Creates a database named “shop_management” if it doesn’t exist.
- Defines three tables: “clients,” and “orders” with specific fields and relationships.
2. `CONNECT_TO_DATABASE`:
- Establishes a connection to the “shop_management” database on the mysql server.
3.'REGISTER’:
-Prompts the user to enter a unique username and a strong password.
- Inserts the user’s credentials into the “users” table if registration is successful.
4.‘ ADMIN LOGIN’:
-Prompts the admin to login into the server
-Verifies the admin log in details
5.’ CLIENT LOGIN’:
-Prompts the user to enter a username and password for authentication.
- Verifies the credentials against the “users” table in the database.
- Returns the username if the login is successful; otherwise, returns `none`.
6.’PLACE_ORDER’:
-prompts the user to order various items.
-the orders items will be stored in a separate table orders
7.’VIEW_ORDERS’:
-prompts the Admin as well as the Client to view the orders placed by the clients.
8.’COUNT_GENERATEDBILLS’:
-promotes the Admin to view the number of orders as well as bills generated by the time.
-counts the number of bill generated.
SYSTEM ANALYSIS
AND DESIGN
PLANNING PHASE
The planning phase is the most critical step in completing development, acquisition, and
maintenance projects. Careful planning, particularly in the early stages of a project, is necessary
to coordinate activities and manage project risks effectively. The depth and formality of project
plans should be commensurate with the characteristics and risks of a given project. Project
plans refine the information gathered during the initiation phase by further identifying the
specific activities and resources required to complete a project.
A critical part of a project manager's job is to coordinate discussions between user, audit,
security, design, development, and network personnel to identify and document as many
functional, security, and network requirements as possible. During this phase, a plan is
developed that documents the approach to be used and includes a discussion of methods,
tools, tasks, resources, project schedules, and user input. Personnel assignments, costs, project
schedules, and target dates are established.
A Project Management Plan is created with components related to acquisition planning,
configuration management planning, quality assurance planning, concept of operations, system
security, verification and validation, and systems engineering management planning.
REQUIREMENTS ANALYSIS PHASE
This phase formally defines the detailed functional user requirements using high-level
requirements identified in the Initiation, System Concept, and Planning phases. It also
delineates the requirements in terms of data, system performance, security, and 15
maintainability requirements for the system. The requirements are defined in this phase to a
level of detail sufficient for systems design to proceed. They need to be measurable, testable,
and relate to the business need or opportunity identified in the Initiation Phase. The
requirements that will be used to determine acceptance of the system are captured in the Test
and Evaluation Masterplan.
The purposes of this phase are to:
Further define and refine the functional and data requirements and document them in
the Requirements Document,
Complete business process reengineering of the functions to be supported (i.e., verify
what information drives the business process, what information is generated, who
generates it, where the information goes, and who processes it)
Develop detailed data and process models (system inputs, outputs, and the process.
Develop the test and evaluation requirements that will be used to determine acceptable
system Performance.
• DESIGN PHASE
The design phase involves converting the informational, functional, and network requirements
identified during the initiation and planning phases into unified design specifications that
developers use to script programs during the development phase. Program designs are
constructed in various ways. Using a top-down approach, designers first identify and link major
program components and interfaces, then expand design layouts as they identify and link
smaller subsystems and connections. Using a bottom-up approach, designers 16 first identify
and link minor program components and interfaces, then expand design layouts as they identify
and link larger systems and connections.
Contemporary design techniques often use prototyping tools that build mock-up designs of
items such as application screens, database layouts, and system architectures. End users,
designers, developers, database managers, and network administrators should review and
refine the prototyped designs in an iterative process until they agree on an acceptable design.
Audit, security, and quality assurance personnel should be involved in the review and approval
process. During this phase, the system is designed to satisfy the functional requirements
identified in the previous phase. Since problems in the design phase could be very expensive to
solve in the later stage of software development, a variety of elements are considered in the
design to mitigate risk. These include:
Testing at the development facility by the contractor and possibly supported by end
users.
Testing as a deployed system with end users working together with contract personnel.
Operational testing by the end user alone performing all functions. Requirements are
traced throughout testing, final Independent Verification and validation evaluation is
performed and all documentation is reviewed and accepted before acceptance of the
system.
• IMPLEMENTATION PHASE
This phase is initiated after the system has been tested and accepted by the user. In this phase,
the system is installed to support the intended business functions. System performance is
compared to performance objectives established during the planning phase. Implementation
includes user notification, user training, installation of hardware, installation of software onto
production computers, and 19 integration of the system into daily work processes. This phase
continues until the system is operating in production according to the defined user
requirements.
Module
Functions
Libraries
Statements
Compound statements
Expressions -> opreators
Objects
Indentation: It refers to the spaces applied at the beginning of a code line. In other
programming languages, the indentation in code is for readability only, whereas the indentation
in Python is very important. Python uses indentation to indicate a block of code or use in block
of code
Functions: A function is a programming block of codes that is used to perform a single, related
task. It only runs when it is called. We can pass data, known as parameters, into a function. A
function can return data as a result.
Types of function
1. Built-in Functions:- Functions that are already written or defined in Python print() It is used to
print statements. len() It returns the length of an object/value.
2. Functions defined in the module: A module is a file consisting of Python code. A module can
define functions, classes, and variables. For example- Random Module The random module
provides access to functions that support many operations. Perhaps the most important thing is
that it allows us to generate random numbers. random.randint(), randint accepts two
parameters: a lowest and a highest number.
3. User-defined function: Functions that we define ourselves to do certain specific tasks are
referred to as user-defined functions because these are not already available.
Types of varibles
1. Local variable:- accessible only inside the functional block where it is declared
2. Global variable:- a variable that is accessible among the whole program using the global
keyword.
3. Non-local variable:- accessible in nesting of functions,using nonlocal keyword.
INTODUCTION TO MySQL
Installing Packages
- to install the MySQL client package,type the following command:
pip install MySQL client
-to install the MySQL-connector-python package,type the following command:
pip install MySQL-connector-python
- Install MYSQL Community Software(MySQL-installer-community). After you install a
MySQL package, you are ready to work with actual databases. To develop a Banking
Management System in Python with source code that uses MySQL database, we must
connect Python to MySQL.
• MySQL commands
- CREATE DATABASE — creates a new database
Syntax- CREATE DATABASE database name;
- CREATE TABLE — creates a new table
Syntax- CREATE TABLE table_name (colmn1 datatype1,column2 datatype, column3
datatype,....);
- INSERT INTO — inserts new data into a database
Syntax- INSERT INTO table_name VALUES (value1,value2,…);
- SELECT — extracts data from a database.
Syntax-SELECT colmn1,colmn2,..FROM table-name WHERE condition=….;
• How to Connect to MySQL Database in Python?
1. Install MySQL connector module Use the pip command to install MySQL connector python
pip install mysql-connector-python.
2.Import MySQL connector module Import using an import MySQL.connector statement so you
can use this module’s methods to communicate with the MySQL database.
3. Use the connect() method Use the connect() method of the MySQL Connector class with the
required arguments to connect MySQL. It would return a MySQL connection object if the
connection is established successfully
4. Use the cursor() method Use the cursor() method of a MySQL connection object to create a
cursor object to perform various SQL operations.
5.Use the execute() method The execute() methods run the SQL query and return the result.
6.Extract result using fetchall() Use cursor.fetchall() or fetchone() or fetchmany() to read query
result.
7. Close the cursor and connect objects using the cursor. clsoe() and connection.close() method
to close open connections after your work completes.
Primary Key -A primary is a column or set of columns in a table that uniquely identifies
tuples (rows) in that table.
Structured Query Language - Structured Query Language is a full form of SQL. It is a
standard language developed and used for accessing and modifying relational
databases. There are types of
SQL Commands, such as
1. DDL (Data Definition Language) To create database and table structure commands like
CREATE, ALTER, DROP, etc.
2. DQL (Data Query Language) To retrieve the data from the database SELECT DML (Data
Manipulation Language) Record/rows related operations. commands like INSERT..., DELETE...,
UPDATE.... etc. 3.TCL(Transactional Control Language.) Used to control the transactions.
commands like COMMIT, ROLLBACK, SAVEPOINT, etc.
IMPLEMENTATION OF SOURCE CODE
DATABASES TABLES
CLIENT TABLE
Client table contains shop ID, shop number, phone number, shop address, shop name and
password. This table stores the details of the registered clients .
ORDERS TABLE
This table contains the orders placed by the clients along with the shop id
OUTPUTS
Compiling and running the code
Registration as a client
Login in as a client
Login as a ADMIN
BIBLIOGRAOHY
Computer science with python – class XII by : Sumit Arora