0% found this document useful (0 votes)
32 views41 pages

CS Projectfinal2

Uploaded by

Durai Balaji
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)
32 views41 pages

CS Projectfinal2

Uploaded by

Durai Balaji
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/ 41

AISSCE 2024-25

COMPUTER SCIENCE (083)

COMPUTER SCIENCE PROJECT

CABLE CONNECTION
MANAGEMENT

By:
Harshavardhan MK
AISSCE 2024-25
COMPUTER SCIENCE (083)

COMPUTER SCIENCE PROJECT

CABLE CONNECTION
MANAGEMENT

Group members:
Harshavardhan MK
K N Kesavan
Durai Balaji .V
TABLE OF CONTENTS [TOC]

S.No Description Page No

1 Certificate 4

2 Acknowledgement 5

3 Introduction 7

4 Objectives of the project 9

5 Proposed system 10

6 About Python 12

7 About MySQL 14

8 Source Code 16

9 Output 28

10 Hardware and software


requirements 34

11 Bibliography 35
     

Smt. Ramkuwar Devi Fomra Vivekananda Vidyalaya

Chromepet, Chennai – 44

Unit of VIVEKANANDA EDUCATIONAL SOCIETY (Regd)

Department of Computer Science


BONAFIDE CERTIFICATE

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

Principal Staff Incharge

Submitted for (All India Senior Secondary Certificate Examination) Computer


Science Practical Examination held on _____________ at
 
Smt.Ramkuwar Devi Fomra Vivekananda Vidyalaya, Chromepet, Chennai -44.




Internal Examiner External Examiner

Date: School Seal: 


Acknowledgement

I, hereby place my humble obeisance to our Honourable


Correspondent Sri.M.N.Venkatesan for equipping us with exemplary
infrastructure and laboratory amenities. In light of this fact, I also take
the privilege of thanking our Respected Principal Smt.R.Padmavathy,
for her able support.

The colourful project as it seems, is but the product of the inspiration,


enthusiasm and guidance, provided by our Computer Science Teacher
Smt. VIJAYALAKSHMI .V to whom, I owe a lot.

I also clinch this opportunity to thank my parents and friends who have
served as the backbone, in completion of the project.

Finally I would like to thank CBSE for giving me this opportunity to


undertake this project.
Introduction

Cable connection management is the topic of this project. This project is


aimed at providing easy access to cable TV service provider about their
customer details i.e. their name, phone number, the number of channels
they have subscribed to and the amount they are paying.
The provider can easily add, view or delete the details of customers with
this project.

This is achieved by connecting Python and MySQL by installing


the necessary software and modules. The tkinter module of python is
used in this project to create a GUI through which the values are entered.
OBJECTIVES OF THE PROJECT

The objective of this project is to let the students:

 Apply the programming knowledge into a real world


situation/problem and exposed the students how
programming skills helping developing a good software
 Apply object oriented programming principles
effectively when developing small to medium sized
projects.
 Write effective procedural code to solve small to
medium sized problems.
 Demonstrate a breath of knowledge in computer
science, as exemplified in the areas of systems, theory
and software development.
 Demonstrate ability to conduct a research or applied
Computer Science project requiring writing and
presentation skills which exemplify scholarly style in
computer science.
PROPOSED SYSTEM

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)")

def insertvalues(a, b, c, d):


