0% found this document useful (0 votes)
7 views24 pages

Ip Project (Sid)

Uploaded by

Siddharth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views24 pages

Ip Project (Sid)

Uploaded by

Siddharth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Employee Salaries Database Jan/Feb 2025

A PROJECT REPORT

ON

EMPLOYEE SALARIES MANAGEMENT SYSTEM


FOR
AISSCE 2025 EXAMINATION
As a part of the Informatics Practices Course (065)

SUBMITTED BY:

Name of the Student Hall ticket Number


1) Siddharth P Sharma
2) Kalidas.A

Under the guidance of

Mr.SivaPrasad G

PGT in Informatics Practices

DEPARTMENT OF INFORMATICS PRACTICES

SRI CHAITANYA TECHNO SCHOOL


Kothanur Dinne Main Road, Near Bus Stop 8th Phase, JP Nagar, Jumbo Sawari, Dinne,
Bengaluru, Karnataka 560078
Page 1
Employee Salaries Database Jan/Feb 2025

ACKNOWLEDGEMENT

I would like to thank the institution for giving the opportunity to showcase
and display my talent through this project.

I would like to thank my Informatics Practices teacher Mr.SivaPrasad G


for having the patience to guide me at every step in the project

I am also grateful to the CBSE BOARD for challenging me and giving me


this project in which I was so engrossed.

I would also like to thank my parents and friends who helped and supported
me in getting the right information to complete this project.

Page 2
Employee Salaries Database Jan/Feb 2025

TABLE OF CONTENTS

Sl.No Topic Name Page No

1. Abstract 5
2. System requirements 6
3. Database design 7
4. Coding 8
5. Output screens 14
6. Bibliography 24

Page 3
Employee Salaries Database Jan/Feb 2025

ABSTRACT

In this project, I integrated Python with SQL to manage and analyze


data in the "Salary" table. This project emphasized the seamless
connection between Python and Databases (SQL) using libraries like
‘pymysql’. The following SQL operations were performed:
1. Insert Records
2. Display Specific Row
3. Display All Details
4. Update Records
5. Delete Records
6. Graphical Representation
A key feature was dynamically selecting and displaying specific
rows based on user-defined criteria. This involved executing targeted
queries and presenting results in a user-friendly format.
This project enhanced my understanding of Python and SQL
integration while showcasing data visualization's potential for
deriving actionable insights. It reinforced the importance of efficient
database management in modern applications.

Page 4
Employee Salaries Database Jan/Feb 2025

.SYSTEM REQUIREMENTS

Hardware Components

1. VGA Monitor

2 .Qwerty keyboard

3. 2GB RAM

4. 2.6 GHz Processor

5. Graphics card

Software Components

1. Windows 7

2. Python 3.7 with suitable modules

3. MySQL Command Client

Page 5
Employee Salaries Database Jan/Feb 2025

DATABASE DESIGN

In the following “salary” table, we will store the details of


all employees.

Page 6
Employee Salaries Database Jan/Feb 2025

CODING
while(True):

print('1.insert')

print('2.Search specific')

print('3.Display')

print('4.Update')

print('5.Delete')

print('6.Graph')

print('7.Exit')

print()

ch=int(input('Enter your choice: '))

if(ch==1):

import pymysql

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

empid=int(input('Enter empid: '))

name=input('Enter Name: ')

sal=float(input('Enter salary: '))

s='insert into salary values('+str(empid)+',"'+name+'",'+str(sal)+');'

a.execute(s)

Page 7
Employee Salaries Database Jan/Feb 2025

print('one row inserted successfully: ')

conn.commit()

conn.close()

print()

elif(ch==2):

import pymysql

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

empid=int(input('Enter empid of employee to search: '))

s='select * from salary where empid='+str(empid)

a.execute(s)

data=a.fetchall()

if(len(data)==0):

print('Student roll number',empid,'doesnot exists')

else:

print('Employee empid=',empid)

print('Employee Name=',data[0][1])

print('Employee Salary=',data[0][2])

conn.commit()

print()

elif(ch==3):

Page 8
Employee Salaries Database Jan/Feb 2025

import pymysql

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

s='select *from salary'

a.execute(s)

data=a.fetchall()

for i in data:

for j in i:

print(j,end=' ')

print()

conn.commit()

print()

elif(ch==4):

import pymysql

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

empid=int(input('Enter empid of employee to update: '))

s='select *from salary where empid='+str(empid)

a.execute(s)

data=a.fetchall()

Page 9
Employee Salaries Database Jan/Feb 2025

if(len(data)==0):

print('Employee empid',empid,'doesnot exists')

else:

print('Exiting details: ')

print('Employee empid=',empid)

print('Employee Name=',data[0][1])

print('Employee salary=',data[0][2])

nn=input('Enter new name: ')

nm=float(input('Enter new salary: '))

s='update salary set name="'+nn+'", salary='+str(nm)+' where


empid='+str(empid)

a.execute(s)

print('updated successfully:')

conn.commit()

print()

elif(ch==5):

import pymysql

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

empid=int(input('Enter employee empid to be deleted: '))

s='select *from salary where empid='+str(empid)

a.execute(s)

Page 10
Employee Salaries Database Jan/Feb 2025

data=a.fetchall()

if(len(data)==0):

print('Empid',empid,'does not exist')

else:

s='delete from salary where empid='+str(empid)

a.execute(s)

print('deleted successfully')

conn.commit()

print()

elif(ch==6):

import pymysql

import matplotlib.pyplot as plt

conn=pymysql.connect(host='localhost',user='root',password='siddharth',database='empl
oyee')

a=conn.cursor()

s='select *from salary'

a.execute(s)

data=a.fetchall()

L1=[]

L2=[]

for i in data:

L1.append(i[1])

Page 11
Employee Salaries Database Jan/Feb 2025

L2.append(int(i[2]))

plt.bar(L1,L2)

plt.xlabel('Employee name')

plt.ylabel('Employee salary')

plt.title('Employee salaries')

plt.show()

conn.commit()

print()

elif(ch==7):

print()

break

else:

print('Invalid choice...please enter choice in between 1 to 7')

Page 12
Employee Salaries Database Jan/Feb 2025

OUTPUT SCREEN

Screen-1: WELCOME SCREEN

Page 13
Employee Salaries Database Jan/Feb 2025

Screen-2: Inserting data

Page 14
Employee Salaries Database Jan/Feb 2025

Page 15
Employee Salaries Database Jan/Feb 2025

Screen-3: Searching specific employee details


(successful Search)

Page 16
Employee Salaries Database Jan/Feb 2025

Screen-4: Searching specific employee details (unsuccessful


Search)

Page 17
Employee Salaries Database Jan/Feb 2025

Screen-5: Display entire table data

Page 18
Employee Salaries Database Jan/Feb 2025

Screen-6: updating the details (successful change)

Page 19
Employee Salaries Database Jan/Feb 2025

Screen-7: updating the details (unsuccessful change)

Page 20
Employee Salaries Database Jan/Feb 2025

Screen-8: deleting the details (successful delete)

Page 21
Employee Salaries Database Jan/Feb 2025

Screen-9: deleting the details (unsuccessful delete)

Page 22
Employee Salaries Database Jan/Feb 2025

Screen-9: Displaying bar graph

Page 23
Employee Salaries Database Jan/Feb 2025

Bibliography:

www.google.com

www.python.org.

www.geeksforgeeks.org

www.stackoveflow.com

Martin Brown and Martin C Brown, “Python: The Complete Reference”, Mc-
Graw-Hill, 2001

Page 24

You might also like