As shown in figure I do a Student management system is confused should be in the midst of a Student class such as billing, scheduling these as part of the Student class attribute or separate write,,, someone can give a frame or to give directions and the younger brother
CodePudding user response:
I just a few examples, such as to complete the schedule, you can add a class and the students in our class a unique identifier, so by traversing the schedule you can find the specific student's schedule, and create a schedule, too, only need to add the unique identification of the classmates to the schedule, such as management notice again, notice can be classified into school collective notice or a particular class, you can add a field to specify, then add belonging to a class in the student in the class, so you can traverse the students, through the class, you can find the corresponding notifications school notice is more simple, direct to all students, other analogy to do yourselfCodePudding user response:
Is my idea is that the site has a registration/login function, after a successful login will perform other operations, such as what the schedule arrangement, management notice these,,, do you have any questions, don't know what I think...CodePudding user response:
Students is the core data objects, and the schedule is a one-to-many relationship, a student can correspond to multiple schedules,In general, students in the class, not a statement schedule a collection of relationships, but retain associated students object in schedule object,
In a nutshell, master-slave relationship, the main one is generally not retain information from the content of the party, 2 from one party, usually retain the content of the main party,
Why do you do?
1. More than a pair of cases, the party more number of records is not controlled, can cause memory and access efficiency is low, sometimes read out subordinate information, how program may not be used, however, will still read frequently,
(2) from one party to keep the Lord's side of the content data, mainly is for the sake of easy to use, according to the experience, from the data of general often can access the data from one side of the Lord, when you visit a calendar data, for example, the owner of the schedule is extracted with the use of commonly,
Finally, some modules are not only can complete a table, also need more tables to completion,
CodePudding user response:
Usually this simple system can begin from the database, first take a look at the table, such as Student table, calendar,,,,, then each table corresponding to a class, such as table corresponding to the Student class of students, and then to these tables built some management classes, such as Student management class StudentManager. Class, can handle in these management class students related functions, such as according to the ID to obtain a Student, save the changes Student data, query Student, etc., you said to an account, the schedule should be in charge to an account management classes and class schedule management in processing, this method is generally suitable for simple database related data management system,CodePudding user response:
Upstairs, do separately, through the primary key to doCodePudding user response:
And elder brother to specify the younger brotherI am now in the database to create these classes that Java create classes should be how to write in it? Is beans are supposed to write a class for each table
CodePudding user response:
The establishment of the one-to-one Java class