0% found this document useful (0 votes)
19 views20 pages

Final Us

The document is a project report on a Payroll Management System submitted by Ajita Shukla for Computer Science class XII at Dr. K.N. Modi Global School. It includes sections on acknowledgements, programming languages used (Python and MySQL), hardware and software requirements, project description, and program code. The system facilitates employee management tasks such as adding, removing, promoting, and displaying employee details.

Uploaded by

prakharagr2008
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)
19 views20 pages

Final Us

The document is a project report on a Payroll Management System submitted by Ajita Shukla for Computer Science class XII at Dr. K.N. Modi Global School. It includes sections on acknowledgements, programming languages used (Python and MySQL), hardware and software requirements, project description, and program code. The system facilitates employee management tasks such as adding, removing, promoting, and displaying employee details.

Uploaded by

prakharagr2008
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/ 20

DR K.N.

MODI
GLOBAL SCHOOL

COMPUTER SCIENCE
Project on Payroll
Management System
Submitted By : Ajita Shukla Submitted To :
MR. AVLOKAN
Enrollment No :
MOHAN

CLASS XII
SESSION 2024-25
CERTIFICATE

This is to certify that Mr./Mrs. Ajita Shukla of class XII


SCIENCE-C has prepared the project report entitled Payroll
Management System. The report is the result of his/her
efforts and endeavors. The report is found worthy of
acceptance as the final project report for the subject
Computer Science (CBSE Code : 083) for class XII, for the
purpose of partial fulfillment of CBSE Board examinations
to be held in March 2025. The project has been prepared
under my guidance. I wish him/her all success in life.

Mr. Avlokan Mohan


PGT, Computer Science
Dr. K N Modi Global School
Modinagar
CONTENTS

1. Acknowledgement

2. About Python

3. About MySQL

4. Hardware and Software Requirements

5. Project Description

6. Modules/Functions Used and Their Purpose

7. Program Code

8. Program Output

9. Bibliography
ACKNOWLEDGEMENT

This project consumed a huge amount of work, research and dedication. Still,
implementation would not have been possible if we did not have the support of
our classmates and the school officials. Therefore, we would like to extend our
sincere gratitude to all of them.

First of all, we are thankful to Dr. K. N. MODI GLOBAL SCHOOL teachers


for their untiring support and for providing necessary guidance concerning
practical implementation. We are also grateful to the teachers for the provision
of expertise, and technical support in the implementation. Without their
superior knowledge and experience, the practical file would not be what it is
terms of quality of outcomes, and thus their support has been essential.

We would like to express our sincere thanks towards the team members who
devoted their time and knowledge in the implementation of this practical file.

Nevertheless, we express our gratitude toward our families and classmates for
their kind cooperation and encouragement which helped us in the completion
of this practical file.
ABOUT PYTHON
Python is a high-level, interpreted programming language that is
known for its simplicity and readability. It was created by Guido van
Rossum and first released in 1991. Python is designed to be easy to
learn and has a clear and straightforward syntax, which makes it an
excellent choice for beginners as well as experienced developers.
Here are some key features and applications of Python:
Features of Python:
1. Easy to Learn and Read: - Python's syntax is clean and easy to
understand, making it suitable for beginners. The readability of
Python code is one of its strengths, as it resembles the English
language.
2. Versatility: - Python is a versatile language that can be used for
various types of programming, including web development, data
science, artificial intelligence, machine learning, automation, and
more.
3. Interpreted and Dynamically Typed: - Python is an interpreted
language, meaning that the code is executed line by line. It is also
dynamically typed, allowing developers to create variables without
explicitly declaring their data types.
Applications of Python:
1. Web Development: - Python is widely used for web development,
with frameworks like Django and Flask providing tools for building
scalable and maintainable web applications.
2. Data Science and Machine Learning: - Python has become a
popular language for data science and machine learning. Libraries like
NumPy, Pandas, and scikit-learn are commonly used for data
analysis, manipulation, and machine learning tasks
ABOUT MYSQL
MySQL is an open-source relational database management system
(RDBMS) that is widely used for managing and organizing large
volumes of data. Developed by Oracle Corporation, MySQL is known
for its performance, reliability, and ease of use.

Here are some key aspects of MySQL:


1. Open Source: MySQL is open-source software, which means that its
source code is freely available and can be modified and distributed by the user
community. This has contributed to its widespread adoption and continuous
improvement by a large community of developers.

2. Relational Database Management System (RDBMS ): MySQL


follows the relational database model, which means it organizes data into tables
with rows and columns. It supports SQL (Structured Query Language) for
defining and manipulating the data within these tables.

3. Data Security: MySQL provides robust security features, including user


authentication, encryption, and access control, to protect sensitive data stored in
databases.

MySQL is widely used across various industries and applications,


including:
1. Web Applications: Many popular web applications and content
management systems (CMS) such as WordPress, Joomla, and Drupal use
MySQL as their backend database.

2. Business Applications: MySQL is employed in various business


applications, including customer relationship management (CRM) systems,
enterprise resource planning (ERP) systems, and more.
HARDWARE AND SOFTWARE
SPECIFICATIONS

Hardware :
• Processor : intel(R) Core(TM) i5-8265U CPU @ 1.60GHz 1.80 GHz

• RAM : 2GB or more

• Hard Disk : 500 GB

Software:
• Operating System : Windows 7 or above

• IDE : IDLE Python

• Front End : Python 3.6 or above

