N
N
neronru2016-06-02 16:52:06
Database design
neronru, 2016-06-02 16:52:06

How to create an ER model correctly?

In general, I need help in compiling an ER model. The essence of the question is this: there is a user, the user has a group of characteristics (well, for example, dexterity, intelligence). These characteristics are pumped over by a timer. Moreover, you can download only one characteristic at a time (if, for example, dexterity is currently being pumped, then you cannot pump intelligence until the agility pumping timer becomes zero). The question itself is how to correctly mark this on the ER diagram.
In a specific implementation, I store everything in the table Players (dexterity, intelligence, current_skill_learned, study_end_time). But, this is not entirely correct, because the last two attributes can be NULL. Therefore, you can select the Characteristics entity, and associate it with the Player entity, as 1 to 1, while "deleting" the record if the timer becomes zero. But, in practical implementation it is useless. In general, what is the right way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-06-02
@neronru

It's not worth switching to 4NF here
The timer should be queued, and the current characteristics stored in the database
Character: class
name dexterity stamina strength ... And yes, there is no "correct" solution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question