M
M
Mikhail Kuznetsov2018-03-29 12:09:15
Database design
Mikhail Kuznetsov, 2018-03-29 12:09:15

How to create statistics?

Hello, how to create this in the database?

spoiler
5abcaa8214778870192517.png

Will there be one statistics table in the database with the number of points, awards, achievements, lessons learned, etc.?
Or do you need to create a table for each type: points - points table, awards - awards, lessons learned - completed_lesson, etc.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Therapyx, 2018-03-29
@rasur

the first thing that came to mind.
Table "statistics" with UsedID, and statistical columns. Initialization to 0. Only 1 row in DB.
The user starts the lesson - the timer turns on, the user finishes the lesson - the timer ends, the time difference goes to the column with hours, the calculated achievements are summed up and updated in the required columns. Or after each achievement, there is the same update. It's up to you to decide.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question