miguel romero university of bío-bío, chile [email protected]
DESCRIPTION
A Graph-Oriented Model and Query Language for Events. Miguel Romero University of Bío-Bío, Chile [email protected]. Andrea Rodríguez University of Concepción, Chile [email protected]. Contents. Introduction Events Model Query Language Prototype - PowerPoint PPT PresentationTRANSCRIPT
A Graph-Oriented Model and A Graph-Oriented Model and Query Language for EventsQuery Language for Events
Miguel RomeroUniversity of Bío-Bío, Chile
Andrea RodríguezAndrea RodríguezUniversity of Concepción, ChileUniversity of Concepción, Chile
[email protected]@udec.cl
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 2
ContentsContents
►Introduction
►Events Model
►Query Language
►Prototype
►Conclusions and future work
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 3
IntroductionIntroduction
► Events are present in diverse areas as: simulation, active database, business process and so on
► Two complementary views of events in information systems are.
events are triggering conditions rather than being stored and queried as traditional data, such as events in active databases and in reactive Web applications and services.
events are subject of data representation and query processing, such as events in spatio-temporal databases.
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 4
IntroductionIntroduction
► We consider events in the context of spatio-temporal databases, where events establish something that happens at a specific location and time instant or interval.
► Considering events as subject of representation leads us to model events as entities in a database system.
► Unlike entities in traditional databases systems, relationships between events, play an important role for querying events, like temporal order, spatial connectivity or causality.
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 5
1960 Chilean Earthquake1960 Chilean Earthquake
Earthquake (type)Concepción (epicenter)21/05/60 6:33 (date-
time)7.25 (strength) Earthquake (type)
Valdivia (epicenter)22/05/60 15:40 (date-time)
9.5 (strength)
Volcano eruption (type)Puyehue volcano
(place)23/05/60 (day)
Tsunami (type)Hawai (place)
23/05/60 07:00 (date-time)
10m (wave height)
Landslides (type)Tralcan mountain (place)
22/05/60 15:40(date-time)
Outflow block (type)Riñihue lake (place)22/05/60 – 23/05/60
(interval)
Flood (type)Valdivia (place)
22/05/60 – 26/05/60(interval)
Tsunami (type)Valdivia (place)
22/05/60 16:20 (date-time)10m (wave height)
Earthquake (type)Concepción (epicenter)
22/05/60 14:58 (date-time)7.5 (strength)
2
1
6
3
4
7
5
8
9
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 6
IntroductionIntroduction
The main contribution of the work is to address modelling, representation,
and query specification of events from a different perspective, where the focus is to query about events rather than about the changes in
objects’ states.
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 7
Events ModelEvents Model► In this work, we extend models and query
languages for graphs to represent events as follows:
1. Events are represented as nodes in a graph, with their particular properties (temporal and spatial settings).
2. Edges in a graph represent causality relationships between events.
3. Both events and causality relationships can be modelled at different levels of granularity.
Earthquake (type)Valdivia (epicenter)
22/05/60 15:40 (date-time)9.5 (strength)
Tsunami (type)Valdivia (place)
22/05/60 16:20 (date-time)10m (wave height)
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 8
Different levels of granularityDifferent levels of granularity
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 9
BASEBASE intint, , realreal, , stringstring, , boolbool
string string INSTANTINSTANT instantinstant
string string BASE BASE LABELLABEL labellabel
INSTANT INSTANT INSTANT INSTANT INTERVALINTERVAL intervalinterval
INTERVAL INTERVAL SPATIAL SPATIAL ATOMIC_EVENTATOMIC_EVENT atomic_eventatomic_event
ATOMIC_EVENT ATOMIC_EVENT EVENT_GRAPH EVENT_GRAPH COMPOSITE_EVENTCOMPOSITE_EVENT composite_eventcomposite_event
LABEL+ LABEL+ (ATOMIC_EVENT (ATOMIC_EVENT COMPOSITE_EVENT) COMPOSITE_EVENT) EVENTEVENT eventevent
EVENT EVENT EVENT EVENT ATOMIC_EDGEATOMIC_EDGE atomic_edgeatomic_edge
COMPOSITE_EVENT COMPOSITE_EVENT COMPOSITE_EVENT COMPOSITE_EVENT EDGE* EDGE* COMPOSITE_EDGE COMPOSITE_EDGE composite_edgecomposite_edge
LABEL+ LABEL+ (ATOMIC_EDGE (ATOMIC_EDGE COMPOSITE_EDGE) COMPOSITE_EDGE) EDGE EDGE edgeedge
EVENT* EVENT* EDGE* EDGE* EVENT_GRAPHEVENT_GRAPH event_graphevent_graph
Events ModelEvents Model
SPATIAL point, line, polygon, regionpoint, line, polygon, region* Set type
+ List type
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 10
Main OperatorsMain Operators
►Event_graph
events, edges: returns a set of events or edges
get_event, get_edge: returns a particular event or edge.
project_each_event, project_each_edge: projection of labels.
select_each_event, select_each_edge: filter the graph with a function selection.
union, intersection, difference of graph
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 11
Main Operators (cont.)Main Operators (cont.)
► Event
is_atomic: is true for atomic event
get_graph, get_interval:, get_spatial: return a graph, interval and spatial setting.
str_Label_Value, int_Label_Value, real_Label_Value: return a label’s value.
► Edge
is_atomic: is true for atomic edge
edges, source, target: return a set of edges, source event and target event
str_Label_Value, int_Label_Value, real_Label_Value: return a label’s value.
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 12
Main Operators (cont)Main Operators (cont)
► Interval: start, end: time point of interval classic Allen Operator: equals , diferent, before, after, meets,
metby, finishes, finishedby, overlaps, overlappedby, starts, startedby, during, contains;
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 13
Query LanguageQuery Language► All events and their relationships ocurred before of “1961/01/01” in
Chile and Argentina.
query
earthquakeChileDB do
select_each_event(fun(ev: event)
get_interval(ev) before new_interval(“1961”))
Done
union
earthquakeArgentinaDB do
select_each_event(fun(ev: event)
get_interval(ev) before new_interval(“1961”))
Done 13
5
2 4
1
3
5
3
2 4
1961
6
7
8
earthquakeChileDB
earthquakeArgentinaDB
Result of query
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 15
Lenguaje en BNFLenguaje en BNF<query>::= query {<graph formula>|<event formula>|<edge formula>}<graph formula> ::= {<graph query>|<graph expression>|<graph object>}<graph query> ::= <graph formula> do
[project_each_event(<label name>[{, <label name>}…])] [project_each_edge(<label name>[{, <label name>}…])] [select_each_event(fun(<var name>:event)<boolean formula>)] [select_each_edge(fun(<var name>:edge)<boolean formula>)]
done<graph expression> ::= { <graph formula> union <graph formula> | <graph formula> intersection <graph formula> | <graph formula> difference <graph formula> | get_event_graph(<event
formula>) }<path formula> ::= <path object> | paths(<graph formula>)<event formula>::= <event object> | <event out operator><edge formula> ::= <edge object> | <edge out operator><boolean formula> ::= <boolean object> | not(<boolean formula>)
| <boolean formula> and <boolean formula>| <boolean formula> or <boolean formula>| < relational formula>| < allen formula>
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 16
ImplementationImplementation► SECONDO, an extensible Database Systems
Generic database system framework,
extended by: algebra module, viewer object and optimizer rueles.
► we extended SECONDO by:
New algebra module: Event Algebra (EA).
New viewer objects : Event viewer (EV).
SECONDO Components Architecture of the kernel
EV
EA
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 17
Secondo GUISecondo GUI
november 8, 2007 Miguel Romero and Andrea Rodríguez. SeCoGis'07 at Auckland, New Zealand, 18
Conclusion and future worksConclusion and future works► we proposed a graph-based approach to modeling events and their
interrelations.
► We discussed the need of making explicit the relationships between events, and we have extended current graph data models to include temporal and spatial settings and to manage different levels of granularity for representing events and their relationships.
► As future work, we would like to fully implement the model in the extensible database system, by including path queries and interoperation with existing spatial algebras. The event query language can be extended and adapted to standard query languages.
► There are also research issues concerning temporal granularity that could be further addressed, as well as reasoning with unknown temporal or spatial settings.
► We also evaluate to use another graph oriented language (e.g. XQuery) to implement this model.
A Graph-Oriented Model and A Graph-Oriented Model and Query Language for EventsQuery Language for Events
Thanks!
Miguel RomeroUniversity of Bío-Bío, Chile
Andrea RodríguezAndrea RodríguezUniversity of Concepción, ChileUniversity of Concepción, Chile
[email protected]@udec.cl