Smart Student Data Management System
Objective
The main objective of this project is to develop a Python-based GUI system that
efficiently manages student data, allowing users to add, view, and analyze
student performance using Matplotlib.
System Overview
The Smart Student Data Management System is designed to perform the
following functions:
1. Accept student details (Name, Roll No., and Marks) from the user.
2. Store the records in a CSV file for easy access.
3. Display all stored records on request.
4. Generate a performance bar graph using Matplotlib.
5. Handle missing inputs and file errors smoothly.
Working Principle
1. Data Entry
The user types student details (Name, Roll No., and Marks) in the provided
text boxes.
When Add Student is pressed, the data is validated and stored in a CSV file.
2. Data Viewing
Clicking View Records reads data from [Link] and shows all entries in
the GUI.
3. Data Visualization
The Show Graph button uses Matplotlib to draw a bar graph showing
student marks for performance comparison.
4. Error Handling
The program shows helpful messages for:
o Empty input fields
o Missing CSV file
o Invalid marks or data format
Flowchart
┌────────────────────────┐
│ Start Program │
└──────────┬─────────────┘
┌────────────────────────┐
│ Initialize GUI (Tkinter)│
└──────────┬─────────────┘
┌────────────────────────┐
│ User enters Name, Roll, │
│ and Marks │
└──────────┬─────────────┘
┌────────────────────────┐
│ Validate Inputs │
└──────────┬─────────────┘
Yes ──────┘ └────── No
│ │
▼ ▼
┌────────────────┐ ┌──────────────────┐
│ Save to CSV │ │ Display Error Msg│
└───────┬─────────┘ └──────────────────┘
│
▼
┌────────────────────────────────┐
│ View Records / Show Graph? │
└──────────┬──────────┬──────────┘
│ │
▼ ▼
┌────────────────┐ ┌───────────────────────┐
│ Display Records│ │ Display Graph (Marks) │
└────────────────┘ └───────────────────────┘
┌────────────┐
│ End Program│
└────────────┘
CODE:
import tkinter as tk
import csv
import [Link] as plt
# ---------- Functions ----------
def add_student():
name = name_entry.get()
roll = roll_entry.get()
marks = marks_entry.get()
if name == "" or roll == "" or marks == "":
output_label.config(text=" Please fill all fields!")
else:
with open("[Link]", "a", newline="") as f:
writer = [Link](f)
[Link]([name, roll, marks])
output_label.config(text=f" Record added for {name}")
name_entry.delete(0, [Link])
roll_entry.delete(0, [Link])
marks_entry.delete(0, [Link])
def view_students():
try:
with open("[Link]", "r") as f:
reader = [Link](f)
data = list(reader)
result = ""
for row in data:
result += f"Name: {row[0]}, Roll: {row[1]}, Marks: {row[2]}\n"
output_label.config(text=result)
except FileNotFoundError:
output_label.config(text="❌ No records found!")
def show_graph():
try:
with open("[Link]", "r") as f:
reader = [Link](f)
data = list(reader)
if not data:
output_label.config(text="❌ No data to display!")
return
names = [row[0] for row in data]
marks = [float(row[2]) for row in data]
[Link](names, marks, color='skyblue')
[Link]("Students")
[Link]("Marks")
[Link]("Student Performance Graph")
[Link]()
except FileNotFoundError:
output_label.config(text="❌ No data found!")
# ---------- GUI ----------
root = [Link]()
[Link]("Student Record System with Graph")
[Link]("400x420")
[Link](root, text="Student Record System", font=("Arial", 14,
"bold")).pack(pady=10)
[Link](root, text="Name:").pack()
name_entry = [Link](root)
name_entry.pack()
[Link](root, text="Roll No:").pack()
roll_entry = [Link](root)
roll_entry.pack()
[Link](root, text="Marks:").pack()
marks_entry = [Link](root)
marks_entry.pack()
[Link](root, text="Add Student", command=add_student,
bg="lightgreen").pack(pady=5)
[Link](root, text="View Records", command=view_students,
bg="lightblue").pack(pady=5)
[Link](root, text="Show Graph", command=show_graph,
bg="lightyellow").pack(pady=5)
output_label = [Link](root, text="", fg="blue", wraplength=350, justify="left")
output_label.pack(pady=10)
[Link]()
Output:
for example:
Name: Rahul, Roll: 1, Marks: 86
Name: Priya, Roll: 2, Marks: 92
Advantages
Simple and interactive GUI
Easy to store and visualize student data
Automatically saves information to a CSV file
Portable and requires no internet
Limitations
No record editing or deletion feature
Data stored only locally in CSV (not a database)
Conclusion
The Smart Student Data Management System provides a compact, easy-to-use
application for managing and analyzing student records.
Using Python’s Tkinter and Matplotlib, it demonstrates how data entry,
visualization, and file handling can be combined in an educational context.
This project is an excellent example of how Python can simplify real-world
administrative tasks through automation and visualization.