The Architecture of a Flexible Querier for Spatio-Temporal Databases - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

The Architecture of a Flexible Querier for Spatio-Temporal Databases

Description:

Which crimes happened on Friday in the Humait district of Porto Alegre city? ... Which crimes happened in 2003 in the district 'Cabanga' of Recife city? ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 46
Provided by: gcam9
Category:

less

Transcript and Presenter's Notes

Title: The Architecture of a Flexible Querier for Spatio-Temporal Databases


1
The Architecture of a Flexible Querier for
Spatio-Temporal Databases
GeoInformation Group Image Processing Division
DPI
  • Karine Reis Ferreira
  • Lúbia Vinhas
  • Gilberto Ribeiro de Queiroz
  • Ricardo Cartaxo Modesto de Souza
  • Gilberto Câmara

2
Introduction
  • Challenge to GISystems use spatially enabled
    DBMS to build innovative applications which deal
    with spatio-temporal data
  • How to address it
  • ST Types and their associated Algebra (Gutting,
    2005)
  • Conceptual models, E-R models for ST-Data
    (Pelekis et al, 2004)
  • ST Query Languages (ISO, 2001)
  • ST Predicates (Egenhofer and Franzosa, 1991
    Allen,1983)
  • Which is the canonical set of ST Predicates?
  • Application specialized subset
  • Building blocks that can be combined (Erwig and
    Schneider, 2002)

3
Introduction
  • How to design a flexible query processor for
    spatio-temporal data using object-relational
    DBMS?
  • Some aspect to be considered
  • Applications are different in terms of queries
    and responses
  • An unified and flexible architecture is desired

4
Layers
  • A geographical database is composed by layers
  • Layers contain Spatio-Temporal Objects
    (ST-Objects)
  • Static Layers
  • ST-Objects do not change along the time, neither
    in their descriptive or geometrical attributes
  • Temporal Layers
  • ST-Objects change along the time, either in their
    descriptive or geometrical attributes
  • ST-Instance represent version in a given time of
    a ST-Object

5
Database Model
  • Ex a layer of districts of a city

layers layers
layerId int layerName string
1 Distritos
DistrictsG DistrictsG DistrictsG
geomId int objId string spatialD spatial
1 D1 bbbbbbbbbbbbb
2 D2 bbbbbbbbbbbbb
3 D3 bbbbbbbbbbbbb
representations representations
layerId int geomRelatio string
1 DistrictsG
DistrictsA DistrictsA DistrictsA
CODDIS string NOME string POP int
D1 Agua Rasa 85896
D2 Cangaiba 137442
D3 Capão Redondo 240793
attributesRel attributesRel
layerId int attrRelation string
1 DistrictsA
6
Database Model
Initial State
DistrictsG DistrictsG DistrictsG
geomId int objId string spatialD spatial
1 D1 bbbbbbbbbbbbb
2 D2 bbbbbbbbbbbbb
3 D3 bbbbbbbbbbbbb
DistrictsStatus DistrictsStatus DistrictsStatus
attrInst string geomInst string timeI time timeF time
1 1 01/01/2003
2 2 01/01/2003
3 3 01/01/2003
DistrictsA DistrictsA DistrictsA
CODDIS string NOME string POP int attrInst string
D1 Agua Rasa 85896 1
D2 Cangaiba 137442 2
D3 Capão Redondo 240793 3
7
Database Model
Change in Geometry
DistrictsG DistrictsG DistrictsG
geomId int objId string spatialD spatial
1 D1 bbbbbbbbbbbbb
2 D2 bbbbbbbbbbbbb
3 D3 bbbbbbbbbbbbb
4 D1 bbbbbbbb
DistrictsStatus DistrictsStatus DistrictsStatus
attrInst string geomInst string timeI time timeF time
1 1 01/01/2003 31/12/2003
2 2 01/01/2003
3 3 01/01/2003
1 4 31/12/2003
DistrictsA DistrictsA DistrictsA
CODDIS string NOME string POP int attrInst string
D1 Agua Rasa 85896 1
D2 Cangaiba 137442 2
D3 Capão Redondo 240793 3
8
Database Model
Change in Attributes
DistrictsG DistrictsG DistrictsG
geomId int objId string spatialD spatial
1 D1 bbbbbbbbbbbbb
2 D2 bbbbbbbbbbbbb
3 D3 bbbbbbbbbbbbb
4 D1 bbbbbbbb
DistrictsStatus DistrictsStatus DistrictsStatus
attrInst string geomInst string timeI time timeF time
1 1 01/01/2003 31/12/2003
2 2 01/01/2003 01/06/2004
3 3 01/01/2003
1 4 31/12/2003
4 2 01/06/2004
DistrictsA DistrictsA DistrictsA
CODDIS string NOME string POP int attrInst string
D1 Agua Rasa 85896 1
D2 Cangaiba 137442 2
D3 Capão Redondo 240793 3
D2 Cangaiba 150000 4
9
Database Model
Change in Attributes and Geometry
DistrictsG DistrictsG DistrictsG
geomId int objId string spatialD spatial
1 D1 bbbbbbbbbbbbb
2 D2 bbbbbbbbbbbbb
3 D3 bbbbbbbbbbbbb
4 D1 bbbbbbbb
5 D3 bbbb
DistrictsStatus DistrictsStatus DistrictsStatus
attrInst string geomInst string timeI time timeF time
1 1 01/01/2003 31/12/2003
2 2 01/01/2003 01/06/2004
3 3 01/01/2003 21/09/2004
1 4 31/12/2003
4 2 01/06/2004
5 5 21/09/2004
DistrictsA DistrictsA DistrictsA
CODDIS string NOME string POP int attrInst string
D1 Agua Rasa 85896 1
D2 Cangaiba 137442 2
D3 Capão Redondo 240793 3
D2 Cangaiba 150000 4
D3 Capão Redondo 250000 4
10
ST Data - Examples
  • Crime events crime occurrences in a city,
    specifying its time and location
  • Which crimes happened on Friday in the
    Humaitá district of Porto Alegre city?

