Querying a Channel Once the event source, channel, and processor are

Introduction to Oracle CQL 1-7

1.1.1.2 Relations

Time varying relation R is a mapping from the time domain to an unbounded bag of tuples to the schema of R. A relation is an unordered, time-varying bag of tuples: in other words, an instantaneous relation. At every instant of time, a relation is a bounded set. It can also be represented as a sequence of timestamped tuples that includes insertions, deletions, and updates to capture the changing state of the relation. Like streams, relations have a fixed schema to which all tuples conform. Oracle CEP supports both base and derived streams and relations. The external sources supply data to the base streams and relations. A base explicit stream is a source data stream that arrives at an Oracle CEP adapter so that time is non-decreasing. That is, there could be events that carry same value of time. A derived implicit streamrelation is an intermediate streamrelation that query operators produce. Note that these intermediate operators can be named through views and can therefore be specified in further queries. A base relation is an input relation. A derived relation is an intermediate relation that query operators produce. Note that these intermediate operators can be named through views and can therefore be specified in further queries. In Oracle CEP, you do not create base relations yourself. The Oracle CEP server creates base relations for you as required. When we say that a relation is a time-varying bag of tuples, time refers to an instant in the time domain. Input relations are presented to the system as a sequence of timestamped updates which capture how the relation changes over time. An update is either a tuple insertion or deletion. The updates are required to arrive at the system in the order of increasing timestamps. For more information, see: ■ Channels Representing Streams and Relations in the Oracle Complex Event Processing Developers Guide for Eclipse ■ Section 1.1.13, Time

1.1.1.3 Relations and Oracle CEP Tuple Kind Indicator

By default, Oracle CEP includes time stamp and an Oracle CEP tuple kind indicator in the relations it generates as Example 1–6 shows. Example 1–6 Oracle CEP Tuple Kind Indicator in Relation Output Timestamp Tuple Kind Tuple 1000: + ,abc,abc 2000: + hihi,abchi,hiabc 6000: - ,abc,abc 7000: - hihi,abchi,hiabc 8000: + hi1hi1,abchi1,hi1abc 9000: + ,abc,abc 13000: - hi1hi1,abchi1,hi1abc 14000: - ,abc,abc 15000: + xyzxyz,abcxyz,xyzabc 20000: - xyzxyz,abcxyz,xyzabc The Oracle CEP tuple kind indicators are: