0% found this document useful (0 votes)
3 views

Cs Project Term2

The document outlines a project titled 'Employee Management System' submitted by Keshav for his computer science class. It includes a certification of guidance from teachers, acknowledgments, and a detailed description of the project's backend and frontend implementation using MySQL and Python. The project allows for employee registration, data display, searching, updating, and removal of employee records.

Uploaded by

anitanidhi5
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)
3 views

Cs Project Term2

The document outlines a project titled 'Employee Management System' submitted by Keshav for his computer science class. It includes a certification of guidance from teachers, acknowledgments, and a detailed description of the project's backend and frontend implementation using MySQL and Python. The project allows for employee registration, data display, searching, updating, and removal of employee records.

Uploaded by

anitanidhi5
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/ 18

COMPUTER SCIENCE

PROJECT

Employee
Management
System
NAME- Keshav
CLASS- XII B
ROLL NO.- 15
CERTIFICATE
This is to be certify that this project work is
submitted by Keshav to the computer
science department of Kendriya Vidyalaya
Sector-3, Rohini, Delhi-110085 was carried
out by them under the guidance &
supervision of Mrs. NEELIMA SINGH
during academic year 2021-2022.

Principal : Mrs. MITA


ADHIKARI Teacher : Mrs.
NEELIMA SINGH
(PGT Computer Science )
ACKNOWLEDGEM
ENT
I wish to express my deep gratitude and
sincere thanks to Mrs. MITA ADHIKARI
(Principal), Kendriya Vidyalaya Sec-3,
Rohini, for her encouragement and for all
the facilities that she provided for this
project work. I sincerely appreciate this
magnanimity by taking me into his fold for
which I shall remain indebted to her. I
extend my hearty thanks to Mrs. Neelima
Singh, (Computer Science Teacher) who
guided me in the successful completion of
this project.
I take this opportunity to express my deep
sense of gratitude for this invaluable
guidance, constant encouragement,
constructive comments which has
sustained my efforts at all stages of this
project.
I can’t forgot to offer my sincere thanks to my
classmates who helped me to carry out this
project work successfully & for their valuable
advice and support, which I received from
them time to time.

Keshav
ABOUT THE
PROJECT
This project is based on the
“System Of A Company To
Manage Employee Data”.
BackEnd (MySQL):
Database : company

Table Name : employee

Table Description :

