A possibility to define a data-lifecycle on objects or records

Temporal states for data

The idea

If you are dealing with data, you want to keep it up-to-date. But some data-objects are expiring. So the idea is to define a state a data-object can have. That could be "active" or "expired".
But there is also the possibility that someone wants to predefine data and then switch the state at the right time. In that case we could introduce another state called "prepared".

Defining the states

A data-object can have 3 states.

Saving the state

In a common relational database system this information could be saved in a single integer or char-field. But also there could be used date or timestamp-fields. Therefore let's use "activation date" and "expiration date" as terms to define those fields.
So, if the current date is before the activation date, the record is in state "prepared". If the current date is after the expiration date, the condition for the state "expired" would be met. The third case, if the current date is between activation date and expiration date, then the record is active.
diagram: states and transition-points: prepared, activation date, active, expiration date, expired
If some of the date-fields are null, the cases become a little more complex.

Inform the user

Due the best practice a user should not need to think about what he/she does, we should provide the user with some extra information. If a user only looks at the state of a data-object, it is necessary to have a look at the activation date and the expiration date. In some cases that attribute should also be hidden from the user for security or data-protection reasons.
To make it easier for the user to understand the data-life-cycle, we could extend the caption for the state.
We can add "activating" in the prepared state, if an activation date was defined, and we can append the string "expiring" if an expiration date was defined before. If the state will not change automatically, we omit this extra information.
Of course, if you determine the state through the comparison with the actual date, "prepared" can never occur without the appended "activating"-string, but for consistency it is recommended to show it to the user, either.


A data-object can have a life-cycle with at least 3 states. It is possible to define an attribute to distinguish the states or use date-values in comparison with the current date.