Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Relational data stream management system

From Wikipedia, the free encyclopedia

Arelational data stream management system (RDSMS) is a distributed, in-memorydata stream management system (DSMS) that is designed to use standards-compliantSQL queries to process unstructured and structured data streams in real-time. Unlike SQL queries executed in a traditionalRDBMS, which return a result and exit, SQL queries executed in a RDSMS do not exit, generating results continuously as new data become available. Continuous SQL queries in a RDSMS use the SQL Window function to analyze, join and aggregate data streams over fixed or sliding windows. Windows can be specified as time-based or row-based.

RDSMS SQL Query Examples

[edit]

Continuous SQL queries in a RDSMS conform to theANSI SQL standards. The most common RDSMS SQL query is performed with the declarativeSELECT statement. A continuous SQLSELECT operates on data across one or more data streams, with optional keywords and clauses that includeFROM with an optionalJOIN subclause to specify the rules for joining multiple data streams, theWHERE clause and comparison predicate to restrict the records returned by the query,GROUP BY to project streams with common values into a smaller set,HAVING to filter records resulting from aGROUP BY, andORDER BY to sort the results.

The following is an example of a continuous data stream aggregation using aSELECT query that aggregates a sensor stream from a weather monitoring station. TheSELECTquery aggregates the minimum, maximum and average temperature values over a one-second time period, returning a continuous stream of aggregated results at one second intervals.

SELECTSTREAMFLOOR(WEATHERSTREAM.ROWTIMEtoSECOND)ASFLOOR_SECOND,MIN(TEMP)ASMIN_TEMP,MAX(TEMP)ASMAX_TEMP,AVG(TEMP)ASAVG_TEMPFROMWEATHERSTREAMGROUPBYFLOOR(WEATHERSTREAM.ROWTIMETOSECOND);

RDSMS SQL queries also operate on data streams over time or row-based windows. The following example shows a second continuous SQL query using theWINDOW clause with a one-second duration. TheWINDOW clause changes the behavior of the query, to output a result for each new record as it arrives. Hence the output is a stream of incrementally updated results with zero result latency.

SELECTSTREAMROWTIME,MIN(TEMP)OVERW1ASWMIN_TEMP,MAX(TEMP)OVERW1ASWMAX_TEMP,AVG(TEMP)OVERW1ASWAVG_TEMPFROMWEATHERSTREAMWINDOWW1AS(RANGEINTERVAL'1'SECONDPRECEDING);

See also

[edit]

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Relational_data_stream_management_system&oldid=1025419070"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp