M
M
Muindor2019-03-15 22:27:05
Database design
Muindor, 2019-03-15 22:27:05

How to store the time / period of validity in the database?

Hello!
There was a need to store the period of validity in the entity of the database, but this is not the period of validity of the entity itself.
Let me give you an example:
I have several indicators that are assigned to another entity, in which it is already required to calculate the period of the indicator.
What I came up with:
In the indicator, I store the period of validity in quarters (no matter what) as a number, and then I process this number using PHP and write it into the entity, in 2 columns "beginning" and "end" of the period.
Tell me, can there be some way to store this "quarter" not as the number of these "quarters"?

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