Student Management-Project Report Tkinter Mysql

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46
At a glance
Powered by AI
The document discusses the development of a Student Management System using Python and MySQL. It covers chapters on requirements, design, implementation, testing, benefits and limitations.

The main chapters covered are: Introduction, Requirements, Design, Implementation, Testing, Benefits, Limitations, Future Enhancements and Conclusion.

The objective is to computerize the process of managing student records like registration, storing details, providing unique IDs and allowing search by name, contact or roll number.

CONTENTS

CHAPTER 1: INTRODUCTION OF PROJECT………………………………………1-3

1.1. Objective……………………………………………………………….……..
….1
1.2. Introduction…………………………………………………………….
…………2
1.3. Scope…………………………………………………………………….
………..3

CHAPTER 2: HARDWARE & SOFTWARE REQUIREMENT…………….…………..4

1.1. Hardware Requirement……………………………………………….


…………..4
1.2. Software Requirement……………………………………………….
…………...4

CHAPTER 3: TECHNICAL DESCRIPTION………….……………………………..…5-6

1.1. Front End


Description………………………………………………….................5

CHAPTER 4: SOFTWARE ANALYSIS & DESIGN…………………………….........7-13

4.1. Software Analysis……………………………………………………………...….7

4.1.1. Software Development Life cycle…………………………………………7


4.1.2. Description of Used Model……………... ………………………………..8

4.2. Software Design…………………………………………………………………………10

4.2.1. Data Flow Diagram………………………………………………………10

4.2.1.1. Zero (0) Level Diagram………….………………………..………. 10


4.2.1.2. One (1) Level Diagram………………………………………………….11
4.2.1.3. Two (2) Level Diagram…………………………………….……….12

4.2.2. ER DIAGRAM......……….…………………………………………………13

CHAPTER 5: DEVELOPMENT OF PROJECT……………………………..………14-67

5.1. Source Code…………………………………………………………………….14


5.2. Snapshots of Output…………………………………………………………….64

CHAPTER 6: TESTING…………………………………………………………...…...68-70
CHAPTER 7: BENEFITS………………………………………………………………….71
CHAPTER 8: LIMITATIONS…………………………………………………………….72
CHAPTER 9: FUTURE ENHANCEMENT………………………………………...……73
CHAPTER 10: CONCLUSION……………………………………………………...……74
CHAPTER 11: REFERENCES………………………………………………………...…75

ABSTRACT

Our project Student Management system includes registration of students, storing their details
into the system i.e. computerized the process. Our software has the facility to give a unique id
for every student and stores the details of every student. It includes a search facility also –
search by name, contact and roll number .The data can be retrieved easily. The interface is very
User-friendly. The data are well protected for personal use and makes the data processing very
fast.
CHAPTER 1
INTRODUCTION
1.1 OBJECTIVE

Student Management System is software which is helpful for college as well as the school
authorities. In the current system all the activities are done manually. It is very time consuming
and costly. Our Student Management System deals with the various activities related to
managing student records. Our Objective is computerizing the process of student records
management.
1.2 INTRODUCTION

This project is aimed to automate the student management system. This project is developed
mainly to administrate student records.
The purpose of the project entitled as STUDENT MANAGEMENT SYSTEM is to
computerize the Front Office Management of student records in colleges, schools and
coaching’s, to develop software which is user friendly, simple, fast, and cost – effective.
Traditionally, it was done manually.
The main function of the system is to register and store student details, retrieve these details as
and when required, and also to manipulate these details meaningfully.
1.3 SCOPE

The proposed software product is the Student Management System. The system will be used in
any School, College and coaching institute to get the information from the student and then
storing that data for future usage

The current system in use is a paper-based system. It is too slow and cannot provide updated
lists of students within a reasonable timeframe. The intentions of the system are to reduce over-
time pay and increase the productivity. Requirements statements in this document are both
functional and non-functional.
CHAPTER 2
HARDWARE & SOFTWARE
REQUIREMENT
SYSTEM REQUIREMENT

2.1 HARDWARE REQUIREMENT

 Pentium IV processor or higher


 128 MB RAM(or above)
 40 GB or more HARDDISK
 Mouse/Keyboard

