2.4.1 Stream operation types

This subsection explains the types of stream operations and how to specify them.

Organization of this subsection
(1) Specification for outputting the tuples that were added to the output relation (ISTREAM)
(2) Specification for outputting the tuples that were deleted from the output relation (DSTREAM)
(3) Specification for outputting all tuples in the output relation at a specified time interval (RSTREAM)

(1) Specification for outputting the tuples that were added to the output relation (ISTREAM)

ISTREAM is an operation that outputs the tuples that were added to the output relation. An example of how to specify this follows:

ISTREAM( SELECT ... FROM s1 [ROWS 10] ... )

(2) Specification for outputting the tuples that were deleted from the output relation (DSTREAM)

DSTREAM is an operation that outputs the tuples that were deleted from the output relation. An example of how to specify this follows:

DSTREAM( SELECT ... FROM s2 [ROWS 10] ... )

(3) Specification for outputting all tuples in the output relation at a specified time interval (RSTREAM)

RSTREAM is an operation that outputs all tuples in the output relation at a specified time interval. An example of how to specify this follows:

RSTREAM[1 SECOND]( SELECT ... FROM s3 [ROWS 10] ... )

Note
If you use the data source mode as the timestamp mode, there is a risk that the intended content may not be output when you specify RSTREAM.
In the data source mode, the relation time is advanced as tuples arrive. For example, even if RSTREAM sets the output interval to one minute, if a tuple arrives at 09:01:00 and the next tuple arrives at 10:00:00, no stream data is output between 09:02 and 09:59. All of the tuples for one hour will end up being output all at once when the tuple arrives at 10:00:00.
Therefore, be sure to understand how this works when using RSTREAM in the data source mode.