DOC Modify
DOC Modify
XII - B
Roll No. -:
S. NO TITLE PAGES
1. Main Characteristics of EMPLOYEE 3
MANAGEMENT SYSTEM
2. System Requirements 4
3. Python 5-6
4. MySQL 7-9
6. Output 33-34
Bonafide Certificate
This is a bonafide record of the project done by Sahil kumar
Employee Management System Submitted in partial fulfillment
of the requirement for the practical Examination for the XII - A
in the academic year of 2024-2025
INTERNALEXAMINER EXTERNALEXAMINER
ACKNOWLEDGMENT
We would like to express our special thanks of gratitude to our
teacher Dr. MITALI BANSAL as well as our
principal Mr. VIKRAM YADAV who gave us the golden
opportunity to do this wonderful project on the topic Employee
Management System which also help us in doing a lot of
research and came to know about so many new things we are
really thankful to them.
Secondly we would also like to thank our gods, parents and
friends who helped us a lot in finalizing this project within the
limited time framed.
SYSTEM REQUIREMENT
HARDWARE REQUIREMENT:
• Processor: Intel(R),Pentium®N3540,@2.16GHz
• Memory(RAM):4.00GB
• Hard Disk:1TB
Software requirement:
• Python language:IDLE(Python3.7)
• Database connector:MySQL
• OperatingSystem:windows7,
Andriod 10
PYTHON
• Python is an interpreted, object-oriented, high- level programming
language with dynamic semantics.
• Its high-level built in data structures, combined with dynamic typing
and dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to
connect existing components together.
Once you have chosen and downloaded an installer, simply run it by double-
clicking on the downloaded file. A dialog should appear that looks something
like this:
Mysql
def selection():
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
cursor= db.cursor()
print('.........................\nWELCOME TO OFFICE MANAGEMENT SYSTEM\n ')
print("1.EMPLOYEE MANAGEMENT")
print("2.SALARY MANAGEMENT")
ch=int(input("\nEnter ur choice (1-2) : "))
if ch==1:
print('\nWELCOME TO EMPLOYEE MANAGEMENT SYSTEM\n')
print('a.NEW EMPLOYEE')
print('b.UPDATE STAFF DETAILS')
print('c.DELETE DETAILS')
c=input("Enter ur choice (a-c) : ")
print('\nInitially the details are..\n')
display1()
if c=='a':
insert1()
print('\nModified details are..\n')
display1()
elif c=='b':
update1()
print('\nModified details are..\n')
display1()
elif c=='c':
delete1()
print('\nModified details are..\n')
display1()
else:
print('Enter correct choice !!')
elif ch==2:
print('\nWELCOME TO SALARY MANAGEMENT SYSTEM\n')
print('a.NEW SALARY')
print('b.UPDATE SALARY DETAILS')
print('c.DELETE DETAILS')
c=input("Enter ur choice (a-c) : ")
print('\nInitially the details are..\n')
display2()
if c=='a':
insert2()
print('\nModified details are..\n')
display2()
elif c=='b':
update2()
print('\nModified details are..\n')
display2()
elif c=='c':
delete2()
print('\nModified details are..\n')
display2()
else:
print('Enter correct choice !!')
def insert1():
empno=int(input("Enter Employee No : "))
ename=input("Enter Employee Name : ")
job=input("Enter Designation: ")
hiredate=input("Enter date of joining : ")
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
print('bob')
cursor = db.cursor()
print('cob')
cursor.execute('insert into emp values(%s,%s,%s,%s)',(empno,ename,job,hiredate))
print('yes')
print()
db.commit()
print('hot')
print()
db.close()
def display1():
try:
db=mysql.connector.connect(user='root', password='12345',host='localhost',database='length')
cursor = db.cursor()
ijk = "SELECT * FROM emp"
cursor.execute(ijk)
results= cursor.fetchall()
for c in results:
empno=c[0]
ename=c[1]
job=c[2]
hiredate=c[3]
print("(empno=%d,ename=%s,job=%s,hiredate=%s)" % (empno,ename,job,hiredate)
except:
print ("Error: unable to fetch data")
db.close()
def update1():
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
print(db)
cursor=db.cursor()
print(cursor)
etc= " SELECT * FROM emp"
cursor.execute(etc)
results= cursor.fetchall()
for c in results:
empno=c[0]
ename=c[1]
job=c[2]
hiredate=c[3]
tempst=int(input("Enter Employee No : "))
temp=input ("Enter new Designation: ")
try:
etc= "Update emp set job=%s where empno='%d'" % (temp,tempst)
cursor.execute(etc)
db.commit()
except Exception as e:
print (e)
db.close()
def delete1():
try:
db=mysql.connector.connect(user='root', password='12345',host='localhost',database='last')
print(db)
cursor= db.cursor()
print(cursor)
rts= "SELECT * FROM emp"
cursor.execute(rts)
results = cursor.fetchall()
for c in results:
empno=c[0]
ename=c[1]
job=c[2]
hiredate=c[3]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter emp no to be deleted : "))
try:
ghi= " delete from emp where empno='%d'" % (temp)
ans=input("Are you sure you want delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(ghi)
db.commit()
except Exception as e:
print(e)
db.close()
def insert2():
empno=int(input("Enter Employee No : "))
hiredate=input("Enter date of salary : ")
salary=int(input("Enter salary: "))
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
print('bob')
cursor = db.cursor()
print('cob')
cursor.execute('insert into salary values(%s,%s,%s)',(empno,hiredate,salary))
print('yes')
print()
db.commit()
print('hot')
print()
db.close()
def display2():
try:
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
cursor = db.cursor()
ijk = "SELECT * FROM salary"
cursor.execute(ijk)
results= cursor.fetchall()
for c in results:
empno=c[0]
hiredate=c[1]
salary=c[2]
print("(empno=%d,hiredate=%s,salary=%d)" % (empno,hiredate,salary))
except:
print ("Error: unable to fetch data")
db.close()
def update2():
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
print(db)
cursor=db.cursor()
print(cursor)
etc= " SELECT * FROM salary"
cursor.execute(etc)
results= cursor.fetchall()
for c in results:
empno=c[0]
hiredate=c[1]
salary=c[2]
tempst=int(input("Enter Employee No : "))
temp=input ("Enter new salary: ")
try:
etc= "Update salary set salary=%s where empno='%d'" % (temp,tempst)
cursor.execute(etc)
db.commit()
except Exception as e:
print (e)
db.close()
def delete2():
try:
db=mysql.connector.connect(user='root',password='12345',host='localhost',database='length')
print(db)
cursor= db.cursor()
print(cursor)
rts= "SELECT * FROM salary"
cursor.execute(rts)
results = cursor.fetchall()
for c in results:
empno=c[0]
hiredate=c[1]
salary=c[2]
except:
print ("Error: unable to fetch data")
temp=int(input("\nEnter salary no to be deleted : "))
try:
ghi= " delete from salary where empno='%d'" % (temp)
ans=input("Are you sure you want delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(ghi)
db.commit()
except Exception as e:
print(e)
db.close()
selection()
The Employee Management
DBMS: MySQL
Host: localhost
User: root
Password: 12345
DataBase: length
Table Structure: As per the Screenshot
Table:Salary
OUTPUT:
EMPLOYEE DETAILS
1.INSERT DETAILS
2.UPDATE DETAILS
3.DELETE DETAILS
SALARY DETAILS
1.INSERT DETAILS
2.UPDATE DETAILS
3.DELETE DETAILS
Thanking
Thank you for spending your precious time for the Project