Professional Documents
Culture Documents
2. Certificate 2
3. Index 3
4. Acknowledgement 4
4. Coding 6
6. Output 14
7. 17
Application of the
Project
8. Bibliography 18
1
ACKNOWLEDGEMENT
I would like to thank Mrs. Jayna Ma’am
who gave me a golden Opportunity to
work on this project. I’d also like to
Express my gratitude to my school
Principal Sadhana Ma’am
wholeheartedly
I must also thank my parents and
friends for the immense support
and help during this project.
2
FRONTEND AND BACKEND TOOLS
In a computer program/project dedicated for
a specific purpose, we broadly have two parts
or “ends”, the Frontend and the Backend.
3
CODING
#setting Cursor
mycursor=myconnection.cursor()
#setting Autocommit
myconnection.autocommit=True
#creating Database
mycursor.execute("create database employees")
4
mycursor=myconnection.cursor()
val_emp_no=int(input("Enter employees ID- "))
val_emp_name=str(input("Enter employees
Name- ")) val_emp_dept=input("Enter
Department you want to join- ")
val_emp_salary=input("Enter your salary- ")
val_emp_age=input("Enter your Age- ")
insert_query="insert into tab_emp_details values
("+str(val_emp_no)+",'"+val_emp_name+"','"+val_emp_dept+"',"+str(va
l_emp_salary)+","+str(val_emp_age)+")"
mycursor.execute(insert_query)
myconnection.commit()
print()
print("~~~~~~~~~~~~~~~~~~)
print("Welcome to The
Organisation. ")
print(" Your Registration is
Complete")
print("~~~~~~~~~~~~~")
print()
5
myconnection.commit()
print()
print("~~~~~~~~~~~~~~~~~~~~")
print(" All Information Of All employees. ")
print(" employees ID, employees Name,
Department, Salary, Age ")
for emp in results:
print(emp)
\\\\ print("~~~~~~~~~~~~~~~~~~~~")
print()
Def
update_salary_of_selected():
myconnection = myconnector.connect (host="localhost",
user="root", passwd=" samyak ",database="employees")
mycursor=myconnection.cursor()
name=input("Enter your name: ")
newsalary=input("Enter new Salary: ")
mycursor.execute("update tab_emp_details set
emp_salary='"+newsalary+"' wher
emp_name='{}'".format(name))
myconnection.commit()
6
#4. Display employees Names
Alphabetically def
disp_emp_name_sorted():
myconnection = myconnector.connect
(host="localhost",user="root",passwd="samyak",database="
employees")
mycursor=myconnection.cursor()
mycursor.execute
("select emp_name from tab_emp_details order by
emp_name asc")
enames=mycursor.fetchall()
print()
print("~~~~~~~~~~~~~~~~~~~~")
print(" employees Names in
Sorted Order. ")
for ename in enames:
print(ename)
print("~~~~~~~~~~~~~~~~~~~~")
7
print("~~~~~~~~~~~~~~~~
~~~~") for x in count:
print(" Total number of registered
employees are: ",x)
print("~~~~~~~~~~~~~~~~~~~~")
print()
def
disp_salary_of_selected_emp()
:
myconnection = myconnector.connect
(host="localhost", user="root", passwd=" samyak "
,database="employees")
mycursor=myconnection.cursor()
mycursor=myconnection.cursor()
name=input("Enter your Name: ")
mycursor.execute
("select emp_salary from tab_emp_details where
emp_name='{}'".format(name))
salary=mycursor.fetchall()
print()
print("~~~~~~~~~~~~~~~~
~~~~") for s in salary:
print(name," Your salary is ",s)
myconnection.commit()
print("~~~~~~~~~~~~~")
print()
8
#7. To display the department of a particular employees
def
disp_dept_of_selected_emp():
myconnection = myconnector.connect(host="localhost",
user="root", passwd=" samyak ", database="employees")
mycursor=myconnection.cursor()
name=input("Enter your Name- ")
mycursor.execute("select emp_dept from tab_emp_details
where emp_name='{}'".format(name))
department=mycursor.fetchall()
print()
print("~~~~~~~~~~~~~~")
for d in department:
print(name," Your Department is- ",d)
print("~~~~~~~~~~~~~~~~~~~~")
print()
def menu():
print("employees
MANAGEMENT SYSTEM")
C="yes"
c=input("Do you want to Continue? ")
while c.lower()=="yes":
print("1. employees Registration.")
print("2. Show Details of all
employees.")
print("3. Update salary of a specified
employees.")
9
print("4. Display employees Names in
a Sorted Order.")
print("5. Count total Number of
employees.")
print("6. Display Salary of the Selected
employees.")
print("7. Display department of the
Selected employees.")
print("8. EXIT.")
if choice==1:
register_emp()
elif choice==2:
disp_all_details()
elif choice==3:
update_salary_of_selecte
d() elif choice==4:
disp_emp_name_sorte
d() elif choice==5:
count_reg_emp()
elif choice==6:
disp_salary_of_selected_e
mp() elif choice==7:
10
disp_dept_of_selected_em
p() else:
print("EXIT")
break
else:
print("BYE!! Thanks for Using the system. ")
menu()
11
OUTPUT
Main Menu
––
12
TOTAL REGISTERED EMPLOYEE
13
Salary of Selected Employee
14
APPLICATIONS OF PROJECT
An employee management program has the following
applications along with many others:
15
BIBLIOGRAPHY
~ www.compstudio.com
~ www.learnpython.org
~ YouTube Channel
~ Introduction to Python Programming by Sumita
Arora Book
THANK YOU
16