1.     Absolute and relative validity interval

Database items can be divided into:

 

A continuous data item does not truly reflect the entity’s correct state, since it takes some time to acquire the value from the entity and store it in the database. Hence, a data item is said to correctly reflect the true value for a specific and finite amount of time. A data item is said to be absolute consistent with its entity when the following condition holds:

,

where  is the time when data item  was created.  is the so called absolute validity interval associated with data item .

For derived data, the base data items used in the derivation constitute the derived items read set denoted . The read set is relative consistent if:

  1. the difference between the timestamps of any pair of data items in  is less than the relative validity interval of  denoted . That is: , where  is the relative validity interval on . This is used mainly for continuous data items.
  2. the data items in the read set  are all absolute consistent at the same time. That is: . This is mainly used for discrete data items.

Figure 1 shows both the absolute validity interval and the two ways of using the notion of relative consistency. The interval that is colored green is the length of the relative validity interval, . From the figure we can see that according to the first definition above the three data items: sensor1, sensor2, and sensor3 are relatively consistent. The second definition says that the data items sensor1, sensor2, and sensor3 are relatively consistent in the yellow interval, i.e., when they are all absolutely consistent with their respective entity.

Figure 1 Validity intervals on data items.

 

A derived item is valid from its creation time and until, as in Figure 1, any of the items in  is not absolute consistent with its entity anymore. This is further discussed in section 3.

2.     Dynamic validity interval

A data item reflects the status of an entity for a specified, bounded amount of time. When this time has expired the data items is considered to not be valid anymore. The absolute validity interval of a data item is not necessarily fixed during the execution of the system. Figure 2 shows two sensors where one is initially changing very much and to correctly reflect this the absolute validity interval of the sampled and installed value in the database has to be small, whereas the other sensor changes less and therefore the absolute validity interval can be larger. After some time the rapidly changing sensor value starts to change less and now it is not necessary to sample the sensor as often, i.e., the absolute validity interval can be increased. The other sensor starts to change more often after some time (note that this amount of time is not necessarily related to the amount of time for the other sensor) and thus need to be sampled more often. The validity interval of the sensor value starts to be smaller.

Figure 2 The change in behavior of two sensors as time passes by.

In an engine control system one sensor is used for measuring the temperature of the engine. The temperature changes more rapidly in the beginning compared to when the engine has reached its working temperature. This means that the engine temperature value and data items that are derived from the engine temperature are absolutely consistent during a shorter period of time during the heating up of the engine compared to when it reaches the working temperature.

To have a fixed absolute validity interval on data items require that you design for the worst-case of all modes, and basically oversample data. Considering the needs of the application in various modes, to accurately model the data items the database system must be able to change the validity interval. We define a dynamic validity interval as:

A data item has, in addition to its absolute validity interval, a dynamic validity interval , where  is an upper limit of the possible increase of the value’s life time, that extends the time a data item is considered valid. The absolute consistency is now changed into:

.

 

3.     Absolute validity on derived items

It is not obvious how the absolute validity interval of a derived item shall relate to the items in its read set. In Figure 1 the derived item is valid only as long as all the data items in  are absolute consistent with their respective entity. This works adequately when the sensor values are updated periodically (as soon as the sensor value is not absolute consistent anymore it is updated), since when a data item in the read set is installed the derived item can be considered to not be consistent anymore. One other possible way to get the absolute validity interval of a derived data item is to consider the change of the read set members in the external environment, see Figure 3. The database system is updating the sensor values when they are not valid anymore and if the value has changed more than a threshold from the value the sensor had when deriving a data item the derived data item is not valid anymore. If it is cheap to update a sensor value in the database it can be updated more often than what its absolute validity says.

Figure 3 A threshold value is associated witb a sensor value. When the real-world value has changed more than the threshold stipulates it is considered not to be absolute consistent anymore.

4.     Approaches

Develop algorithms for concurrency control and scheduling for managing dynamic validity intervals.

·        Use dynamic validity intervals in the system, since then it is possible to model the behavior of the system more accurately. The main advantage is that the CPU can be better utilized, since it is not necessary to be pessimistic about how often a sensor value[1] needs to be updated when the system is constructed. Also cascading effects can occur, that is when one data item is valid for a longer time gives that derived items based on it are also valid for a longer time, i.e., these data items do not have to be updated as often as before.

·        Add information in the reoccurring transactions to tell the scheduler when a transaction will appear in the system again, which data items it needs, what the timing constraints are (relative validity interval).
This information can be used both for scheduling updates in a manner so they do not occur all at the same time, and to tell the database system which data items that is needed in the future if versions of data items will be stored in the database system.
The knowledge of future requests of data items can also be used for handling overload situation of the CPU. The system now has the possibility to focus on the most important data items.



[1] And also a derived item depending on how the absolute validity interval of the derived item is derived from the read set.