late data on relational database system (O´NEIL and
O’NEIL, 2000). RTSQL is defined to support real-
time queries, including extensions that specify the
temporal consistency of the data and transactions. A
prototype developed in C, was implemented to vali-
date and to test the correctness of them.
In 1999, a new standard, called SQL-99, was
published by American National Standards Institute
(ANSI) and International Organization Standardiza-
tion (ISO) for the object-relational model. This stan-
dard extends the SQL-92 to include oriented-object
functionalities (O´NEIL and O’NEIL, 2000). How-
ever, the SQL-99 does not consider the definition and
manipulation of data with timing constraints. In this
way becomes necessary the development of exten-
sions for the SQL-99 in order to attend the timing
constraints.
3 REAL-TIME DATABASE
A real-time database system has three distinguish-
ing features: the requirement of temporally consistent
data, the requirement of timing constraints on execu-
tion, and the requirement that certain execution ex-
hibit predictable timing behavior. These features are
useful to time critical applications that need to collect,
modify, and retrieve shared data. Support for these
features will add new requirements to the DDL and
DML of the database query language (PRICHARD,
1995).
Like a conventional database management systems,
an RTDB must process transactions and guarantee
that the database consistency is not violated, besides
to keep time constraints or deadlines for transac-
tions as well as the timing validity of the data (BE-
STRAVOS et al., 1997). The performance goal for
these systems is usually expressed in terms of the de-
sired average response times, rather than constraints
associated to individual transactions. Thus, when
the system makes scheduling decisions, individual
real-time constraints are ignored (STANKOVIC et al.,
1999).
The temporal consistency can be measured through
of the absolute consistency and of the relative con-
sistency of the data. The absolute consistency is the
measure between the state of the environment and as
it is reflected in the database. The relative consistency
is the measure between the data that are used in the
computation of other data (Bestravos et al., 1997).
The real-time data can be defined for tuple
(nr, vrr, avir, tsr, impr), where: nr is the data item
processed; vrr is the value that is updated for the item
in server; vrr is a exclusive field of server and its
value is obtained of the environment; avir is the ab-
solute validity of data, i.e., the time that the data is
considered valid after transaction begins; tsr is the
timestamp of data; impr is the exported collected im-
precision (Ribeiro Neto et al., 2004).
In this work, we will consider that transaction are
defined by the quadruple (tl
i
, tc
i
, pr
i
, pe
i
), where: tl
i
is the transaction release time, that is, the moment in
which all the necessary resources to the execution of
the transaction τ
i
are available. Starting from this in-
stant of time the transaction is ready to be executed;
tc
i
defines the transaction computation time, that is,
the processing time necessary to execute it; pr
i
de-
fines the maximum transaction execution period, and;
pe
i
defines the periodicity of the transaction.
4 SQL-99
Committee ANSI/ISO SQL-99 introduced a standard
query language that supports the object-relational
model. The SQL-99 to provide a series of new capa-
bilities: user types defined; collection types, such as,
vectors or table nesting; and methods and user defined
functions (O´NEIL and O’NEIL, 2000; STEPHENS
and PLEW, 2003).
User Defined Types (UDT) - It is a nominated
group of attributes of different types of data (objects)
that can be used to define tuples of a table or the type
of some attribute of a table.
Collection Types - A column value (on a single
row) to contain a set (or some other type collection,
such as an array) of row-like values. In some systems
a single column value can itself hold a table, a feature
know as table nesting.
Methods and User Defined Functions (UDF) - In
object-oriented languages such as Java, any private
data in a object can be accessed only via object meth-
ods, such methods are functions that can be invoked
to operate (ECKEL, 2002) on one particular object.
Normally, the set of methods for an object will deal
with all properties of the object that can be treated in
isolation (O´NEIL and O’NEIL, 2000).
Therefore, the specification SQL-99 extends the
SQL-92 standard including object-oriented function-
alities (O´NEIL and O’NEIL, 2000). Some commer-
cial DBMS as: DB2, PostgreSQL, Oracle9i, among
others, already implement SQL-99.
5 SQL-99 EXTENSION
Real-time programming languages must provide
mechanism to defined timing constrains, used to ex-
press the start times, periodicity, release time and
deadlines (or completion times) of transactions. To
satisfy such constraints, the query language also must
to incorporate these properties.
QL-RTDB: Query Language for Real-Time Databases
421