A
A
Anton Shelestov2019-03-04 13:13:41
MySQL
Anton Shelestov, 2019-03-04 13:13:41

Is the table structure in the database correct?

Hello!
People, please tell me how to organize the structure in the mysql database in the most correct way
. At the moment, there is such a scheme:
4c257538d6.png
The meaning of the data is as follows:
1. There is a list of specialties, the edu_specialities table
2. Each specialty has a list of exams (required to obtain this specialty). Linked to the exams table via an intermediate edu_speciality_exam (many-to-many relationship)
Here's the fun part...
3. For history, exam data is saved every year.
Those. for example, the specialty has 2 exams, mathematics and physics and data for the year:
2018
- mathematics - 20 points + some other data
- physics - 30 points + some other data
2019
- mathematics - 56 points + some other data
- physics - 99 points + some other data
, etc.
I did this by linking the intermediate table edu_speciality_exam with the table over the years, I also got an intermediate table edu_speciality_exam_year
As a result, the site will need information in this form:
Specialty 1
- 2018
- mathematics - data line
- physics - data line
- other year
and etc.
So far, what I have is working and, in principle, suits, but since. I had a similar task of implementing the scheme for the first time, that is, I suspect that it is not quite correct))
Maybe somehow you can make it simpler or more optimized))
Any advice or opinion needed, thanks!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question