ABSTRACT: This work presents a novel approach to developing a temporal active rule system as part of an asynchronous rule processor. Traditional database systems are passive with respect to data management. They are exclusively employed for data storage and manipulation. Recent technology advancements lead to more complex database applications. This compelled database systems to become more sophisticated in order to cope with the growing requirements of such applications. Advanced applications require database systems to be aware of the data being stored and take an active role by triggering actions when necessary. Hence, the idea of active databases has evolved and prospered. The rapid advancement of information technology recently has inspired new database applications that are even more sophisticated. Specifically, many prevalent applications consider temporal attributes as a cardinal dimension of data. Such applications opt for recognition and manipulation of temporal attributes, and crave for rules that would operate on them. There are numerous examples of applications that can make great use of active temporal systems such as retail marketing, credit card tracking and monitoring, medical research, stock market analysis, and so on. In addition, we conjecture that in the near future temporal attributes will be an inescapable and fundamental dimension of data. Most temporal rule processing research projects have developed complex languages which unfortunately suffer from procedurality in their languages. This yields poor readability and maintainability. Moreover, it requires highly skilled users to utilize such systems.

Summary:

ABSTRACT (cont.): The above considerations inspired us to design and develop a temporal rule system that avoids the shortcomings of other systems. The two main goals of our research are 1) to develop an efficient temporal rule system that would transcend the available systems in its temporal capabilities and 2) to carry through a high level of user-friendliness. Our work illuminates the language, an essential issue that others overlooked. We strove to furnish users with a language that is declarative and easy to read and administer. Other priorities include fast response, high performance, and versatility of use. In summary, this dissertation presents a framework for an efficient temporal rule processing system, and focuses on the major contributions of the prescribed system.

complete description of a temporal database model is given in a study where the authors

define a temporal database as a collection of state objects [Gal93]. Each state object is

represented by the tuple: , the elements of which

are defined as

so-id: the state object unique id.
tx: the time at which the value of the object was physically updated.
td. the decision time at which the value was decided (usually tx > td if available).
t, : the valid time at which the value is valid in the real word. This may be an absolute
time, an interval, or a set of intervals.
var-status: indicates whether the value is frozen (can be changed) or not.
revised-so: a set of so-ids of the same variable whose values are corrected by this state
object.

The former representation of temporal databases is general, and many of the

elements depicted in the ideal state object may be unnecessary for certain applications. In

current commercial systems, only the id, the valid time, the transaction time, and the

value are available. Most temporal databases follow some version of the previous model,

which may lack some of the listed state object attributes. In general, temporal databases

that maintain both the valid time and the transaction constitute the bitemporal model.

Otherwise, the database will be classified as unitemporal, which only maintains either the

valid or the transactional time stamp. Conceptually, throughout the rest of the

dissertation there will not be any distinction between the formerly mentioned types of

time stamping. In that sense, TriggerMan's temporal system uniformly treats information

of the two models.

Time stamping the data is an essential issue in the process of maintaining

historical data. The mainstream models for time stamping historical data are interval time

" Raise an event when the average daily sales volume of an item in a market
basket is greater than 1000, and the total sales of the item are greater than
10 times the average daily sales of the same item".

This date/time format must be delimited from both sides by '#' to distinguish it

from time intervals. The user is allowed to omit the whole time field, in which case the

system assumes the time to be midnight (12:00:00.0000 am) of the given day. In

addition, time fields can be omitted in order, i.e. if a field is omitted then all the smaller

granularity fields must be omitted as well. The day phase (i.e. AM, or PM) is optional,

and if not available, the time is based on a 24-hour clock.

[window-end-time]: an optional end of the operator's time window. If not provided, it

is assumed the timestamp of the last update applied to the time-series, and has the same

formats and rules as the start-time.

Offset: an offset from the last point in the time-series, the time window in this case starts

from (last time stamp offset) to the last time stamp. This offset substitutes the time-

window delimited by start-time and end-time.

Exp.: a Boolean expression involving the result of the continuous/incremental aggregate.

The standard operators include: >,
TriggerMan's built-in temporal functions, such that examples of the listed functions

usage are given in a subsequent chapter.

3.3 Nested Temporal Functions

Nesting of functions adds flexibility and expressiveness to the condition of a

temporal trigger. Conversely, it potentially elevates the level of complexity and

confusion. In some cases, multi-level nesting makes the function ambiguous and hard to

conceive. For example, the multi-level nesting implemented as part of INGRES incurred

high complexity, and the semantics of some of their nested operators were ambiguous

[Eps79]. After reviewing different real-life applications, single-level nesting proved to be

the prevailing depth of needed nesting in most cases. Therefore, we restricted the degree

of nesting in our language to a single level.

Table 3-1: Selected built-in temporal functions

Function Return Type Description
Detects absolute or relative
Increase Boolean . .
increase within a window.
Detects absolute or relative
Decrease Boolean .
decrease within a window.
Checks if a given
Occur Boolean expression is true within a
time window.
Checks if a variable has
StayInRange Boolean stayed within a given range
for some duration.
Detect absolute or relative
Difference Boolean . .
difference within a window.
Detects a steady state of a
Holds Boolean . .
variable within a window.
UpdateCount Scalar Returns number of updates
UpdateCount Scalar
to the given variable.
Calculates the sum of a
Sum Scalar variable's instances within a
window.
Calculates the average of
Average Scalar numeric value within a
window.
xpv g Scl Calculates the exponential
ExpAverage Scalar .
average within a window.
Returns the maximum value
Maximum Scalar of a variable within a
window.
Returns the minimum value
Minimum Scalar of a variable within a
window.
Counts number of
Phaseount Scalar (increase,decrease, no
change) phases of a
variable.
Reutrns the maximum
MaxIncrease Scalar increase of a variable within
a window.
Returns maximum decrease
MaxDecrease Scalar of a variable within a
window.

The advantages of limited nesting are the addition of more expressiveness and

flexibility to the language. Single-level nesting also avoids the confusion and complexity

associated with multi-level nesting. The TriggerMan temporal language permits only one

level of nesting. Namely, the first argument of a Boolean temporal operator can be either

a time-series (no nesting), or a flat temporal aggregate. One-level-nesting facilitates the

composition of triggers that monitor the variation of sums or averages, or in general,

monitor the variation of temporal functions over a period of time. The result of the

internal temporal function is represented as a time-series object. Thereupon, the