Student Management System in Java: Simple Project for Data Handling
marceldavidbaroi
11 views
20 slides
Mar 11, 2025
Slide 1 of 20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
About This Presentation
"A simple Java-based Student Management System that allows users to add, view, and delete student records, including name, email, date of birth, gender, and contact number. The system also provides an option to delete the entire database, making it a great project for beginners learning Java an...
"A simple Java-based Student Management System that allows users to add, view, and delete student records, including name, email, date of birth, gender, and contact number. The system also provides an option to delete the entire database, making it a great project for beginners learning Java and database integration."
Size: 5.43 MB
Language: en
Added: Mar 11, 2025
Slides: 20 pages
Slide Content
Student Management SYSTEM
TO MANAGE STUDENT DATA. ORGANIZE STUDENT INFORMATION. PURPOSE
LETS SEE THE CONCEPT AND STRUCTURE OF PROJECT
Structure of Project Importing all the necessary libraries and modules. Initializing the GUI window and placing the components in it. Defining the functions to manipulate the data in the database and the tree.
Universal Font Variable and Connecting Database labelfont = ('Garamond', 14) entryfont = ('Garamond', 12) connector = sqlite3.connect('SchoolManagement.db') cursor = connector.cursor() connector.execute( "CREATE TABLE IF NOT EXISTS SCHOOL_MANAGEMENT (STUDENT_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, NAME TEXT, EMAIL TEXT, PHONE_NO TEXT, GENDER TEXT, DOB TEXT, STREAM TEXT)" )
Defined Functions reset_fields() take all StringVar and set to blank reset_form() delete everything from the table display_records() all information will be displayed using the add_record() get the data from all the StringVar remove_record() remove them from the tree and the database view_record() get the values of the current selection in the table
remove_record() if not tree . selection (): mb . showerror ( 'Error!' , 'Please select an item from the database' ) else : current_item = tree . focus () values = tree . item ( current_item ) selection = values [ "values" ] tree . delete ( current_item ) connector . execute ( 'DELETE FROM SCHOOL_MANAGEMENT WHERE STUDENT_ID= %d ' % selection [ ]) connector . commit () mb . showinfo ( 'Done' , 'The record you wanted deleted was successfully deleted.' ) display_records ()
view_record global name_strvar , email_strvar , contact_strvar , gender_strvar , dob , stream_strvar current_item = tree . focus () values = tree . item ( current_item ) selection = values [ "values" ] date = datetime . date ( int ( selection [ 5 ][: 4 ]), int ( selection [ 5 ][ 5 : 7 ]), int ( selection [ 5 ][ 8 :])) name_strvar . set ( selection [ 1 ]); email_strvar . set ( selection [ 2 ]) contact_strvar . set ( selection [ 3 ]); gender_strvar . set ( selection [ 4 ]) dob . set_date ( date ); stream_strvar . set ( selection [ 6 ])
reset_fields() global name_strvar , email_strvar , contact_strvar , gender_strvar , dob , stream_strvar for i in [ 'name_strvar' , 'email_strvar' , 'contact_strvar' , 'gender_strvar' , 'stream_strvar' ]: exec ( f " { i } .set('')" ) dob . set_date ( datetime . datetime . now (). date ())
reset_form(): global tree tree . delete (* tree . get_children ()) reset_fields ()
display_records() tree . delete (* tree . get_children ()) curr = connector . execute ( 'SELECT * FROM SCHOOL_MANAGEMENT' ) data = curr . fetchall () for records in data : tree . insert ( '' , END , values = records )
add_record() global name_strvar , email_strvar , contact_strvar , gender_strvar , dob , stream_strvar name = name_strvar . get () email = email_strvar . get () contact = contact_strvar . get () gender = gender_strvar . get () DOB = dob . get_date () stream = stream_strvar . get ()
Review
Review
Review
Review
Review
Review
-Tanvir Niaz Khan ID: 201-15-3593 TEAM -Marcel David Baroi ID: 201-15-3421 -Amit Golder ID: 201-15-3053 -Mehedy Hasan Monir ID: 201-15-3053