👨💻
CS
Project
Employee Management
System
— ռɨȶɨռ
Certificate
This is to certify that Master Nitin Bhatt, of
Class 12th has successfully completed
their Computer Science project on “Employee
Managemen System” under the
guidance of “Mrs. Seema kumar” as
required according to the syllabus
prescribed by the CBSE for the academic
session 2023-2024.
Sign of Internal Examiner
______________ ..
1
Acknowledgement
I would like to express a deep sense of thanks
and gratitude to my project guide and
teacher “Mrs. Seema Kumar” for guiding me
immensely through the course of the project.
She always evinced keen interest in my
project. Her constructive advice & constant
motivation have been responsible for the
successful completion of his project.
I must thank my classmates for their timely help
and support for completion of this project.
Last but not the least, I would like to thank all
those who had helped me directly or indirectly in
the completion of this project.
2
Index
S. No. Description Page No.
1. Certificate 01
2. Acknowledgement 02
3. Index 03
4. Introduction 04
5. Objective 05
6. SDLC (System Development Life 06
Cycle)
7. System Requirements 10
8. Source Code 11
9. Output Screen 17
10. Testing Phase 22
11. Bibliography 24
3
Introduction
The “Employee Management System” is a software application that helps
companies and organizations manage their employee's information,
attendance, leaves, payroll, and performance. The goal of this project is to
design and develop an employee management system using Python and
MySQL, which will provide an easy and efficient way for
companies/employers to manage their employees.
The employee management system will include the following features:
❖ Employee Information Management: Add, update, and delete
employee information, such as name, address, contact details, etc.
❖ Attendance Management: Track and manage employee attendance
records. Generate reports on attendance and absenteeism.
❖ Leave Management: Track and manage employee leave balances.
❖ Payroll Management: Calculate and manage employee salaries and
benefits. Generate payslips and tax reports.
❖ Performance Management: Manage employee performance
evaluations.
❖ Reporting and Analytics: Generate reports on employee information,
attendance, leave, payroll, and performance.
Provide analytics and insights into employee data.
4
Objective
The objective of this project is to provide students with an
opportunity to apply their programming knowledge into a
practical usage, real-world problem. By developing an employee
management system using Python and MySQL, this project aims to
demonstrate how programming skills can ease our work by the means of
good software.
Additionally, this project aims to achieve the following objectives:
❖ Write programs utilizing modern software tools.
❖ Apply object-oriented programming principles effectively when
developing small to medium-sized projects.
❖ Write effective procedural code to solve small to medium-sized
problems.
❖ Demonstrate a breadth of knowledge in Computer Science, as
exemplified in the areas of systems, theory, and software development.
❖ Demonstrate the ability to conduct research or an applied computer
science project, requiring writing and presentation skills that exemplify
scholarly style in Computer Science.
❖ Develop project management skills by planning, organizing and
executing a software development project, including defining project
scope, requirements, milestones, deliverables, and timelines.
By achieving these objectives, students will develop a better understanding
of Computer Science principles and gain practical experience in software
development.
5
SDLC
(System Development
Life Cycle)
The System Development Life Cycle (SDLC) is a process used to design,
develop, and maintain information systems. It is a framework that describes
the stages involved in the development of software. The SDLC aims to
produce high-quality software that meets or exceeds customer expectations,
reaches completion within times and cost estimates, and works effectively
and efficiently in the current and planned information technology
infrastructure.
The SDLC process is a structured approach to software development that
consists of several phases, each with its own set of activities and
deliverables. The phases of the SDLC include planning, analysis, design,
implementation, and maintenance.
The SDLC model is a cycle, with each phase feeding into the next, and the
entire process is iterative, meaning that each phase may be revisited multiple
times until the desired outcome is achieved.
6
The SDLC is based on the idea that software development is a complex
process that requires careful planning and execution to be successful. By
breaking the development process down into phases, the SDLC provides a
roadmap for developers, ensuring that they cover all necessary steps, from
understanding the user's needs to testing the final product before
deployment.
The SDLC is an iterative process, which means that each phase may be
revisited multiple times until the desired outcome is achieved. This approach
allows developers to refine their work and make any necessary changes as
they go, rather than waiting until the end of the process to make
adjustments.
The SDLC is a process-oriented approach to software development that
emphasizes the importance of documentation, testing, and quality
assurance. It is based on the principles of project management, which
include planning, organizing, and controlling resources to achieve specific
goals. The SDLC is also concerned with risk management, as it aims to
identify and mitigate potential risks throughout the development process.
One of the key benefits of the SDLC is that it provides a common language
and framework for developers, project managers, and stakeholders to
communicate and collaborate effectively. By using a standardized process,
all parties involved in the development process can understand what is
expected of them and what they can expect from others.
In summary, the SDLC is a framework for developing software that guides
developers through the process of creating high-quality software that meets
customer needs and works effectively in the current and planned information
technology infrastructure. It is a structured approach that emphasizes
documentation, testing, and quality assurance, and is based on the principles
of project management. The SDLC is an iterative process that allows for
refinement and risk management, and provides a common language and
framework for developers, project managers, and stakeholders to
communicate effectively.
7
Phases of SDLC
The SDLC is a process-oriented approach to software development that
consists of several phases, each with its own set of activities and
deliverables. The phases of the SDLC include planning, analysis, design,
implementation, and maintenance.
❖ Planning: The planning phase is the first phase of the SDLC and
involves defining the scope of the project, identifying goals and
objectives, and determining the resources required. During this phase,
the project team creates a project plan, which outlines the project's
objectives, deliverables, timelines, and budget.
❖ Analysis: The analysis phase involves gathering and analyzing
information about the current system or process. During this phase, the
project team identifies user requirements, constraints, and
opportunities for improvement. They also develop a functional
specification, which describes the system's functions and features.
❖ Design: The design phase involves creating a detailed design for the
system. During this phase, the project team develops a technical
specification, which describes the system's architecture, data
structures, algorithms, and interfaces. They also create a user interface
design, which describes the system's look and feel.
8
❖ Implementation: The implementation phase involves
coding, testing, and integrating the system components.
During this phase, the project team develops the software, tests
it to ensure that it meets the functional and technical specifications,
and integrates it with other systems as required.
❖ Maintenance: The maintenance phase involves maintaining and
enhancing the system over time. During this phase, the project team
provides ongoing support for the system, fixes any defects that arise,
and makes enhancements to the system as required to meet changing
user needs.
In summary, the SDLC consists of several phases, each with its own set of
activities and deliverables. The planning phase involves defining the scope of
the project, the analysis phase involves gathering and analyzing information
about the current system or process, the design phase involves creating a
detailed design for the system, the implementation phase involves coding,
testing, and integrating the system components, and the maintenance phase
involves maintaining and enhancing the system over time.
9
System
Requirements
To use the Employee Management System developed in this project, the
following minimum hardware and software requirements must be met to
ensure a smooth experience:
Hardware Requirements:
❖ Processor: 1 GHz or faster
❖ RAM: 1 GB or more
❖ Hard Disk: 10 GB or more of free space
Software Requirements:
❖ Operating System: Windows 7 or later, or macOS 10.9
or later
❖ Python: Version 3.x.x (e.g. 3.6.5, 3.7.2, etc.) installed and configured
❖ MySQL: Version 5.6 or later installed and configured
❖ Python Libraries: mysql-connector-python.
Note: It is recommended to install the latest versions of Python and MySQL
to ensure compatibility with the project.
10
Source Code
# Cosmetic Shop MySQL interface with Python
# Made by Nitin Bhatt and Ronit Yadav
# Table Creation
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='manager'
,database='employees')
cur = conn.cursor()
#cur.execute('create table user_table(username varchar(25)
primary key,passwrd varchar(25) not null )')
print('========================= WELCOME TO START EMPLOYEE
MANAGEMENT SYSTEM
============================================================')
import datetime as dt
print(dt.datetime.now())
print('1.REGISTER')
print()
print('2.LOGIN')
print()
n=int(input('enter your choice='))
print()
if n== 1:
name=input('Enter a Username=')
print()
passwd=int(input('Enter a 4 DIGIT Password='))
print()
V_SQLInsert="INSERT INTO log_id (user_id,password) values
(" + str (passwd) + ",' " + name + " ') "
cur.execute(V_SQLInsert)
conn.commit()
print()
print('USER created succesfully')
import mainp
11
if n==2 :
name=input('Enter your Username=')
print()
passwd=int(input('Enter your 4 DIGIT Password='))
V_Sql_Sel="select * from log_id where password='"+str
(passwd) +"' and user_id= ' " +name+ " ' )"
cur.execute(V_Sql_Sel)
if cur.fetchall() is None:
print()
print('Invalid username or password')
else:
print()
import mainp
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# MAINP.PY FILE #
import time
print ("\t\t\t",time.ctime())
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manage
r',dat abase='employees')
mycursor=conn.cursor()
def menu():
print("EMPLOYEES MANAGEMENT SYSTEM")
c='yes'
c=input("do you want to continue or not(yes or No):")
while(c=='yes'):
print("1.login")
print("2.employee registeration")
print("3.employee details")
print("4.update salary")
print("5.employees list")
print("6.know the number of employees")
print("7.work experience")
print("8.know your salary")
print("exiting")
12
choice=int(input(" enter the choice: "))
if choice==1:
login()
elif choice==2:
register()
elif choice==3:
details()
elif choice==4:
em_salary()
elif choice==5:
em_list()
elif choice==6:
em_count()
elif choice==7:
em_perform()
elif choice==8:
salary()
else:
print ("exit")
break
else:
print("Thank You")
def login():
import sys
user_id=input("enter USER ID :")
pwd=int(input("enter the password :"))
if user_id == 'vishal'and pwd == 6054:
print("welcome to EMPLOYEE MANAGEMENT SYSTEM ")
else:
print("invalid user id and password")
sys.exit()
def register():
import mysql.connector as sql
conn = sql.connect(host = 'localhost', user='root',
password='manager', dat abase='employees')
mycursor=conn.cursor()
13
v_em_no=int(input("enter your employee ID"))
v_em_name=input ("enter your name:")
v_em_dept=input( "enter department you want to join : ")
v_em_salary=input ("enter your salary:")
v_em_age=int(input("enter your age:"))
v_sql_insert="insert into office
values("+int(v_em_no)+",'" +v_em_name+ "','"+v_em_dept+ "',"+
str(v_em_salary)+","+str(v_em_age)+")"
mycursor.execute(v_sql_insert)
conn.commit()
print("congrats you have joined suuceessfully")
print(" registerd suyccessfully ")
def details():
import mysql.connector as sql
conn = sql.connect(host='localhost', user='root',
password='manager', database='employees')
mycursor=conn.cursor()
mycursor.execute("select* from OFFICE")
results=mycursor.fetchall()
conn.commit()
for x in results:
print(x)
def em_salary():
import mysql.connector as sql
conn=sql.connect(host='localhost', user='root',
password='manager', database='employees')
mycursor=conn.cursor()
nam=input("enter your name")
mycursor.execute("update office set
em_salary=em_salary+em_salary*10/100 where
em_name='{}'".format(nam))
conn.commit()
def em_list():
import mysql.connector as sql
try:
14
conn=sql.connect(host='localhost', user='root',
password='manager', database='employees')
mycursor=conn.cursor()
mycursor.execute("select em_name from office order by
em_name asc")
list_=mycursor.fetchall()
for x in list_:
print (x)
a=mycursor.rowcount()
print("total employees are",a)
except:
print ("unable to show the list")
def em_count():
import mysql.connector as sql
conn=sql.connect(host='localhost', user='root',
password='manager', database='employees')
mycursor=conn.cursor()
mycursor.execute("select count(distinct em_name) from
office")
count=mycursor.fetchall()
for x in count:
print(" numbr of employees:",x)
conn.commit()
def salary():
nam=input("enter your name :")
a=mycursor.execute("select em_salary from office where
em_name='{}'".format(nam))
mycursor.execute(a)
salary=mycursor.fetchall()
for x in salary:
print( x,"is your current salary",nam )
conn.commit()
def em_perform():
v_em_no=int(input("enter your employee ID"))
v_em_name=input ("enter your name:")
15
v_em_dept=input( "enter department you want to join : ")
v_em_performance=input("enter your performance:")
v_em_work=input ("enter your experience(YEARS):")
v_sql_insert="insert into em_performance
values("+str(v_em_no)+",'" +v_em_name+"', '"+v_em_dept+"',
'"+v_em_performance+"', "+str(v_em_work)+")"
print(v_sql_insert)
mycursor.execute(v_sql_insert)
conn.commit()
print("performance added")
menu()
16
Output
Screen 1
17
Screen 2
18
Screen 3
19
Screen 4
20
Screen 5
21
Testing Phase
Software Testing is an empirical investigation conducted to provide
stakeholders with information about the quality of the product or service
under test, with respect to the context in which it is intended to operate.
Software Testing also provides an objective, independent view of the
software to allow the business to appreciate and understand the risks at
implementation of the software. Test techniques include, but are not limited
to, the process of executing a program or application with the intent of
finding software bugs.
It can also be stated as the process of validating and verifying that a
software program/application/product meets the business and technical
requirements that guided its design and development, so that it works as
expected and can be implemented with the same characteristics. Software
Testing, depending on the testing method employed, can be implemented at
any time in the development process, however the most test effort is
employed after the requirements have been defined and coding process has
been completed.
Testing Methods
Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of
view that a test engineer takes when designing test cases.
Black Box Testing
Black box testing treats the software as a "black box," without any
knowledge of internal implementation. Black box testing methods include:
equivalence partitioning, boundary value analysis, all-pairs testing, fuzz
testing, model-based testing, traceability matrix, exploratory testing and
specification-based testing.
Specification-based Testing
Specification-based testing aims to test the functionality of software
according to the applicable requirements.[16] Thus, the tester inputs data
into, and only sees the output from, the test object. This level of testing
usually requires thorough test cases to be provided to the tester, who then
can simply verify that for a given input, the output value (or behaviour),
either "is" or "is not" the same as the expected value specified in the test
22
case. Specification-based testing is necessary, but it is insufficient to guard
against certain risks.
Advantages and disadvantages
The black box tester has no "bonds" with the code, and a tester's perception
is very simple: a code must have bugs. Using the principle, "Ask and you shall
receive," black box testers find bugs where programmers don't. But, on the
other hand, black box testing has been said to be "like a walk in a dark
labyrinth without a flashlight," because the tester doesn't know how the
software being tested was actually constructed.
That's why there are situations when (1) a black box tester writes many test
cases to check something that can be tested by only one test case, and/or (2)
some parts of the back end are not tested at all. Therefore, black box testing
has the advantage of "an unaffiliated opinion," on the one hand, and the
disadvantage of "blind exploring," on the other.
White Box Testing
White box testing, by contrast to black box testing, is when the tester has
access to the internal data structures and algorithms (and the code that
implement these)
Type of white box testing :
The following types of white box testing exist:
➢ Api testing - Testing of the application using Public and Private APIs.
➢ Code coverage - creating tests to satisfy some criteria of code
coverage. For example, the test designer can create tests to cause all
statements in the program to be executed at least once.
➢ Fault Injection methods.
➢ Mutation testing methods.
➢ Static testing - White box testing includes all static testing.
Code Completeness Evaluation
White box testing methods can also be used to evaluate the completeness of
a test suite that was created with black box testing methods. This allows the
software team to examine parts of a system that are rarely tested and
ensures that the most important function points have been tested.
Two common forms of code coverage are:
➢ Function Coverage: Which reports on functions executed and
➢ Statement Coverage: Which reports on the number of lines executed
to complete the test.
They both return coverage metric, measured as a percentage.
23
Bibliography
➢ Computer Science with Python Class
XII by Sumita Arora
➢ NCERT Computer Science Textbook
Class XII
➢ Official Python Documentation,
https://docs.python.org/3/
➢ Official MySQL Documentation,
https://dev.mysql.com/doc/
➢ Programiz,
https://www.programiz.com/
24
Thank You
for your time!
25