The Student information management system is to the student information management, is calls the database the correlation, then carries on the increment deletion to investigate four kinds of operations.
The student database about student information is original and saves us from creating a database. However, when doing the student information management system
, if you do not analyze the database table, do the system will be very confused. I was an example, before a cursory look at the table, a table is the user name letter
, the other is the student information, no careful study of the relationship between the various tables and links, also did not want to why this table, the information about students why
Build a number of tables and so on,,,, the whole process of doing this system is indefinitely, do not understand and understand the appearance.
So, in the future no matter what system to do, before doing all have to carefully analyze the relationship. When it comes to the database, we need to analyze it concretely.
The relationship between the tables, and the structure of the table.
Let's look at the following together:
One: Student management system and database student
(Click on the picture to see the larger image)
1, into the student management system, first of all to call the database user_info this table.
The User_info table is student independent of the table. is not related to the other tables.
2, student status management, mainly from the Student_info table to obtain information.
When viewing the school status, it is the information directly obtained from the Student_info, but when the school is added, the information in the two tables of Class_info and Student_info is used. This is used to contact the class number in two tables to read all the class numbers in the Class_info.
3, class management, mainly Operation Class_info table.
When you add class information, you get grade information in the Gradecourse_info table and then save it in the Class_info table. When you modify class information, you can also use the grade contact between the two tables to get additional information.
4, the course set up, the main Operation Course_info table.
In the course settings, all the course names are obtained from the Gradecourse_info, and Gradecourse_info and Course_info tables have a bridge between Course_name.
5, the performance management, the main Operation Result_info table.
The use of Student_info student number and the name is one by one corresponding relationship, in addition to the results of the time, with a study number, automatically add the corresponding name. Using the Course_info table, knowing the class number, there is the corresponding course of the class.
In a word, the Student information management system, each form is not just a function of a database table, in the role of this table, the same between the table
Relationship and automatically get information from another table. This and automation, but also convenient. As long as we can figure out the relationship.
Second: the links between the tables in the student.
The student table is user_info the table is isolated, and the other tables are connected.
Third: The design idea of student table.
There has been a doubt, is student table, why so many tables, why not the grade grade information added to the student table, so that a table is less, it should be more simple.
The result is just the opposite, less a table, a lot of repetitive information, not simple, is complex.
If: The grade table has three grade is first grade, second grade, third grade.
There are 30 student information in the student table and 10 students in each grade.
If two tables are synthesized into a design, then the table information is filled with three groups of 10 duplicate grade information. The top 10 are heavy
In the first grade, the middle 10 is a repeat of the second grade, the last 10 are repeat the third grade ... There were three records in Grade One, and now it's 30.
Record, repeat so much. Of course, this is only to clarify the problem, to give a small data, if this student information is a University of all students. So repeat
The information is conceivable ... What a waste of space ah.
Of course, if the merge table, not only the problem of wasting space, but also involved in data anomalies, data inconsistency and so on, these problems
Will be in the later learning process slowly resolved.