T.Vetri Selvan CS Project
T.Vetri Selvan CS Project
T.Vetri Selvan CS Project
A PROJECT REPORT ON
CERTIFICATE
Mrs.G.Kapila (PGT Computer Science) during the Academic year 2024-25 and as per
Signature of Principal
Sasikala and my school THE LEADERS ACADEMY for providing me with all the facility
1 Certificate
2 Acknowledgement
Hardware’s and
3
Software’s required
4 Introduction
6 My SQL Database
7 Outputs
8 References
INTRODUCTION
###Delete Student
The`delete_student()`function enables administrators to remove student
records from the system, providing a mechanism for data cleanup and
management.
2. User-Friendly Interface
####UserPanel
The`user()`function represents the User Panel, providing a simplified
interface for end-users to Search for their details, view academic
information, and exit the system.
##KeyCode Functionalities Integrated
### Search and Display Operations
#### Search Student
The`search_student()`function utilizes SQL queries to search for student
details based on the provided name, returning a detailed display of
relevant information.
####View Student Details
The `view_Marks()` function employs SQL queries to fetch and display
student details, with a specific focus on academic performance.
###Update Operations
####Update Student Details
The`update_details()`function integrates user input and SQL queries to
selectively update student information, offering granular control over the
data modification process.
###DataManipulationOperations
####User Panel
The`user()`function represents the UserPanel, offering end-users a
simplified menu to search for their details, view academic information, and
exit the system.
##Integration of My SQL and Python
###MySQL–The Relational Database Management System
My SQL serves as the back end database for the Student Management
System, storing and managing student-related information. The structured
schema ensures efficient storage, retrieval,and manipulation of data.
###Python–The Programming Language
Python, with its versatility and read ability, powers the logic and user
interface of the Student Management System. The script employs
Python’s database connectivity features to seamlessly integrate with My
SQL, providing a cohesive and interactive experience for users and
administrators.
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”STUDENT_MANAGEMENT_SYST
EM”)
C=d.cursor()
c.execute(“select*from STUDENT_DETAILS where
NAME like ‘%{}%’”.format(k))
a=c.fetchall()
if len(a)>=1:
for i in a:
print(“Addmission no:”,i[0])
print(“Name is:”,i[1])
print(“Sex:”,i[2])
print(“Class=”,i[3])
print(“Sec:”,i[4])
print(“Phone number is=”,i[5])
print(“Email_id:”,i[6])
print(“Stream is:”,i[7])
print(“----------------------------------------------------“)
else:
print(“Student Details Not Found”)
d.commit()
Def update_details():
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”STUDENT_MANAGEMENT_SYST
EM”)
C=d.cursor()
If opt==1:
Print(“---------------------------------------------------“)
Print(“You are inside updating name.”)
Q=input(“Enter ADDMISSION_NUMBER whose
data you want to update: “)
L=input(“Enter your updated name: “)
c.execute(“update STUDENT_DETAILS set
NAME=’{}’ where
ADDMISSION_NUMBER={}”.format(l,q))
d.commit()
elif opt==2:
print(“---------------------------------------------------“)
print(“You are inside updating Gender.”)
p=input(“Enter name whose data you want to
update: “)
l=input(“Enter your updated Gender: “)
c.execute(“update STUDENT_DETAILS set SEX=’{}’
where name=’{}’”.format(l,p))
d.commit()
elif opt==3:
print(“---------------------------------------------------“)
print(“You are inside updating class.”)
m=input(“Enter name whose data you want to
update: “)
n=input(“Enter your updated class: “)
c.execute(“update STUDENT_DETAILS set
CLASS={} where name=’{}’”.format(n,m))
d.commit()
elif opt==4:
print(“---------------------------------------------------“)
print(“You are inside updating section.”)
y=input(“Enter name whose data you want to
update: “)
e=input(“Enter your updated section: “)
c.execute(“update STUDENT_DETAILS set SEC=’{}’
where name=’{}’”.format(e,y))
d.commit()
elif opt==5:
print(“---------------------------------------------------“)
print(“You are inside updating phonenumber.”)
h=input(“Enter name whose data you want to
update: “)
r=input(“Enter your updated phonenumber: “)
c.execute(“update STUDENT_DETAILS set
PHONE_NUMBER={} where name=’{}’”.format(r,h))
d.commit()
elif opt==6:
print(“---------------------------------------------------“)
print(“You are inside updating email_id.”)
j=input(“Enter name whose data you want to
update: “)
k=input(“Enter your updated email_id : “)
c.execute(“update STUDENT_DETAILS set
EMAIL_ID=’{}’ where name=’{}’”.format(k,j))
d.commit()
elif opt==7:
print(“---------------------------------------------------“)
print(“You are inside updating stream.”)
f=input(“Enter name whose data you want to
update: “)
z=input(“Enter your updated stream : “)
c.execute(“update STUDENT_DETAILS set
STREAM=’{}’ where NAME=’{}’”.format(z,f))
d.commit()
else:
update_details()
Def view_Marks():
Print(“******************* VIEW STUDENT
DETAILS******************”)
K=input(“Enter name to view student details : “)
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”student_management_system”
)
C=d.cursor()
c.execute(“select*from STUDENT_DETAILS where
NAME like ‘%{}%’”.format(k))
s=c.fetchall()
for i in s:
print(“MARKS:”,i[8])
print(“-----------------------------------------------------“)
d.commit()
Def add_student():
Print(“.................. ADD STUDENT
DETAILS......................”)
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”STUDENT_MANAGEMENT_SYST
EM”)
C=d.cursor()
Sq=”insert into STUDENT_DETAILS
values({},’{}’,’{}’,{},’{}’,{},’{}’,’{}’,{})”.format(a,n,r,i,p,t,u,
w,m)
c.execute(sq)
d.commit()
print(“student data added successfully”)
#To delete items from student details table
Def delete_student():
Print(“******************** DELETE STUDENT
DETAILS*******************”)
K=input(“Enter name to DELETE student details : “)
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”STUDENT_MANAGEMENT_SYST
EM”)
C=d.cursor()
c.execute(“delete from STUDENT_DETAILS where
name=’{}’”.format(k))
print(“.........Data deleted successfully..........”)
d.commit()
def admin():
while True:
print(“***************WELCOME TO STUDENT
MANAGEMENT *****************”)
print(“----------------------------------------------------------
----“)
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”STUDENT_MANAGEMENT_SYST
EM”)
C=d.cursor()
c.execute(“select*from STUDENT_DETAILS where
NAME like ‘%{}%’”.format(k))
a=c.fetchall()
if len(a)>=1:
for i in a:
print(“Addmission no:”,i[0])
print(“Name is:”,i[1])
print(“Sex:”,i[2])
print(“Class=”,i[3])
print(“Sec:”,i[4])
print(“Phone number is=”,i[5])
print(“Email_id:”,i[6])
print(“Stream is:”,i[7])
print(“----------------------------------------------------“)
else:
print(“Student Details Not Found”)
d.commit()
#To display the marks of students from
student details table .
Def view_Marks():
Print(“******************* VIEW STUDENT
DETAILS******************”)
K=input(“Enter name to view student details : “)
D=con.connect(host=”localhost”,user=”root”,passwor
d=”admin”,database=”student_management_system”
)
C=d.cursor()
c.execute(“select*from STUDENT_DETAILS where
NAME like ‘%{}%’”.format(k))
s=c.fetchall()
for i in s:
print(“MARKS:”,i[8])
print(“-----------------------------------------------------“)
d.commit()
while True:
print(“**************WELCOME TO STUDENT
MANAGEMENT*****************”)
print(“1.admin”)
print(“2.user”)
print(“3.exit”)
ch=int(input(“login through: “))
if ch==1:
admin()
elif ch==2:
user()
elif ch==3:
break
else:
print(“invalid input”)
MySQL DATABASES
STUDENT MANAGEMENT SYSTEM DATABASE AND
STUDENT DETAILS TABLE:-
##Gender:
##Class:
##Section:
##Stream: