Introduction
People have benefited a lot since the invention of the computer. Today, we can easily manage human management work using many software tools. Student management as such is a tool for handling students' data. For example, general information(name, address, DOB, etc.), admission details, grading system, attendance, and others relevant to the school or college students.
In this tutorial, we'll create a student management system project in python using Tkinter and MySQL database.
It will handle the following tasks:
- Add new data of a student
- View the information of an existing student
- Update or modify a student's data, and
- Delete the record of a student
👉Visit Also: Meditation App in Python Tkinter: Practice Deep Breathing
The Project Details
The graphical interface of this student manager program is managed by the Tkinter library. The PyMySQL package is used here to manage database operations with python.
The project folder contains three python files, main.py, custom.py, and credentials.py. As the name of main.py, it handles all the tasks. custom.py has the several information about the color and font used by the main program. credentials.py or the final file contains credentials to log in to the MySQL server.
Since we'll be working with the database, you will need to install a MySQL server on your system (Learn How to Install MySQL on Windows, Linux, and Mac). If you already have done, avoid it.
Create a Database and a Table
Create a database with this name: "student_management"
create database student_management;
Create a table "student_register" under the "student_management" database.
create table student_register(
f_name VARCHAR(50) NOT NULL,
l_name VARCHAR(50) NOT NULL,
course VARCHAR(30) NOT NULL,
subject VARCHAR(50) NOT NULL,
year Int(10) NOT NULL,
age Int(10) NOT NULL,
gender char(10) NOT NULL,
birth DATE NOT NULL,
contact VARCHAR(15) NOT NULL,
email VARCHAR(100) NOT NULL,
PRIMARY KEY ( contact )
);
Requirements and Installation
Install PyMySQL
☛pip install PyMySQL
Install Tkinter
☛pip install tk
What can you learn from this project?
Creating a graphical interface using Tkinter: Creating Tkinter window, frame, label, input widget, buttons, etc.
Connecting Python to MySQL: How to connect python to MySQL, access data in a python table, retrieve data from a table, update operation, and more.
Creating python modules to manage various tasks.
Object Orient Programming: Using classes, objects, etc.
Download the Source Code
You can Download the Project File directly from my GitHub page(https://github.com/subhankar-rakshit) through the download button.
Summary
In this tutorial, we discussed how to create a student management system in python. It's a python project using Tkinter and MySQL that can handle relevant data to school or college students. Users need to follow some basic things before using this student manager application. For example, Installing MySQL server and all required modules or packages, creating a database and a table, etc.
The code length or size is not suitable for copying and pasting. I added my GitHub page link there; you can download the zip file of this project also, through the Download Button.
I hope you enjoyed this tutorial. If you have any questions about this python project, leave your comments below. You'll receive an immediate response.
Find more project related to Python and MySQL from here.
👉Library Management System Project in Python with MySQL
👉Create a Login and Registration form using Python and MySQL
👉Contact Management System Project in Python with MySQLThanks for reading!💙
PySeek