| |

VerySource

 Forgot password?
 Register
Search
View: 643|Reply: 3

Regarding a difficult problem of student status management, how to design the table structure?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 France

Post time: 2020-2-20 15:00:01
| Show all posts |Read mode
Regarding a difficult problem of student status management, how to design the table structure?

I have a table that stores different class information. At the same time, each class has its own schedule (once the class is added, the start and end dates of this class are fixed), which is used to register the names of each student, but I find this table is very difficult to design. Is it better to design the attributes of the table as dates, or use the names of students as the attributes (the number of students may be added at any time)? This design seems to involve a problem of dynamically generating attributes, which is more troublesome. However, if you use dates as attributes, you also need to dynamically generate attributes (such as automatically generating each date 2016.12.1-2017.1.30 as an attribute).

In comparison, the latter method is better. Because dates are attributes and student names are content, it's more intuitive. But in this case, how to count the attendance rate of a student (because it is horizontal statistics). It is always impossible to write "select sum (attribute December 1 + attribute December 2 + ... + attribute January 29 + attribute January 30) as attendance from computer class

And regardless of the above methods, a separate table needs to be generated for each class, which in the past can hardly be managed. How to unify this information into a table? It is best to generate only one table in total.

I think this is a super difficult problem, please give me a lot of advice, thank you very much! !!
Reply

Use magic Report

0

Threads

7

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-4-27 21:30:01
| Show all posts
First, in fact, this design is not much related to database design, mainly because your understanding and handling of business problems are not very clear.
Second, it is recommended that you use a class management table (class is the primary key), and the other is the student check-in management table. The back table is not an unclear design, but a business problem is unclear. Is your system running all day, can it be used for automatic batch processing at night? These are related to your problem and are related to the design bottleneck .
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-28 08:00:01
| Show all posts
Putting everything together is of course troublesome, 3 watches are ready
1 Class information table, save class time, attributes, etc.
2 Student registration form, with student information and classes reported
3 Class member sign-in form, as long as this form stores valid class (time has not expired) member sign-in conditions
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-7-16 08:45:01
| Show all posts
Store information separately and use foreign keys to associate
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list