0% found this document useful (0 votes)
91 views28 pages

Banking System Project Report

The document is a project report submitted by Mahir Bhat for their class on the banking system. It contains sections on project analysis, functions and modules used, a description of the project which involves a MySQL table to store employee data, the source code to perform CRUD operations on the table, and outputs and tables. The code allows users to create a database and table, insert, update, delete, search and display records from the employees table.

Uploaded by

mannat.swarnim
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)
91 views28 pages

Banking System Project Report

The document is a project report submitted by Mahir Bhat for their class on the banking system. It contains sections on project analysis, functions and modules used, a description of the project which involves a MySQL table to store employee data, the source code to perform CRUD operations on the table, and outputs and tables. The code allows users to create a database and table, insert, update, delete, search and display records from the employees table.

Uploaded by

mannat.swarnim
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

K C INTERNATIONAL

SCHOOL

SESSION: 2023-24

PROJECT REPORT
ON

"BANKING
SYSTEM"
Submitted By: Submitted to:
Mahir Bhat Ms. Nidha Suri Khanna
CLASS - XII-A
Roll No:

K C INTERNATIONAL SCHOOL

CERTIFICATE

The project report entitled


“BANKING SYSTEM”
Submitted by Mahir Bhat of class XII A for the CBSE
Senior Secondary Examination 2019-20 Class XII for
Computer Science at K C International School , Jammu
has been examined.
SIGNATURE OF EXAMINER

D E C L A R AT I O N

I hereby declare that the project work entitled


“BANKING SYSTEM”, submitted to Department
of Computer Science, K C International School ,
Jammu is prepared by me.

STUDENT’S NAME
Class XII
ACKNOWLEDGEMENT

I would like to express a deep sense of thanks & gratitude to my


Project guide Mrs. Nidha Suri Khanna for guiding me
immensely through the course of the project. He always
evinced keen interest in my work. His constructive advice &
constant motivation have been responsible for the successful
completion of this project.
I also thanks to my parents for their motivation &
support. I must thanks to my class mates for their timely help &
support for completion of this project.
Last but not the least I would like to thanks all those who
had helped directly and indirectly towards the completion of
this project.
STUDENT’S NAME
Class XII

CONTENTS
___________________________
1. PROJECT ANALYSIS
2. FUNCTIONS AND MODULES
3. DESCRIPTION
4. SOURCE CODE
5. OUTPUTS AND TABLES
6. BIBLIOGRAPHY
FUNCTIONS AND MODULES

MODULES:
1. import [Link]:

By importing this package we are able to


establish a connection between MySQL and
python.
FUNCTIONS
[Link]():
Establishes connection between MySQL and
python.

[Link]():
It is a special control structure that facilitates
the row by row processing of records in the
result set.
Syntax:
<cursor object>=<connection object>.cursor()

[Link]():
This function is used to execute the SQL query
and retrieve records using python.
<cursor object>.execute(<sql query string>)
[Link]():
Used to define a function

[Link]():
This function will return all the rows from the
result set in the form of tuple containing the
records.

[Link]():
This function provides changes in databases
physically
DESCRIPTION

Our project has one MySQL table


named:
EMP

The table EMP contains the following


columns:
1. id
2. ename
3. salary
SOURCE CODE:
# Project on Employee Management System

import [Link]

import sys

def menu():

loop='y'

while(loop=='y' or loop=='Y'):

print("........MENU.......")

print("1. CREATE DATABASE")

print("2. SHOW DATABASES")

print("3. CREATE TABLE")

print("4. SHOW TABLES")

print("5. INSERT RECORD")

print("6. UPDATE RECORD")

print("7. DELETE RECORD")

print("8. SEARCH RECORD")

print("9. DISPLAY RECORD")

print()

print()
choice=int(input("Enter the choice (1-9) : "))

if(choice==1):

create_database()

elif(choice==2):

show_databases()

elif(choice==3):

create_table()

elif(choice==4):

show_tables()

elif(choice==5):

insert_record()

elif(choice==6):

update_record()

elif(choice==7):

delete_record()

elif(choice==8):

search_record()

elif(choice==9):

display_record()

else:

print("Wrong Choice.")

