X
X
x-ider2015-12-26 23:00:53
SQL
x-ider, 2015-12-26 23:00:53

What database structure to choose for the class schedule?

The application should issue a schedule for the current day, for tomorrow, for the week, for now. In theory, all teacher pairs, for example, to find and hand over debts^^, as well as other options.
Since I didn’t work with databases before, after a little acquaintance I decided to use SQLite, but what about the structure!? I took a short course, and based on it, it would be better to divide the database into several tables , for example, with the fields "day group," day, subject "," subject, teacher ", etc., and then combine the data when querying If you use this structure, would it be better to make a separate table for each group? 800 groups, 6 days, 4 sessions per day on
average.Option two :pre-assign to each teacher, building, subject... number , and then translate the entire schedule into the form: 2.1.4.0.3.6.3 , where each number corresponds to a field.
Sorry if I've been arguing stupidity somewhere. Thanks for answers!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2015-12-26
@x-ider

Table with teachers (id, full name)
Table with groups (id, Name)
Table with classes (id, Name)
Table with buildings (id, Name)
Table with students (id, full name, group id) - this, I think, is not necessary , but suddenly?
A table with a schedule (id, Number of p / p, day of the week, teacher id, group id, class id, building id)
This way it will be possible to filter flexibly. SQLite will do, because there is very little data, but postgres is still better if the application is a server one.
Perhaps we need to add another parity of the week?
And also here: https://ru.wikipedia.org/wiki/Third_normal_form

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question