Student Management System Project
Student Management System Project
Student Management System Project
This project demonstrates how to create a Student Management System using Python and MySQL.
The system allows the user to perform CRUD operations (Create, Read, Update, Delete) on student
records.
Python Code
import mysql.connector
def connect_to_database():
return mysql.connector.connect(
host="localhost",
def create_table():
db = connect_to_database()
cursor = db.cursor()
cursor.execute("""
age INT,
class VARCHAR(50)
""")
db.commit()
db.close()
db = connect_to_database()
cursor = db.cursor()
query = "INSERT INTO students (name, age, class) VALUES (%s, %s, %s)"
cursor.execute(query, values)
db.commit()
db.close()
USE school;
name VARCHAR(100),
age INT,
class VARCHAR(50)
);