• Back End : MySQL server 5.5 or above


PROJECT DESCRIPTION

A payroll management system is software that helps manage employees' payroll


and benefits. The purpose of the payroll system is to provide efficient and
accurate payments to employees and assist in tracking employee work hours
and details. The payroll management software helps manage and track your
employee's payroll, taxes, and payments.

This system consist five choices:-

1. Add Employee

2. Remove Employee

3. Promote Employee

4. Display Employee

5. Exit

1. Add Employee:-
This is used to add a employee detail to an existing table.

2. Remove Employee:-
This is used to remove any employee details.

3. Promote Employee:-
This is used to promote post or salary of any employee.

4. Display Employee:-
This is used to display employee details.

5. Exit :-
This is used to exit the management system.
DATA DICTIONARY

I. LIST OF MODULES
1) mysql.connector module:- MySQL Connector enables
Python programs to access MySQL databases. It is written in pure Python and
does not have any dependencies except for the Python Standard Library.

II. LIST OF USER DEFINED FUNCTION


1.check_emp() :-
This is a take nothing return something type nature function .This is
designed to check whether the given employee id exist or not. This function
include taking a employee id as input and return True and False depending upon
the condition. It is further used in code to check it each time.

2.add_emp() :-
This is a take nothing return nothing type nature function .This is
designed to add a new employee details. This function include taking employee
details as input .

3.remove_emp() :-
This is a take nothing return nothing type nature function .This is
designed to remove any employee details. This function include taking
employee id as input and delete its detail .
4. promote_emp() :-
This is a take nothing return nothing type nature function .This is
designed to update employee salary/post. It furthers include two choice i.e, to
update employee salary and to update employee post. It takes employee id and
updated details as input and update it .

5.display_emp() :-
This is a take nothing return nothing type nature function .This is
designed to display employee details. It furthers include two choice i.e, to
display a particular employee details and to display all employee details.

6.menu() :-
This function includes the menu and the combination of the code.It is the
main source code in which there are 5 choices and each choice further and all
other user defined functions are invoked here. This function is invoked at the
end of most of user defined functions.

.
PROGRAM CODE -
import mysql.connector as m
db=m.connect(host="localhost", user="root", password="password",
database="emp")
c=db.cursor()
def check_emp(empid):
s="select * from employee where id = %s;"
data=(empid,)
c.execute(s,data)
r=c.rowcount
if r==1:
return True
else:
return False

def add_emp():
id=input("Enter employee id : ")
if (check_emp(id))==True:
print("Employee Id already exist ")
menu()
else:
name=input("Enter Employee Name :")
post=input("Enter Employee post :")
salary=input("Enter Employee salary :")
data=(id,name,post,salary)
s="insert into employee values(%s,%s,%s,%s);"
c.execute(s,data)
db.commit()
print("Data added successfully")
menu()

def remove_emp():
id=input("Enter employee id : ")
if (check_emp(id))==False:
print("Employee Id do not exist ")
menu()
else:
s="delete from employee where id=%s;"
data=(id,)
c.execute(s,data)
db.commit()
print("employee data removed successfully")
menu()

def promote_emp():
id=input("Enter employee id : ")
if (check_emp(id))==False:
print("Employee Id do not exist ")
menu()
else:
print("1.Promote employee post","2.Increase salary of
employee",sep="/n")
choice=int(input("enter a choice (1/2) :"))
if choice==1:
s="update employee set post=%s where id=%s;"
post=input("Enter updated post: ")
data=(post,id)
c.execute(s,data)
db.commit()
print("Employee's post is updated")
elif choice==2:
s="update employee set salary=%s where id=%s;"
salary=input("Enter updated salary: ")
data=(salary,id)
c.execute(s,data)
db.commit()
print("Employee's salary is updated")
else:
print("Invalid choice")
menu()

def display_emp():
print("1.Display one employee record")
print("1.Display all employees records.")
choice=input("Enter your choice :")
if choice==1:
id=input("Enter employee id : ")
if (check_emp(id))==False:
print("Employee Id do not exist ")
else:
s="select * from employee where id=%s;"
data=(id,)
c.execute(s,data)
r=c.fetchone()
print("Employee id : ",r[0])
print("Employee name : ",r[1])
print("Employee post : ",r[2])
print("Employee salary : ",r[3])
print("------------")
elif choice==2:
s="select * from employee;"
c.execute(s)
r=c.fetchall()
for i in r:
print("Employee id : ",i[0])
print("Employee name : ",i[1])
print("Employee post : ",i[2])
print("Employee salary : ",i[3])
else:
print("Invalid choice")
menu()
def menu():
print("-------Welcome to Payroll Management System------")
print(" Enter 1 to Add Employee")
print(" Enter 2 to Remove Employee")
print(" Enter 3 to Promote Employee")
print(" Enter 4 to Display Employee")
print(" Enter 5 to Exit")
choice=int(input("Enter your choice :"))
if choice==1:
add_emp()
elif choice==2:
remove_emp()
elif choice==3:
promote_emp()
elif choice==4:
display_emp()
elif choice==5:
print(“Thank you for visiting”)
exit()
else:
print("Invalid choice ,try again")
menu()
menu()
- OUTPUT -
BIBLIOGRAPHY

I. Books
1. Computer Science with Python – Preeti Arora
2. Computer Science with Python – Sumita Arora

II. Websites

1. www.geeksforgeeks.org
2. www.pypi.org
3. www.w3schools.com

You might also like