A
A
AlexRas2018-05-31 10:31:34
Database design
AlexRas, 2018-05-31 10:31:34

To what extent will this base be correct and what other design options can be used?

Everything is based on mysql.
There are courses that have modules, and these models already have 1 or more tests.
Course table example:

course
 id
- module
   id
   course_id
-- test
    id
    module_id

The problem goes further, these courses can be selected by users, and courses, modules, tests have their own statuses, passed or not, I got the following tables:
user
 id
- user_course
   id
   user_id
   course_id
   status
-- user_module
    id
    user_course_id
    module_id
    status
--- user_test
     id
     user_module_id
     test_id
     status

How correct is this? Now it turns out that if you add a new module to the course, and it has already been selected by the user, then you already need to track it on the backend and add a new module to all users.
Maybe there are other options for designing the base?

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