FrontEnd (Python
IDLE):
Source Code:
import pymysql
con=pymysql.connect(host='localhost',user='root',password='24082003')
cur=con.cursor()
cur.execute('use company')
ch=0
while ch!=6:
print("1. Employee Registration\n2. Display all the data\n3. Search Employee\n4.
Update data\n5. Remove a data\n6. Exit")
print("_________________________________________________________")
ch=int(input("Enter Your Choice"))

print("====================================================
===")
if ch==1:
a=input("Enter Employee ID:")
b=input("Enter Employee Name:")
c=input("Enter Age:")
d=input("Enter Salary:")
e=input("Enter Date of Joining:")
f=input("Enter Post:")
reg="insert into employee values("+a+",'"+b+"',"+c+","+d+",'"+e+"','"+f+"')"
cur.execute(reg)
con.commit()
elif ch==2:
cur.execute('select* from employee')
d=cur.fetchall()
for i in d:
print(i)
elif ch==3:
f=input("Enter Field")
if f=='EmployeeID':
Empid=input("Enter Employee ID")
cur.execute("select* from employee where "+f+"="+Empid)
d=cur.fetchall()
for i in d:
print(i)
elif f=='Employee_Name':
Empname=input("Enter name")
cur.execute("select* from employee where "+f+"='"+Empname+"'")
d=cur.fetchall()
for i in d:
print(i)
elif f=='Age':
print("1.Age equals to\n2.Age greater than\n3.Age lower than")
c1=int(input("Enter choice"))
if c1==1:
age=input("Enter age")
cur.execute("select* from employee where "+f+"="+age)
d=cur.fetchall()
for i in d:
print(i)
elif c1==2:
age=input("Enter age")
cur.execute("select* from employee where "+f+">"+age)
d=cur.fetchall()
for i in d:
print(i)
elif c1==3:
age=input("Enter age")
cur.execute("select* from employee where "+f+"<"+age)
d=cur.fetchall()
for i in d:
print(i)
elif f=="Salary":
print("1.Salary equals to\n2.Salary greater than\n3.Salary lower than")
c1=int(input("Enter choice"))
if c1==1:
sal=input("Enter salary")
cur.execute("select* from employee where "+f+"="+sal)
d=cur.fetchall()
for i in d:
print(i)
elif c1==2:
sal=input("Enter salary")
cur.execute("select* from employee where "+f+">"+sal)
d=cur.fetchall()
for i in d:
print(i)
elif c1==3:
sal=input("Enter salary")
cur.execute("select* from employee where "+f+"<"+sal)
d=cur.fetchall()
for i in d:
print(i)
elif f=="Date_of_Joining":
print("1.Date of joining before given date\n2.Date of joining after given date\
n3.Date of joining between given dates")
c1=int(input("Enter choice"))
if c1==1:
dat=input("Enter date")
cur.execute("select* from employee where "+f+"<'"+dat+"'")
d=cur.fetchall()
for i in d:
print(i)
elif c1==2:
dat=input("Enter date")
cur.execute("select* from employee where "+f+">'"+dat+"'")
d=cur.fetchall()
for i in d:
print(i)
elif c1==3:
dat1=input("Enter Starting date")
dat2=input("Enter Ending date")
cur.execute("select* from employee where "+f+" between '"+dat1+"' and
'"+dat2+"'")
d=cur.fetchall()
for i in d:
print(i)
elif f=="Post":
post=input("Enter Post")
cur.execute("select* from employee where "+f+"='"+post+"'")
d=cur.fetchall()
for i in d:
print(i)
elif ch==4:
print("1.Update Employee ID\n2.Update Employee name\n3.update Age\
n4.Update Salary\n5.Update Date of joining\n6.Update Post")
cho=int(input("Enter Choice"))
if cho==1:
empid=input("Enter new empid")
name=input("Enter name of employee you want to update")
cur.execute("update employee set EmployeeID="+empid+" where
Employee_Name='"+name+"'")
con.commit()
elif cho==2:
empname=input("Enter new name")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Employee_Name='"+empname+"' where
EmployeeID="+empid)
con.commit()
elif cho==3:
age=input("Enter new age")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Age="+age+" where
EmployeeID="+empid)
con.commit()
elif cho==4:
print("1.Increase Salary\n2.Decrease Salary")
ch1=int(input("Enter Choice"))
if ch1==1:
sal=input("How much salary you want to increase")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Salary=Salary+"+sal+" where
EmployeeID="+empid)
con.commit()
elif ch1==2:
sal=input("How much salary you wnat to decrease")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Salary=Salary-"+sal+" where
EmployeeID="+empid)
con.commit()
elif cho==5:
dat=input("Enter new date of joining")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Date_of_Joining='"+dat+"' where
EmployeeID="+empid)
con.commit()
elif cho==6:
post=input("Enter new post")
empid=input("Enter ID of the employee you want to update")
cur.execute("update employee set Post='"+post+"' where
EmployeeID="+empid)
con.commit()
elif ch==5:
empid=input("Enter employee id")
cur.execute("delete from employee where EmployeeID="+empid)
con.close()

OUTPUT:
>>>
= RESTART: C:\Users\Lenovo\AppData\Local\Programs\Python\Python39\
term2project.py
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice1
===================================================
====
Enter Employee ID:5
Enter Employee Name:Nikhil
Enter Age:21
Enter Salary:25000
Enter Date of Joining:2022/02/07
Enter Post:accountant
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice2
===================================================
====
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
(3, 'Gorav', 29, 19000, datetime.date(2021, 8, 12), 'manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldEmployeeID
Enter Employee ID4
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldEmployee_Name
Enter nameKeshav
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldAge
1.Age equals to
2.Age greater than
3.Age lower than
Enter choice1
Enter age21
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldAge
1.Age equals to
2.Age greater than
3.Age lower than
Enter choice2
Enter age20
(3, 'Gorav', 29, 19000, datetime.date(2021, 8, 12), 'manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldAge
1.Age equals to
2.Age greater than
3.Age lower than
Enter choice3
Enter age25
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldSalary
1.Salary equals to
2.Salary greater than
3.Salary lower than
Enter choice1
Enter salary18000
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldSalary
1.Salary equals to
2.Salary greater than
3.Salary lower than
Enter choice2
Enter salary20000
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldSalary
1.Salary equals to
2.Salary greater than
3.Salary lower than
Enter choice3
Enter salary19000
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldDate_of_Joining
1.Date of joining before given date
2.Date of joining after given date
3.Date of joining between given dates
Enter choice1
Enter date2022/01/01
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
(3, 'Gorav', 29, 19000, datetime.date(2021, 8, 12), 'manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldDate_of_Joining
1.Date of joining before given date
2.Date of joining after given date
3.Date of joining between given dates
Enter choice2
Enter date2021/12/31
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldDate_of_Joining
1.Date of joining before given date
2.Date of joining after given date
3.Date of joining between given dates
Enter choice3
Enter Starting date2021/11/01
Enter Ending date2022/03/31
(2, 'Sourav', 20, 18000, datetime.date(2022, 1, 1), 'senior manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
(5, 'Nikhil', 21, 25000, datetime.date(2022, 2, 7), 'accountant')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice3
===================================================
====
Enter FieldPost
Enter Postmanager
(1, 'Keshav', 18, 16000, datetime.date(2021, 8, 21), 'manager')
(3, 'Gorav', 29, 19000, datetime.date(2021, 8, 12), 'manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit

_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice1
Enter new empid6
Enter name of employee you want to updateNikhil
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice2
Enter new nameSunny Raj Singh
Enter ID of the employee you want to update2
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice3
Enter new age25
Enter ID of the employee you want to update1
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice4
1.Increase Salary
2.Decrease Salary
Enter Choice1
How much salary you want to increase3000
Enter ID of the employee you want to update1
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice4
1.Increase Salary
2.Decrease Salary
Enter Choice2
How much salary you wnat to decrease10000
Enter ID of the employee you want to update5
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice5
Enter new date of joining2021/10/31
Enter ID of the employee you want to update3
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice4
===================================================
====
1.Update Employee ID
2.Update Employee name
3.update Age
4.Update Salary
5.Update Date of joining
6.Update Post
Enter Choice6
Enter new posthead manager
Enter ID of the employee you want to update4
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice5
===================================================
====
Enter employee id6
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice2
===================================================
====
(1, 'Keshav', 25, 19000, datetime.date(2021, 8, 21), 'manager')
(2, 'Sunny Raj Singh', 20, 18000, datetime.date(2022, 1, 1), 'senior
manager')
(3, 'Gorav', 29, 19000, datetime.date(2021, 10, 31), 'manager')
(4, 'Shivam', 23, 19000, datetime.date(2021, 12, 31), 'head manager')
1. Employee Registration
2. Display all the data
3. Search Employee
4. Update data
5. Remove a data
6. Exit
_________________________________________________________
Enter Your Choice6
===================================================
====
>>>
BIBLIOGRAPH
Y
~NCERT Computer Science textbook for
class XII

You might also like