11
ST Data - Examples
  • Epidemiological data the weekly counting of
    mosquito eggs in a set of traps arbitrarily
    deployed over a city
  • http//saudavel.dpi.inpe.br/
  • How many eggs were counted by trap in each month?

12
ST Data - Examples
  • Land parcels
  • For each month, which changes occurred in the
    parcels?

13
The Querier Processor Architecture
Application Program Interface
14
Querier Parameters
  • Layer the source of the ST-Instances
  • Chronon defines how the time extension of the
    layer should be divided into a set of time
    frames
  • second, minute, hour, day, month, year, day of
    week, day of month, day of year, month of year,
    week of year, hour of day, minute of hour or
    second of minute

15
Querier Parameters
  • Aggregate functions how to group a set of
    ST-Instances of a time frame in a representative
    one
  • average, sum, counting, variance maximum or
    minimum,
  • Which time frames will be retrieved
  • controls if the Querier should returns either
    every time frame existent in the total interval
    of the data or only the time frames where some
    change occurred

16
Querier Parameters
  • Temporal predicate defines a relation between
    the data and the time frames (as specified by the
    Chronon)
  • temporal interval predicates equals, before,
    after, meets, during, overlaps, ends or starts
    Allen,1983
  • Spatial predicate defines a relation between the
    data and a geometry
  • disjoint, touches, crosses, within, overlaps,
    contains, intersects, equals, covers and covered
    by Egenhofer and Franzosa, 1991

17
Querier Examples
  • Return all crime events, their location and
    properties

CrimeLayer database-gtgetLayer (Crimes)
18
Querier Examples
  • Return all crime events, their location and
    properties

CrimeLayer database-gtgetLayer (Crimes)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(CrimeLayer)

19
Querier Examples
  • Return all crime events, their location and
    properties

CrimeLayer database-gtgetLayer (Crimes)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(CrimeLayer)

Querier-gtloadInstances()
20
Querier Examples
  • Return all crime events, their location and
    properties

CrimeLayer database-gtgetLayer (Crimes)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(CrimeLayer)

Consume the instances
Querier-gtloadInstances()
while (Querier-gtfetchInstance(sti))
Geometry sti.getGeometry()
Properties sti.getProperties()
Time sti.getTime()
21
Querier Examples
  • Which crimes happened in 2003 in the district
    Cabanga of Recife city?

DistrictLayer database-gtgetLayer
(Districts) DistrictGeometry
DistrictLayer-gtgetGeometry(Cabanga)
22
Querier Examples
  • Which crimes happened in 2003 in the district
    Cabanga of Recife city?