2.2 SOFTWARE REQUIREMENT

 OS-Windows 7/8/10
 Python Interpreter
 Pycharm IDE or VS code
 Xampp (For Mysql) or Mysql Workbench
CHAPTER 3
TECHNICAL DESCRIPTION
3.1 FRONT END DESCRIPTION

LANGUAGE:- Python

Python is a widely used general-purpose, high level programming language. It was initially
designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was
mainly developed for emphasis on code readability, and its syntax allows programmers to
express concepts in fewer lines of code.

Python is a programming language that lets you work quickly and integrate systems more
efficiently.

Python is dynamically typed and garbage-collected. It supports multiple programming


paradigms, including procedural, object-oriented, and functional programming. Python is often
described as a "batteries included" language due to its comprehensive standard library.

Tkinter

Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk


GUI toolkit, and is Python's de facto standard GUI.Tkinter is included with
standard Linux, Microsoft Windows and Mac OS X installs of Python.

The name Tkinter comes from Tk interface. Tkinter was written by Fredrik Lundh.


CHAPTER 4
SOFTWARE ANALYSIS & DESIGN
4.1 Software Analysis

4.1.1 Software Development Life cycle

Fig:- SDLC
4.1.2 DESCRIPTION OF USED MODEL

The Waterfall Model

The Waterfall model is a sequential software development process, in which progress is seen as
flowing steadily downwards (like a waterfall) through the phases of Conception, Initiation,
Analysis, Design (validation), Construction, Testing and Maintenance.

To follow the waterfall model, one proceeds from one phase to the next in a sequential manner.
For example, one first completes requirements specification, which after sign-off are
considered "set in stone." When the requirements are fully completed, one proceeds to design.
The software in question is designed and a blueprint is drawn for implementers (coders) to
follow — this design should be a plan for implementing the requirements given. When the
design is fully completed, an implementation of that design is made by coders. Towards the
later stages of this implementation phase, separate software components produced are
combined to introduce new functionality and reduced risk through the removal of errors.