loop=input("Do you want more try? Press 'y' to continue...")

else:
[Link]()

def create_database():

con=[Link](host='localhost',user='root', passwd='1234')

if con.is_connected():

print("Successfully Connected")

cur=[Link]()

[Link]('create database if not exists employee')

print()

print("Database Created")

[Link]()

def show_databases():

con=[Link](host='localhost',user='root',passwd='1234')

if con.is_connected():

print("Successfully Connected")

cur=[Link]()

[Link]('show databases')

for i in cur:

print(i)

[Link]()

def create_table():
con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

if con.is_connected():

print("Successfully Connected")

cur=[Link]()

[Link]('create table if not exists emp(id integer primary key, ename


varchar(15), salary float)')

print()

print("Table Created -> EMP")

[Link]('DESC emp')

print("+-------------|--------------|-----------+")

print("+Column Name |DataType(Size)|NULL |")

print("+-------------|--------------|-----------+")

for i in cur:

print('|{0:12} | {1:12} | {2:10}|')

print("+-------------|--------------|-----------+")

[Link]()

def show_tables():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

if con.is_connected():

print("Successfully Connected")
cur=[Link]()

[Link]('show tables')

for i in cur:

print(i)

[Link]()

def insert_record():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

if con.is_connected():

#print("Successfully Connected")

cur=[Link]()

ID=int(input("ENTER EMPLOYEE ID : "))

NAME=input("ENTER NAME OF EMPLOYEE : ")

SALARY=float(input("ENTER EMPLOYEE SALARY : "))

query1="INSERT INTO emp(id,ename,salary) VALUES({},'{}',


{})".format(ID,NAME,SALARY)

[Link](query1)

[Link]()

print('Record Inserted')

[Link]()

else:

print("Error : Not Connected")


def update_record():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

cur=[Link]()

d=int(input("Enter Employee ID for update record : "))

ID=int(input("ENTER NEW EMPLOYEE ID : "))

name=input("ENTER NEW NAME OF EMPLOYEE : ")

salary=float(input("ENTER NEW SALARY FOR EMPLOYEE : "))

query1="update emp set id=%s, ename='%s', salary=%s where id=%s" %


(ID,name,salary,d)

[Link](query1)

[Link]()

print("Record Updated")

[Link]()

def delete_record():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

cur=[Link]()

d=int(input("Enter Employee ID for deleting record : "))

query1="delete from emp where id={0}".format(d)

[Link](query1)
[Link]()

print("Record Deleted")

[Link]()

def search_record():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

cur=[Link]()

print("ENTER THE CHOICE ACCORDING TO YOU WANT TO SEARCH


RECORD: ")

print("1. ACCORDING TO ID")

print("2. ACCORDING TO NAME")

print("3. ACCORDING TO SALARY")

print()

choice=int(input("ENTER THE CHOICE (1-3) : "))

if choice==1:

d=int(input("Enter Employee ID which you want to search : "))

query1="select * from emp where id=%s" %(d)

elif choice==2:

name=input("Enter Employee Name which you want to search : ")

query1="select * from emp where ename='%s'" %(name)

elif choice==3:

sal=float(input("Enter Employee Salary which you want to search : "))


query1="select * from emp where salary=%s" %(sal)

else:

print("Wrong Choice")

[Link](query1)

rec=[Link]()

count=[Link]

print("Total no. of records found : ",count)

for i in rec:

print(i)

print("Record Searched")

[Link]()

def display_record():

con=[Link](host='localhost',user='root',passwd='1234',database=
'employee')

if con.is_connected():

#print("Successfully Connected")

cur=[Link]()

[Link]('select * from emp')

rec=[Link]()

count=[Link]

print("+----------|--------------|-----------+")
print("+ Emp ID | Emp Name | Salary |")

print("+----------|--------------|-----------+")

for i in rec:

print('|{0:^9} | {1:12} | {2:10}|'.format(i[0],i[1],i[2]))

print("+----------|--------------|-----------+")

print("+ Total no. of records are : ",count," |")

print("+-------------------------------------+")

#for i in rec:

# print(i)

[Link]()

else:

print("Error : Database Connection is not success" )

menu()
OUTPUTS
SQL TABLES

You might also like