DistrictLayer database-gtgetLayer
(Districts) DistrictGeometry
DistrictLayer-gtgetGeometry(Cabanga)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(CrimeLayer,
year, ChangedTimeFrames) Querier-gtsetSpatialRest
riction(DistrictGeometry,within)
23
Querier Examples
  • Which crimes happened in 2003 in the district
    Cabanga of Recife city?

DistrictLayer database-gtgetLayer
(Districts) DistrictGeometry
DistrictLayer-gtgetGeometry(Cabanga)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(CrimeLayer,
year, ChangedTimeFrames) Querier-gtsetSpatialRest
riction(DistrictGeometry,within)
TimeFrame Querier-gtgetTimeFrame(2003) Querier
-gtloadInstances(TimeFrame) while
(Querier-gtfetchInstance(sti)) ...
24
Querier Examples
  • How many eggs were counted in each trap in each
    month?

TrapLayer database-gtgetLayer (Traps)
25
Querier Examples
  • How many eggs were counted in each trap in each
    month?

TrapLayer database-gtgetLayer (Traps)
GroupingAttributes-gtinsert(num_eggs,
SUM) Querier-gtsetParams(loadGeometries,
GroupingAttributes) Querier-gtsetParams(TrapLayer,
month, ChangedTimeFrames)
26
Querier Examples
  • How many eggs were counted in each trap in each
    month?

TrapLayer database-gtgetLayer (Traps)
GroupingAttributes-gtinsert (num_eggs,
SUM) Querier-gtsetParams(loadGeometries,
GroupingAttributes) Querier-gtsetParams(TrapLayer,
month, ChangedTimeFrames)
numTimeFrames Querier-gtgetNumTimeFrames() for
(frame0 to numTimeFrames) Querier-gtloadInstan
ces(frame) while (Querier-gtfetchInstance(sti))
...
27
Querier Examples
  • Which changes occurred in the land parcels in
    each month?

ParcelLayer database-gtgetLayer (Parcels)
28
Querier Examples
  • Which changes occurred in the land parcels in
    each month?

ParcelLayer database-gtgetLayer (Parcels)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(ParcelLayer
, month,ChangedTimeFrames, Starts Ends)
29
Querier Examples
  • Which changes occurred in the land parcels in
    each month?

ParcelLayer database-gtgetLayer (Parcels)
Querier-gtsetParams(loadGeometries,
loadAllAttributes) Querier-gtsetParams(
ParcelLayer, month,ChangedTimeFrames, Starts
Ends)
numTimeFrames Querier-gtgetNumTimeFrames() for
(frame0 to numTimeFrames) Querier-gtloadInstanc
es(frame) while (Querier-gtfetchInstance(sti))
...
30
The Database Change Observer
  • The Querier mechanism is being implemented in the
    TerraLib environment
  • TerraLib spatial and temporal structures
  • TerraLib Generic Database Application Interface
  • Support to MySQL, Oracle Spatial, PostGIS,
    PostgreSQL
  • www.terralib.org
  • The application shows the status of a
    spatio-temporal database

31
ST Database Observer
32
Observing the crime events
?
33
Observing the crime events
34
Observing the egg traps
35
Observing the egg traps
36
Observing the egg traps
37
Observing the egg traps
38
Observing the land parcels
39
Observing the land parcels
40
Observing the land parcels
41
Observing the land parcels
42
Observing the land parcels
43
Final Remarks
  • The proposed architecture of a geographical
    database fulfills the demands of our
    spatio-temporal applications
  • The spatio-temporal database model is simple and
    can be implemented in different DBMS
  • A Querier Mechanism based on the combination of
    spatial and temporal parameters is a flexible
    alternative to deal with the different
    applications

44
Future Improvements
  • The Querier mechanism has to deal with two
    layers
  • Ex fire spots and deforestation two different
    data set that is highly related in space and in
    time
  • Build a catalog of some well-known operations
    such as trajectory using the Querier mechanism
  • Study the possibility of using the Querier
    mechanism as a processor for a ST-Language

45
The Architecture of a Flexible Querier for
Spatio-Temporal Databases
  • karine, lubia, gribeiro, cartaxo,
    gilberto_at_dpi.inpe.br
  • www.dpi.inpe.br
Write a Comment
User Comments (0)
About PowerShow.com