A simple student information management system based on Python and Tkinter

1. Demand analysis

1. The college student information management system uses Tkinter to create a window interface. Make the interface more beautiful.

2, realize the connection with the database, can save or read the information of teachers and students, and can access the basic information through the database

3, the realization of the students’ data increase, delete, search, modify and other functions.

4, the system also teachers and students assigned a certain authority, the teacher logged in with administrator authority, and students logged in, can only view their own information.

2. Functional design and analysis

1. At the beginning of the program, enter a login interface, as shown in the figure below:

To start the screen, create a form with self.window= tk.tk (), add text with the label label, and create a Button with the Button Button component.

2, click the teacher login, will enter the teacher (administrator interface), click the student login will enter the students view their own information interface, click about, is about some information about me, click exit, exit the system.

Click the teacher to log in, as shown in the picture:

The landing. Connect db = pymysql.connect(“localhost”, “root”, “root”, “student(python)”)

3. Enter the account password

4, in this interface to achieve the increase and deletion of student information, click the information table (student number, age) can be sorted, in the student number bar input student number, click search can find the corresponding student information.

5. Click student login to enter the interface for students to view student information, as shown in the picture:

Flow chart:

3. Summary and experience

Conclusion:

At the beginning of the design, I thought about the college students’ information management system interface of the display case, I feel for the normal use, is points permissions, such as the teacher can do, students can do, imagine is relatively simple, but in execution is in trouble, for example, in the initial interface, the teacher after login, How to hide, before the interface in the interface implementation is completed, how to return to the front of the interface, there is such as to change a student’s information, how do we get to the information already in existence, and then modify, still have even if, the layout of the page, and then the sorting, I initially wanted to sort is used alone a button, Will then be sorted within a new interface, but I feel it in this way, is not beautiful, it so happens that day on the Internet to see a list of the sort, the method of use, began to also think of the bubble, selection methods such as sorting, but operate up more troublesome, due to the amount of data is large, but also use an array, or list, It felt more troublesome, but I found a way to help me solve it on the Internet. The code is as follows:

Experience:

Through the compilation of this course design, I have a more in-depth understanding of Python language, feel the concise and clear Python language, master the connection between Python and database, understand the relationship between classes in Python, as well as the logical processing of adding, deleting, checking and modifying. This course design, My harvest is not small, of course, also want to thank the teacher during the epidemic for our teaching, finally thank the teacher!!

Concern public account; Nith essay, rookie Xiao Xie take you to learn Java and algorithm, incidentally learn a bit about Python, have the need of source code contact me, QQ:1787798327.