mycursor.execute("Insert into Customer_Details
values('{}','{},'{},'{}')".format(a,b,c,d))
(mycursor.execute("c1""commit"))

def searchvalues(a, b, c, d):


import tabulate as tb
h1=["Cust_No","Phone_No","Channels","Price"]
if a!="" and b!="" and c!="" and d!="":
stat = ("select * 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 = ("Select * from Customer_Details where
Cust_Name='{}' and Phone_/no='{}' and Channels betweeen
{}".format(a,b,c))
elif a != "" and b != "" and d != "":
stat = ("Select * from Customer_Details where
Cust_Name='{}' and Phone_/no='{}' and Price betweeen
{}".format(a, b, d))
elif a!="" and b!="":
stat = ("select * from Customer_Details where
Cust_Name='{}' and Phone_No='{}'".format(a,b))
elif a != "" and c != "":
stat = ("select * from Customer_Details where
Cust_Name='{}' and Channels between {}".format(a, c))
elif a != "" and d != "":
stat = ("select * from Customer_Details where
Cust_Name='{}' and Price between {}".format(a, d))
elif b != "" and c != "":
stat = ("select * from Customer_Details where
Phone_No='{}' and Channels between {}".format(b, c))
elif b != "" and d != "":
stat = ("select * from Customer_Details where
Phone_No='{}' and Price between {}".format(b, d))
elif c != "" and d != "":
stat = ("select * from Customer_Details where Channels
between {} and Price between {}".format(c, d))
elif a != "":
stat = ("select * from Customer_Details where
Cust_Name='{}'".format(a))
elif b != "":
stat = ("select * from Customer_Details where
Phone_No='{}'".format(b))
elif c != "":
stat = ("select * from Customer_Details where Channels
between {}".format(c))
elif d != "":
stat = ("select * from Customer_Details where Price
between {}'".format(d))
else:
print("----------------------------------------------------------------------
")
print(" ## Please enter the value to be searched
##")
print("----------------------------------------------------------------------
")
return None
mycursor.execute(stat)
result = mycursor.fetchall()

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")

lb1=tk.Label(root1, text="Enter the data for creating record",


font=("Copperplate Gothic Light",24))
lb1.place(x=120,y=50)

lbl1=tk.Label(root1, text="Cust_Name", font=("Copperplate


Gothic Light",19))
lbl1.place(x=200,y=150)
Cust_Name = tk.Entry(root1,font=("Arial",19))
Cust_Name.place(x=360,y=150)

lbl1 = tk.Label(root1, text="Phone_No", font=("Copperplate


Gothic Light", 19))
lbl1.place(x=200, y=185)

Phone_No = tk.Entry(root1, font=("Arial", 19))


Phone_No.place(x=360, y=185)

lbl1 = tk.Label(root1, text="Channels", font=("Copperplate


Gothic Light", 19))
lbl1.place(x=200, y=220)

Channels = tk.Entry(root1, font=("Arial", 19))


Channels.place(x=360, y=220)

lbl1 = tk.Label(root1, text="Price", font=("Copperplate Gothic


Light", 19))
lbl1.place(x=200, y=255)

Price = tk.Entry(root1, font=("Arial", 19))


Price.place(x=360, y=255)

def assignvalues1():
Price = Price.get()
Channels = Channels.get()
Phone_No = Phone_No.get()
Cust_Name = Cust_Name.get()

insertvalues(Price, Channels, Phone_No, Cust_Name)

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)

arbutton = tk.Button(root11, text="Add Record",


font=("Copperplate Gothic Light",20), command=assignvalues1)
arbutton.place(x=340,y=350)

root1.mainloop()

def openSeaRec():
root2 = tk.Toplevel(root)
root2.geometry("764x540")
root2.title("Record Searcher")

lbl = tk.Label(root2, text="Enter the details to be searched


for", font=("Copperplate Gothic Bold", 24))
lbl.place(x=100,y=50)

lbl = tk.Label(root2, text="(Single detail can be used to


search)", font=("Copperplate Gothic Light", 21))
lbl.place(x=120, y=95)

lbl2 = tk.Label(root2, text="Cust_Name", font=("Copperplate


Gothic Light",19))
lbl2.place(x=150, y=150)
Cust_Name = tk.Entry(root2, font=("Arial",19))
Cust_Name.place(x=325,y=150)

lbl2 = tk.Label(root2, text="Phone_No", font=("Copperplate


Gothic Light", 19))
lbl2.place(x=150, y=210)
Phone_No = tk.Entry(root2, font=("Arial",19))
Phone_No.place(x=325,y=210)

lbl2 = tk.Label(root2, text="Channels btwn",


font=("Copperplate Gothic Light", 19))
lbl2.place(x=105,y=270)
CG = tk.Entry(root2, font=("Arial",19))
CG.place(x=325,y=270)

lbl2 = tk.Label(root2, text="Price btwn", font=("Copperplate


Gothic Light", 19))
lbl2.place(x=150, y=330)
PG = tk.Entry(root2, font=("Arial",19))
PG.place(x=325,y=330)

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()

SRbutton = tk.Button(root2, text="Search Record",


font=("Copperplate Gothic Light",20), command=assignvalues2)
SRbutton.place(x=275,y=450)

root2.mainloop()

def openDelRec():
root3 = tk.Toplevel(root)
root3.geometry("764x540")
root3.title("Record Remover")

lbl = tk.Label(root3, text="Enter the details to be deleted",


font=("Copperplate Gothic Bold", 24))
lbl.place(x=100, y=50)

lbl = tk.Label(root3, text="(Single detail can be used to


delete)", font=("Copperplate Gothic Light", 21))
lbl.place(x=120, y=95)

lbl2 = tk.Label(root3, text="Cust_Name", font=("Copperplate


Gothic Light", 19))
lbl2.place(x=150, y=150)
Cust_Name = tk.Entry(root3, font=("Arial",19))
Cust_Name.place(x=325,y=150)

lbl2 = tk.Label(root3, text="Phone_No", font=("Copperplate


Gothic Light", 19))
lbl2.place(x=150, y=210)
Phone_No = tk.Entry(root3, font=("Arial",19))
Phone_No.place(x=325,y=210)

lbl2 = tk.Label(root3, text="Channels between",


font=("Copperplate Gothic Light", 19))
lbl2.place(x=105,y=270)
CG = tk.Entry(root3, font=("Arial",19))
CG.place(x=325,y=270)

lbl2 = tk.Label(root3, text="Price between",


font=("Copperplate Gothic Light", 19))
lbl2.place(x=150, y=330)
PG = tk.Entry(root3, font=("Arial",19))
PG.place(x=325,y=330)

def assignvalues3():
cn = Cust_Name.get()
pn = Phone_No.get()
cb = CG.get()
pb = PG.get()

delvalues(a=cn, b=pn, c=cb, d=pb)

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()

lbl1 = tk.Label(root, text="Welcome to the Customer Details


Editor GUI", font=("Copperplate Gothic Light", 24))
lbl1.place(x=235, y=50)

lbl2 = tk.Label(root, text="Select what you want to do",


font=("Copperplate Gothic Light", 19))
lbl2.place(x=450, y=150)

btn = tk.Button(root, text="Create Details", font=("Copperplate


Gothic Light", 19), command = openCreRec)
btn.place(x=200, y=300)

btn = tk.Button(root, text="Search Details", font=("Copperplate


Gothic Light", 19), command= openSeaRec)
btn.place(x=500, y=300)
btn = tk.Button(root, text="Delete Details", font=("Copperplate
Gothic Light", 19), command= openDelRec)
btn.place(x=800, y=300)

btn = tk.Button(root, text="Exit", font=("Copperplate Gothic


Light", 19), command= quitroot)
btn.place(x=575, y=400)

root.mainloop()
OUTPUT
Records added
Records searched
Deleting records
Empty table returned
STEPS FOR CREATING DATABASE
CONNECTIVITY APPLICATIONS

Step 1: Start python


Step 2: Import the packages required for database programming
Step 3: Open a connection to database.
Use the mysql.connector.connect() method of MySQL connector
python with required parameters to connect MySQL.
Step 4: Create a cursor instance. Use the connection object returned by a
connect() method to create a cursor.
Step 5: Execute a query.
Use a cursor.execute() to execute SQL queries from python.
Step 6: Extract data from result set.
Step 7: Clean up the environment.
HARDWARE REQUIREMENTS
 Operating system: Windows 7 and above

 Processor: Pentium(any) or amd


Athalon(3800+-4200+ dual core)

 Motherboard: 1.845 or 915,995 for Pentium or


K9MM-v via k8m800+8237R
Plus chipset for amd Athlon

 RAM: 512mb+

 Hard disk: Sata 40 Gb or above

 CD/DVD r/w multidrive combo: (if backup required)

 Monitor 14.1 or 15-17 inch

 Key board and mouse

 Printer: (if print is required-[hard copy])

Software requirements
 Windows OS
 Python
 MySQL
 MySQL-Python connector
BIBILIOGRAPHY

Computer Science with Python – Class XII


-By Sumitha Arora

You might also like