CS Projectfinal2
CS Projectfinal2
CABLE CONNECTION
MANAGEMENT
By:
Harshavardhan MK
AISSCE 2024-25
COMPUTER SCIENCE (083)
CABLE CONNECTION
MANAGEMENT
Group members:
Harshavardhan MK
K N Kesavan
Durai Balaji .V
TABLE OF CONTENTS [TOC]
1 Certificate 4
2 Acknowledgement 5
3 Introduction 7
5 Proposed system 10
6 About Python 12
7 About MySQL 14
8 Source Code 16
9 Output 28
11 Bibliography 35
Chromepet, Chennai – 44
This is to certify that this bonafide project work has been done by
________________________________ of class XII in the
Smt. Ramkuwar Devi Fomra Vivekananda Vidyalaya, Chromepet,
Chennai – 44 during the year 2024 – 2025
Internal Examiner External Examiner
I also clinch this opportunity to thank my parents and friends who have
served as the backbone, in completion of the project.
Today one cannot really afford to rely on the fallible human beings of be
really wants to stand against today’s merciless competition where not to
wise saying “to err is human” no longer valid, it’s outdated to rationalize
your mistakes.
So, to keep pace with time, to bring about the best result without
malfunctioning and greater efficiency to replace the unending heaps of
files with a much sophisticated hard disk of the computer, one has to use
data management software. Software has been an ascent in various
organizations. Many software products working are now in markets,
which have helped in making the organizations work easier and
efficient. Data management initially had to maintain a lot of ledgers and
a lot of paperwork had to be done but now software product on
organizations has made their work faster and easier.
Now only this software has to be loaded on the computer and work
can be done. This saves a lot of time and money. The work becomes
fully automated and any information regarding the organization can be
obtained by the click of a button moreover, now it is the age of
computers and automation if an organization gives a better look.
ABOUT PYTHON
Introduction
Python is an interpreter, object-oriented, high level programming
language with dynamic semantics. Its high-level built-in data structures,
combined with dynamic typing binding making it very attractive for
rapid application development. It was developed by Guido Van Rossum
in 1991.
Uses of Python
Web development
Game development
Software development
Language development
Advantages of Python
Readability
Free and Open source
High level language
Object-oriented programming
Cross-plat formed
Widely supported
Safe and secure
ABOUT MySQL
Introduction
MySQL is the world’s most popular open-source relational
database management system. It was found by Michael Widenius, David
Axmark and Allan Larsson in Sweden in the year of 1995. Its name is a
combination “My”, the name of the cofounder Michael Widenius’s
daughter, and “SQL”, the abbreviation of Structured Query Language.
Feature of MySQL
Secure
Client/Server Architecture
Free and open source
High flexibility
Compatible with many operating systems
Memory efficiency
High performance
High productivity
Data redundancy
SOURCE CODE
# SQL part ##
import mysql.connector
from mysql.connector import *
mydb =
connect(host="127.0.0.1",user="root",password="mypwd")
mycursor = mydb.cursor()
mycursor.execute("CREATE DATABASE Cable_Connection")
mycursor.execute("USE Cable_Connection")
mycursor.execute("CREATE TABLE
Customer_Details(cust_name varchar(30),phone_no
varchar(11), channels int, price int)")
if len(result) != 0:
print("---------------------------------------------------------------------
")
print(tb.tabulate(result, headers = h1, tablefmt = 'grid'))
else:
print("----------------------------------------------------------------------
")
print(" ## No such records found ## ")
print("----------------------------------------------------------------------
")
def delvalues(a,b,c,d):
if a!="" and b!="" and c!="" and d!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Phone_No='{}' and Channels between {}
and Price between {}".format(a,b,c,d))
elif a!="" and b!="" and c!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Phone_No='{}' and Channels between
{}".format(a,b,c))
elif a!="" and b!="" and d!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Phone_No='{}' and Price between
{}".format(a,b,d))
elif a!="" and b!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Phone_No='{}'".format(a,b))
elif a!="" and c!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Channels between {}".format(a,c))
elif a!="" and d!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}' and Price between {}".format(a,d))
elif b!="" and c!="":
stat = ("Delete from Customer_Details where
Phone_No='{}' and Channels between {}".format(b,c))
elif b!="" and d!="":
stat = ("Delete from Customer_Details where
Phone_No='{}' and Price between {}".format(b,d))
elif c!="" and d!="":
stat = ("Delete from Customer_Details where Channels
between {} and Price between {}".format(c,d))
elif a!="":
stat = ("Delete from Customer_Details where
Cust_Name='{}'".format(a))
elif b!="":
stat = ("Delete from Customer_Details where
Phone_No='{}'".format(b))
elif c != "":
stat = ("Delete from Customer_Details where Channels
between {}".format(c))
elif d != "":
stat = ("Delete from Customer_Details where Price
between {}".format(d))
mycursor.execute(stat)
mycursor.execute("commit")
delvalues(a, b, c, d)
''##tkinter part ##
import tkinter as tk
root = tk.Tk()
root.state('zoomed')
root.title("Customer Details Editor")
def openCreRec():
root1 = tk.Toplevel(root)
root1.geometry("764x540")
root1.title("Record Creator")
def assignvalues1():
Price = Price.get()
Channels = Channels.get()
Phone_No = Phone_No.get()
Cust_Name = Cust_Name.get()
root11=tk.Toplevel(root1)
root11.geometry("480x200")
lbl = tk.label(root11,text = "Record added successfully!!",
font=("Copperplate Gothic Light",18))
lbl.place(x=50,y=50)
lbl = tk.Label(root11, text="Do you want to add more?",
font=("Copperplate Gothic Light",16))
def ifno1():
root1.destroy()
def ifyes1():
root11.destroy()
lbl.place(x=85,y=100)
btn = tk.button(root11, text="Yes", font=("Copperplate
Gothic Light",16), command=ifyes1)
btn.place(x=125,y=130)
btn = tk.button(root11, text="No", font=("Copperplate
Gothic Light", 16), command = ifno1)
btn.place(x=225, y=130)
root1.mainloop()
def openSeaRec():
root2 = tk.Toplevel(root)
root2.geometry("764x540")
root2.title("Record Searcher")
def assignvalues2():
cn = (Cust_Name.get())
pn = Phone_No.get()
cb = CG.get()
pb = PG.get()
searchvalues(a=cn,b=pn,c=cb,d=pb)
root2.destroy()
root.iconify()
root2.mainloop()
def openDelRec():
root3 = tk.Toplevel(root)
root3.geometry("764x540")
root3.title("Record Remover")
def assignvalues3():
cn = Cust_Name.get()
pn = Phone_No.get()
cb = CG.get()
pb = PG.get()
root31 = tk.Toplevel(root3)
root31.geometry("480x200")
lbl = tk.Label(root31, text="Record deleted successfully!!",
font=("Copperplate Gothic Light",18))
lbl.place(x=50,y=50)
lbl = tk.Label(root31, text="Do you want to delete more?",
font=("Copperplate Gothic Light",16))
def ifno2():
root3.destroy()
def ifyes2():
root31.destroy()
lbl.place(x=85,y=100)
btn = tk.Button(root31, text="Yes", font=("Copperplate
Gothic Light",16), command=ifyes2)
btn.place(x=125,y=130)
btn = tk.Button(root31, text="No", font=("Copperplate
Gothic Light", 16), command = ifno2)
btn.place(x=225, y=130)
drbutton = tk.Button(root3, text="Delete Record",
font=("Copperplate Gothic Light",20), command=assignvalues3)
drbutton.place(x=275,y=420)
root3.mainloop()
def quitroot():
root.destroy()
mydb.close()
root.mainloop()
OUTPUT
Records added
Records searched
Deleting records
Empty table returned
STEPS FOR CREATING DATABASE
CONNECTIVITY APPLICATIONS
RAM: 512mb+
Software requirements
Windows OS
Python
MySQL
MySQL-Python connector
BIBILIOGRAPHY