PROJECTREPORT
PROJECTREPORT
PROJECTREPORT
CSE-IV SEM
SUBMITTED BY-
:ANMOL MEHRA
CERTIFICATE
This is to certify that Anmol Mehra of CSE-IV SEM,
S.V. POLYTECHNIC COLLEGE, BHOPAL has completed
his industrial training project as an essential
submission entitled Data visualizationed machine
learning (computer vision ) project for “MASTERCARD
BANKING SYSTEM using PYTHON AND MYsql RDMBS
TECHNOLOGIES
I hereby certify that the project is in the accordance
with the guidelines issue by the POLYTECHNIC and
ITSC.
ACKNOWLEDGEMENT
I owe a great many thanks to a many people who helped and
supported me during the training and making this project a
reality.
My deepest thanks to Mr. Dwarika Singh Sir, M.D. I.T.S.C., Mr.
Abhishek Shrivastava Project Manager and Trainer ,I.T.S.C. and
all my college faculties for guiding and correcting various
mistakes with attention and care.
I express my sincere thanks to the respected H.O.D. CSE. Mr Manoj
Sonkusare of S.V.Polytechnic, Bhopal, for extending his all possible
support.
Thanks and appreciation to all the helpful people for their
support. I also extend my heartfelt thanks to my family & well-
wishers for their effective encouragement, guidance, and
patience throughout the project
ANMOL MEHRA
CONTENTS
1.Introduction to python
2.Mysql database system
7.ER diagram
8.MySql commands
9.Python coding
10.Bibliography
Introduction to Python
What is Python?
Python is a popular programming language. It was created by Guido van Rossum, and
released in 1991.
It is used for:
● web development(server-side),
● software development,
● mathematics,
● scripting
Why Python?
Python was designed for readability, and has some similarities to the
English language with influence from mathematics
Python uses new lines to complete a command, as opposed to other
programming languages which often use semicolons or parentheses.
Python relies on indentation, using whitespace, to define scope, such as
the scope of loops, functions and classes. Other programming languages
often use curly-brackets for this purpose.
MYSQL
MYSql is a freely available open source relational
database management system(RDBMS) that uses
structured query language (SQL). It is downloaded
from www.mysql.org in a MySql database
information is stored here in the table. A single
Mysql databse can contain many tables at once
and stores thousand of individual records.
MySql provides a rich set of features that supports
a secure environment for storing and maintaining
and accessing data in the database. It is fast,
reliable, scable alternative to many of the RDBMS
available.
MYSQL-DATABASE-SYSTEM
My SQL database system refers to the combination
simultaneously.
MYSQL-DATABASE-SYSTEM
My SQL database system refers to the combination of a MySQL server instance and a
MySQL database. MySQL operates using client/server architecture in which the server
runs on the machine containing the database and clients connect to the server over a
network. MySQL is a multi-user database system, meaning several users can access
the database simultaneously.
The sever (MySQL server) listens for client requests coming in over the
Clients are programs that connect to the database server and issue
based SQL (Structured Query Language). The client program may contact
execution) or manually.
CLASSIFICATION-OF-SQL-STATEMENTS
SQL provides many different types of commands used for different purposes. SQL
commands can be divided into following categories:
Commands:- Commands that allows you to perform tasks related to data definition example:-
Data Manipulation language(DML) Commands:- Commands that allows you to perform tasks
related to data manipulation example:-
Transaction Control language(TCL) Commands:- Commands that allows you to manage and
control the transaction(a transaction is one complete unit of work involving many steps).
example-
Making change to database permanently
Undoing changes to database
Creating savepoints
Setting properties for transaction
MySQL was created and is supported by MySQL LAB,a company based in Sweden .This company is
now a subsidiary of Sun Microsystems, which holds the copy right to most of the codebase. On
April 20th, 2009 Oracle database, announce a deal to acquire Sun.
Microsystem
The chief inventor of MySQL was Michael Widenius (a.k.a. Monty). MySQL has been named after
Monty’s daughter My. The logo of MySQL, the dolphine, is named as “Sakila”.
FRONT END:-
The project uses python as its front end that is the part which interacts. The front end basically includes
input facilities through which the user interact. Apart from the user interaction, the front end also contains
database objects that form a layer between the user and BACK END. The project uses python as its front end
that is the part which interacts
BACK END:-
MySQL is used as a BACK END. It handles all database accesses through one or more servers. A Server is a
special computer that is responsible for processing requests send to it. It processes all the data and query
passed to it and sends result back to the front end where it is displayed to theuser.
HARDWARE AND SOFTWARE
SPECIFICATION
platforms used):-
Project category:-
RDBMS.
USER WORKING
ANALYSIS
services.
ER DIAGRAM
MY SQL COMMANDS
Coding for 1st table
create table bank_list (
bank_id varchar,
bank_name varchar(30),
);
Insertion of data:-
Insertion of data:-
table 2 :-
import mysql.connector as connector
import matplotlib.pyplot as plt
con=connector.connect(host='localhost', user='root', password='password', database='mastercard')
if con.is_connected():
print("connection established...") print("\n*******WELCOME mastercard PROJECT*******")
mycursor = con.cursor() mycursor.execute
("SELECT * FROM bank_services")
myresult = mycursor.fetchall()
for x in myresult:
print(x) mycursor.execute
("select acc_type ,rate_of_intrest from bank_services”)
result = mycursor.fetchall
acc_type=[] rate_of_intrest=[]
for i in mycursor:
acc_type.append(i[0])
rate_of_intrest.append(i[1])
print("acc_type= ", acc_type) print("rate_of_intrest = ", rate_of_intrest)
max_y_lim=max(rate_o_intrest) min_y_lim=min(rate_of_intrest)-0
plt.title("Rate of intresy or diff account")
plt.barh(acc_type,rate_of_intrest,color=blue)
plt.show()
Table 3:-
INSERT
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard')
mycursor=mydb.cursor()
sql="insert into customer_list(dt_acc_open, bank_id,customer_id,customer_name,phone,city)
values(%s,%s,%s,%s,%s,%s)" val=("15_oct_2009","001","121","utkrash", "7418529636","Bhopal”)
mycursor.execute(sql,val) mydb.commit()
print(mycursor.rowcount,"record inserted")
UPDATE
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard')
mycursor=mydb.cursor() sql="update bank_id=012 where bank_id=002" mycursor.execute(sql)
mydb.commit() print(mycursor.rowcount,"1 record affected")
DELETE:-
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard') mycursor=mydb.cursor() sql="delete from bank_id where bank_id=007"
mycursor.execute(sql) mydb.commit() print(mycursor.rowcount,"records deleted")
:-
Tab
le 2:-
INSERT
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard')
mycursor=mydb.cursor()
sql="insert into bank_services(acc_type, rate_of_intrest,documents_required,remarks) values(%s,
%s,%s,%s)" val=("serving","10%","no documents","good_acc")
mycursor.execute(sql,val) mydb.commit()
print(mycursor.rowcount,"record inserted")
UPDATE
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard')
mycursor=mydb.cursor() sql="update rate_of_intrest=12% where rate_of_intrest=8"
mycursor.execute(sql) mydb.commit() print(mycursor.rowcount,"1 record affected")
DELETE:-
import mysql.connector
import matplotlib.pyplot as plt
mydb= mysql.connector.connect(host='localhost', user='root', password='password',
database='mastercard') mycursor=mydb.cursor() sql="delete from bank_id where
acc_type=DBT_acc" mycursor.execute(sql) mydb.commit() print(mycursor.rowcount,"records
deleted")
BIBLIOGRAPHY
www.google.com
www.youtube.com
www.geeksforgeeks.com
www.pythonorg.com