Thus the waterfall model maintains that one should move to a phase only when its preceding
phase is completed and perfected. However, there are various modified waterfall models
(including Royce's final model) that may include slight or major variations upon this process.
Time spent early in the software production cycle can lead to greater economy at later stages. It
has been shown that a bug found in the early stages (such as requirements specification or
design) is cheaper in terms of money, effort and time, to fix than the same bug found later on in
the process. To take an extreme example, if a program design turns out to be impossible to
implement, it is easier to fix the design at the design stage than to realize months later, when
program components are being integrated, that all the work done so far has to be scrapped
because of a broken design.

This is the central idea behind the waterfall model - time spent early on making sure that
requirements and design are absolutely correct will save you much time and effort later. Thus,
the thinking of those who follow the waterfall process goes, one should make sure that each
phase is 100% complete and absolutely correct before proceeding to the next phase of program
creation. Program requirements should be set in stone before design is started (otherwise work
put into a design based on incorrect requirements is wasted); the program's design should be
perfect before people begin work on implementing the design (otherwise they are
implementing the wrong design and their work is wasted), etc.

A further argument for the waterfall model is that it places emphasis on documentation (such as
requirements documents and design documents) as well as source code. In less designed and
documented methodologies, should team members leave, much knowledge is lost and may be
difficult for a project to recover from. Should a fully working design document be present (as is
the intent of Big Design Up Front and the waterfall model) new team members or even entirely
new teams should be able to familiarize themselves by reading the documents.

Basic principles of the waterfall model are:

Project is divided into sequential phases, with some overlap and splash back acceptable between
phases.

Emphasis is on planning, time schedules, target dates, budgets and implementation of an entire
system at one time.

Tight control is maintained over the life of the project through the use of extensive written
documentation, as well as through formal reviews and approval/signoff by the user and
information technology management occurring at the end of most phases before beginning the
next phase.
4.2 SOFTWARE DESIGN

4.2.1 Data Flow Diagram

The DFD takes an input-process-output view of a system. That is, data objects flow
into the software, are transformed by the processing elements, and resultant data
objects flow out of the software. Data objects are represented by labeled arrows
and transformations are represented by circles. The DFD is represented in a
hierarchical fashion. The first DFD represents the system as a whole. Subsequent
data flow diagrams provide increasing detail with each subsequent level.

The data flow diagram enables the software engineer to develop models of the
information domain and functional domain at the same time. As the DFD is refined
into levels of greater detail, the analysts perform an implicit functional
decomposition of the system. Also DFD refinement results in a corresponding
refinement of data as it moves through the processes that embody the application.
Fig:- Zero (0) Level
ER DIAGRAM

Fig: ER DIAGRAM
USE CASE DIAGRAM
CHAPTER 5
DEVELOPMENT
5.1 SOURCE CODE
SOURCE CODE
from tkinter import *

from tkinter import ttk

import pymysql

class Student:

def __init__(self,root):

self.root = root

self.root.title("Student Management System By Pankaj Panjwani")

self.root.geometry("1350x700+0+0")

title = Label(self.root,text="Student Management System",bd=10,relief =


GROOVE,font=("times new roman",40,"bold"),bg="#03B5B6",fg="#8D208B")

title.pack(side=TOP,fill=X)

self.Roll_No_var = StringVar()

self.name_var = StringVar()

self.email_var = StringVar()

self.gender_var = StringVar()
self.contact_var = StringVar()

self.dob_var = StringVar()

self.search_by = StringVar()

self.search_txt = StringVar()

Manage_Frame = Frame(self.root,bd=4,relief=RIDGE,bg="#F11C79")

Manage_Frame.place(x=20,y=100,width=450,height=600)

m_title = Label(Manage_Frame, text="Manage Students", bg="#F11C79" ,fg="white"


,font=("times new roman", 30, "bold"))

m_title.grid(row=0,columnspan=2,pady=10)

lbl_roll = Label(Manage_Frame, text="Roll No.", bg="#F11C79",


fg="white",font=("times new roman", 20, "bold"))

lbl_roll.grid(row=1, column=0, pady=10,padx=20,sticky="w")

txt_Roll = Entry(Manage_Frame,textvariable=self.Roll_No_var, font=("times new


roman", 10, "bold"),bd=5,relief=GROOVE)

txt_Roll.grid(row=1,column=1,pady=10,padx=20,sticky="w")

lbl_Name = Label(Manage_Frame, text="Name", bg="#F11C79",


fg="white",font=("times new roman", 20, "bold"))

lbl_Name.grid(row=2, column=0, pady=10, padx=20, sticky="w")


txt_Name = Entry(Manage_Frame,textvariable=self.name_var, font=("times new
roman", 10, "bold"), bd=5, relief=GROOVE)

txt_Name.grid(row=2, column=1, pady=10, padx=20, sticky="w")

lbl_Email = Label(Manage_Frame, text="Email", bg="#F11C79",


fg="white",font=("times new roman", 20, "bold"))

lbl_Email.grid(row=3, column=0, pady=10, padx=20, sticky="w")

txt_Email = Entry(Manage_Frame, textvariable=self.email_var,font=("times new


roman", 10, "bold"), bd=5, relief=GROOVE)

txt_Email.grid(row=3, column=1, pady=10, padx=20, sticky="w")

lbl_Gender = Label(Manage_Frame, text="Gender", bg="#F11C79", fg="white",

font=("times new roman", 20, "bold"))

lbl_Gender.grid(row=4, column=0, pady=10, padx=20, sticky="w")

combo_Gender = ttk.Combobox(Manage_Frame,textvariable=self.gender_var,
font=("times new roman", 10, "bold"))

combo_Gender['values'] = ("Male","Female")

combo_Gender.grid(row=4, column=1, pady=10, padx=20, sticky="w")

lbl_Contact = Label(Manage_Frame, text="Contact", bg="#F11C79", fg="white",

font=("times new roman", 20, "bold"))

lbl_Contact.grid(row=5, column=0, pady=10, padx=20, sticky="w")


txt_Contact = Entry(Manage_Frame, textvariable=self.contact_var,font=("times new
roman", 10, "bold"), bd=5, relief=GROOVE)

txt_Contact.grid(row=5, column=1, pady=10, padx=20, sticky="w")

lbl_Dob = Label(Manage_Frame, text="D.O.B", bg="#F11C79", fg="white",

font=("times new roman", 20, "bold"))

lbl_Dob.grid(row=6, column=0, pady=10, padx=20, sticky="w")

txt_Dob = Entry(Manage_Frame, textvariable=self.dob_var,font=("times new


roman", 10, "bold"), bd=5, relief=GROOVE)

txt_Dob.grid(row=6, column=1, pady=10, padx=20, sticky="w")

lbl_Address = Label(Manage_Frame, text="Address", bg="#F11C79", fg="white",

font=("times new roman", 20, "bold"))

lbl_Address.grid(row=7, column=0, pady=10, padx=20, sticky="w")

self.txt_Address = Text(Manage_Frame,width=20 , height=2 , font=("times new


roman",10,"bold"),bd=5, relief=GROOVE)

self.txt_Address.grid(row=7, column=1, pady=10, padx=20, sticky="w")

btn_Frame = Frame(Manage_Frame,bd=4,relief=RIDGE,bg="#F11C79")

btn_Frame.place(x=10,y=520,width=420)
Addbtn =
Button(btn_Frame,text="Add",width=9,command=self.add_student).grid(row=0,column=0,padx=10,
pady=10)

updatebtn = Button(btn_Frame, text="Update",


width=9,command=self.update_data).grid(row=0, column=1, padx=10, pady=10)

deletebtn = Button(btn_Frame, text="Delete",


width=9,command=self.delete_data).grid(row=0, column=2, padx=10, pady=10)

Clearbtn = Button(btn_Frame, text="Clear",


width=9,command=self.clear).grid(row=0, column=3, padx=10, pady=10)

Detail_Frame=Frame(self.root,bd=4,relief=RIDGE, bg="#F11C79")

Detail_Frame.place(x=500,y=100,width=830,height=600)

lbl_search = Label(Detail_Frame, text="Search By", bg="#F11C79", fg="white",

font=("times new roman", 20, "bold"))

lbl_search.grid(row=0, column=0, pady=10, padx=20, sticky="w")

combo_search=ttk.Combobox(Detail_Frame,textvariable=self.search_by,width=10,font=("times new
roman",13,"bold"),state='readonly')

combo_search['values']=("Roll_no","Name","Contact")

combo_search.grid(row=0, column=1, pady=10, padx=20, sticky="w")

txt_Search = Entry(Detail_Frame, textvariable=self.search_txt,font=("times new


roman", 13, "bold"), bd=5, relief=GROOVE)

txt_Search.grid(row=0, column=2, pady=10, padx=20, sticky="w")


searchbtn = Button(Detail_Frame, text="Search",
width=8,command=self.search_data).grid(row=0, column=3, padx=10, pady=10)

showallbtn = Button(Detail_Frame, text="Show All",


width=8,command=self.fetch_data).grid(row=0, column=4, padx=10, pady=10)

Table_Frame = Frame(Detail_Frame,bd=4,relief=RIDGE,bg="#F11C79")

Table_Frame.place(x = 10 , y =70 , width=760,height=500)

scroll_x = Scrollbar(Table_Frame,orient=HORIZONTAL)

scroll_y = Scrollbar(Table_Frame, orient=VERTICAL)

self.Student_table =
ttk.Treeview(Table_Frame,columns=("Roll","Name","Email","Gender","Contact","DOB","Address"),
xscrollcommand=scroll_x.set,yscrollcommand=scroll_y.set)

scroll_x.pack(side=BOTTOM,fill=X)

scroll_y.pack(side=RIGHT, fill=Y)

scroll_x.config(command=self.Student_table.xview)

scroll_y.config(command=self.Student_table.yview)

self.Student_table.heading("Roll",text="Roll No.")

self.Student_table.heading("Name", text="Name")

self.Student_table.heading("Email", text="Email")

self.Student_table.heading("Gender", text="Gender")

self.Student_table.heading("Contact", text="Contact")
self.Student_table.heading("DOB", text="DOB")

self.Student_table.heading("Address", text="Address")

self.Student_table['show'] = "headings"

self.Student_table.column("Roll",width=100)

self.Student_table.column("Name", width=100)

self.Student_table.column("Email", width=100)

self.Student_table.column("Gender", width=100)

self.Student_table.column("Contact", width=100)

self.Student_table.column("DOB", width=100)

self.Student_table.column("Address", width=100)

self.Student_table.pack(fill=BOTH,expand=1)

self.Student_table.bind("<ButtonRelease-1>",self.get_cursor)

self.fetch_data()

def add_student(self):

con =
pymysql.connect(host="localhost",user="root",password="",database="stmgmtpython")

cur = con.cursor()

cur.execute("insert into students values(%s,%s,%s,%s,%s,%s,%s)",


(self.Roll_No_var.get(),self.name_var.get(),self.email_var.get(),self.gender_var.get(),self.contact_va
r.get(),self.dob_var.get(),self.txt_Address.get('1.0',END)))

con.commit()

self.fetch_data()

self.clear()
con.close()

def fetch_data(self):

con = pymysql.connect(host="localhost", user="root", password="",


database="stmgmtpython")

cur = con.cursor()

cur.execute("select * from students")

rows = cur.fetchall()

if len(rows)!=0:

self.Student_table.delete(*self.Student_table.get_children())

for row in rows:

self.Student_table.insert('',END,values=row)

con.commit()

con.close()

def search_data(self):

con = pymysql.connect(host="localhost", user="root", password="",


database="stmgmtpython")

cur = con.cursor()

cur.execute("select * from students where "+str(self.search_by.get())+" LIKE


'%"+str(self.search_txt.get())+"%'")

rows = cur.fetchall()

if len(rows)!=0:

self.Student_table.delete(*self.Student_table.get_children())
for row in rows:

self.Student_table.insert('',END,values=row)

con.commit()

con.close()

def clear(self):

self.Roll_No_var.set("")

self.name_var.set("")

self.email_var.set("")

self.gender_var.set("")

self.contact_var.set("")

self.dob_var.set("")

self.txt_Address.delete("1.0",END)

def get_cursor(self,ev):

cursor_row = self.Student_table.focus()

contents = self.Student_table.item(cursor_row)

row = contents['values']

self.Roll_No_var.set(row[0])

self.name_var.set(row[1])

self.email_var.set(row[2])

self.gender_var.set(row[3])

self.contact_var.set(row[4])
self.dob_var.set(row[5])

self.txt_Address.delete("1.0", END)

self.txt_Address.insert(END, row[6])

def update_data(self):

con =
pymysql.connect(host="localhost",user="root",password="",database="stmgmtpython")

cur = con.cursor()

cur.execute("update students set name=%s,email=%s,gender=%s,contact=%s,dob=


%s,address=%s where roll_no=%s",
(self.name_var.get(),self.email_var.get(),self.gender_var.get(),self.contact_var.get(),self.dob_var.ge
t(),self.txt_Address.get('1.0',END),self.Roll_No_var.get()))

con.commit()

self.fetch_data()

self.clear()

con.close()

def delete_data(self):

con = pymysql.connect(host="localhost", user="root", password="",


database="stmgmtpython")

cur = con.cursor()

cur.execute("delete from students where roll_no=%s",self.Roll_No_var.get())

con.commit()

con.close()
self.fetch_data()

self.clear()

root = Tk()

ob = Student(root)

root.mainloop()

5.2 SNAPSHOTS
CHAPTER 6
TESTING
6.1 TESTING

Testing is more than just debugging. The purpose of testing can be quality
assurance, verification and validation, or reliability estimation. Correctness testing and
reliability testing are two major areas of testing. Software testing is a trade-off
between budget, time and quality.

Software Testing

Software Testing is the process of executing a program or system with the intent of finding
errors. Or, it involves any activity aimed at evaluating an attribute or capability of a
program or system and determining that it meets its required results. Software is not
unlike other physical processes where inputs are received and outputs are produced. Where
software differs is in the manner in which it fails. Unlike most physical systems, most of
the defects in software are design errors, not manufacturing defects.

To improve quality

As computers and software are used in critical applications, the outcome of a bug can be
severe. Bugs can cause huge losses.

For Verification & Validation (V&V)

Another important purpose of testing is verification and validation (V&V). It is heavily


used as a tool in the V&V process. Testers can make claims based on interpretations of the
testing results, which either the product works under certain situations, or it does not
work.

Software Testing Types

Black-box testing

The black-box approach is a testing method in which test data are derived from the
specified functional requirements without regard to the final program structure. It is also
termed data-driven, input/output driven or requirements-based testing. A testing method
emphasized on executing the functions and examination of their input and output data.

White-box testing

Contrary to black-box testing, software is viewed as a white-box, or glass-box in white-box


testing, as the structure and flow of the software under test are visible to the tester. This
testing is based on knowledge of the internal logic of an application’s code. Testing plans
are made according to the details of the software implementation, such as programming
language, logic, and styles. Test cases are derived from the program structure. White-box
testing is also called glass-box testing, logic-driven testing or design-based testing .

Unit testing

This involves testing of individual software components or modules. Typically done by


the programmer and not by testers, as it requires detailed knowledge of the internal
program design and code.

System testing

Entire system is tested as per the requirements. Black-box type testing that is based on
overall requirements specifications, covers all combined parts of a system.

End-to-end testing

Similar to system testing, involves testing of a complete application environment in a


situation that mimics real-world use, such as interacting with a database, using network
communications, or interacting with other hardware, applications, or systems if
appropriate.

Usability testing

User-friendliness check. Application flow is tested, Can new user understand the
application easily, Proper help documented whenever user stuck at any point. Basically
system navigation is checked in this testing.

Install/uninstall testing

Tested for full, partial, or upgrade install/uninstall processes on different operating


systems under different hardware, software environment.

Recovery testing

Testing how well a system recovers from crashes, hardware failures, or other catastrophic
problems.

Security testing

Can system be penetrated by any hacking way. Testing how well the system protects
against unauthorized internal or external access. Checked if system, database is safe from
external attacks.

Compatibility testing
Testing how well software performs in a particular hardware/software/operating
system/network environment and different combination s of above.

Comparison testing

Comparison of product strengths and weaknesses with previous versions or other


similar products.
Alpha testing

In house virtual user environment can be created for this type of testing. Testing is done at
the end of development. Still minor design changes may be made as a result of such testing.

Beta testing

Testing typically done by end-users or others. Final testing before releasing application for
commercial purpose.
CHAPTER 7
BENEFITS
7.1 BENEFITS

 Software provides easy management of student records.


 Software has very user friendly interface which is very easy to handle and
understand.
 Software provides security to private data by hiding them.
 Software uses very less memory and takes less time to startup.
CHAPTER 8
LIMITATIONS
8.1 LIMITATIONS

 Software is limited to Desktop only.

 System requires python interpreter installed on the system.

 All options of student management are not included in current version.

 Security options provide only low level security against beginner attackers.

 GUI is in English only.


CHAPTER 9
FUTURE ENHANCEMENT
9.1 FUTURE ENHANCEMENT

 This Software can be made for all OS


 Higher Security features can be included in this software.
 Program scheduling can also be included in this software.
 This software can be developed to use as tutorial to teach basic concepts of
OS to new users.
 This system can be implemented with OS to reduce overhead of installing
and running interface of each and every tool at different place.
 Automatic Shutdown through SMS service can be implemented in this.
CHAPTER 10
CONCLUSION
10.1 CONCLUSION

The project entitled “Student Management System” is developed using Python


Tkinter as front end and MYSQL database in back end to computerize the
process of management of student records. This project covers only the basic
features required.
CHAPTER 11
REFERENCES
11.1 REFERENCES

 Wikipedia
 https://www.geeksforgeeks.org/python-gui-tkinter/
 https://www.javatpoint.com/python-tkinter
 https://www.python.org/

You might also like