Introduction to Moving Objects Databases - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Introduction to Moving Objects Databases

Description:

Forests, lakes, glaciers, storms, armies, cancer, continents, diseases, oil spils ... 'Produce a map of rainfall over some terrain' ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 30
Provided by: igort
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Moving Objects Databases


1
Introduction to Moving Objects Databases
  • With acknowledgements to
  • R.H. Güting and M. Schneider
  • for the figures

2
Mobile Services
  • Mobile services are services that
  • are provided to mobile (moving) user
  • take data on other mobile (moving) objects into
    consideration
  • Example
  • Weather or traffic information services to
  • users walking with PDAs or moving in their
    cars
  • Mobile services are expected to become widely
    spread (and generate a lot of movement data),
    because of continuous advances in (and price
    reduction of)
  • Mobile devices
  • Positioning technology
  • Wireless communications
  • Mobile services are based on spatio-temporal
    queries to moving objects databases
  • Ex., When the user X will enter the area being
    affected by hurricane Katrina?

3
Moving Objects Databases
  • Moving objects database is a database that can
    represent moving objects
  • Moving object is a geometry that changes over
    time continuosly, for example
  • People, animals, sattelites, spacecraft, planets,
    taxi cabs, trucks, airplanes, ships
  • Forests, lakes, glaciers, storms, armies, cancer,
    continents, diseases, oil spils
  • How to extend database technology to support
    moving object databases?

4
Outline of this lecture
  • Database Management Systems
  • Spatial Databases
  • Temporal Databases
  • Moving Objects in Databases

5
Database Management Systems
  • Database management system (DBMS) is a piece of
    software that manages a database
  • Database is a repository of interrelated data
    items that are central to the business of an
    enterprise/institution
  • Physical level
  • Data organization on storage media (files)
  • Logical level
  • Data model and query/data manipulation language
  • E.g., relational data model and SQL
  • External views
  • Application-specific view of data from logical
    level

6
Database Management Systems
  • Classical database management systems were
    conceived for relatively simple business
    applications
  • E.g., in the relational data model, simple data
    types (integers, floating-point numbers, short
    text strings)
  • We would like to widen the scope
  • Data Images, geographic maps, music, videos,
    data from scientific experiments, meteorological
    measurements
  • Queries
  • Retrieve images containing shapes similar to a
    given one
  • Produce a map of rainfall over some terrain
  • In order to formulate queries in a simple manner
    and to process queries efficiently, we need to
    extend data model and query language

7
Limitations of Classical Databases
  • No way to represent geometric shapes
  • Representation of a region as a collection of
    coordinates in numeric attributes is difficult to
    handle
  • No way to represent development of entities over
    time
  • Past state of the world is not kept
  • No way to represent objects moving right now
  • Continuous updates are not feasible

8
Outline of this lecture
  • Database Management Systems
  • Spatial Databases
  • Temporal Databases
  • Moving Objects in Databases

9
Spatial Databases
  • Spatial database (DBMS) allows representing and
    querying geometries in a natural way
  • Entities to be stored in a spatial database
  • Cities, rivers, road networks, landmarks,
    boundaries of countries, hospitals, subway
    stations, forests, corn fields
  • Fundamental abstractions
  • Single objects point, line, region
  • Spatially related collections of objects
    partition, network

10
Extending Data Model and Query Language the
ROSE Algebra
  • Spatial data type (STD) is a structure (e.g.,
    region)
  • Algebra is a collection of abstract data types,
    e.g., STDs, with related operations
  • Algebra must be closed under its operations!
  • The ROSE algebra
  • STDs points, line, region
  • Operations
  • Intersection line x line ? points
  • Minus region x region ? region
  • Contour region ? line
  • Length line ? real
  • Inside points x region ? bool
  • Adjacent region x region ? bool

11
Extending Data Model and Query Language the
ROSE Algebra
  • We embed STDs into a DBMS data model (e.g., into
    a relational model) in the role of attribute
    types
  • Sample relations
  • Cities (name string, population int, location
    points)
  • Rivers (name string, route line)
  • Highways (name string, route line)
  • States (name string, area region)
  • Sample queries
  • What is the total population of cities in
    France?
  • SELECT SUM(c.pop)
  • FROM cities AS c, states AS s
  • WHERE c.location inside s.area AND s.name
    FRANCE
  • Return the part of the river Rhine that is
    within Germany
  • SELECT intersection (r.route, s.area)
  • FROM rivers AS r, states AS s
  • WHERE r.name RHINE AND s.name GERMANY

12
Extending Data Model and Query Language the
ROSE Algebra
  • Implementation strategy
  • Data structures for STDs
  • Algorithms for STDs operations
  • Spatial index structures with appropriate access
    methods
  • Spatial join methods
  • Cost functions for all methods, for use by the
    query optimizer
  • Statistics about the distributions of objects in
    space,
  • needed for selectivity estimation
  • Extension of the optimizer (e.g., translation
    rules)
  • User interface extensions to handle presentation
    of spatial data and input of spatial values for
    querying
  • Some of these have become available in commercial
    systems
  • Good extensibility by attribute data types and
    operations
  • Oracle, IBM DB2, Informix, MySQL
  • Limited extensibility by index structures
  • Limited extensions of the query optimizer

13
Outline of this lecture
  • Database Management Systems
  • Spatial Databases
  • Temporal Databases
  • Moving Objects in Databases

14
Temporal Databases
  • Standard DBMS describe the current state of the
    world
  • A change in the world leads to update in the
    database
  • Previous state is lost!
  • Application can manage time itself
  • Explicit attribute of type date or time
  • Sample relation
  • Employee (name string, department string,
    salary int, start date, enddate)
  • Disadvantages of this approach
  • Complex query formulation
  • Inefficient query processing
  • We need to
  • integrate temporal concepts deeply into the DBMS
    data model and query language
  • extend the implementation of the system to
    archieve efficient execution

15
The Time Domain
  • Time is a one-dimensional space extending from
    the past to the future
  • Different models of time
  • Bounded vs. infitite
  • Discrete vs. continuous
  • Discrete and continuous time
  • With continuous time, points in time are
    isomorfic to real numbers
  • With discrete time, atomic time intervals
    (chronons) are isomorfic to natural numbers
  • Time also can be
  • Absolute (anchored), e.g., January 22, 2002,
    1200 PM
  • Relative (unanchored), e.g., three weeks
  • Temporal data types
  • Instant a chronon or a point in time
  • Period an anchored interval
  • Periods a set of disjoint anchored intervals
    (temporal elements)
  • Interval an unanchored time interval of known
    length

16
Time Dimension
  • Two kinds of time
  • Valid time is the time in the real world when an
    event occurs or a fact is valid
  • Transaction time is the time when a change is
    recorded in the database or a time interval
    during which a particular state of the database
    exists
  • Four types of databases
  • Snapshot database
  • Standard database
  • Valid-time (historical) database
  • Transaction-time (rollback) database
  • Bitemporal database
  • Supports both valid time and transaction time
  • Temporal database (DBMS) is a database (DBMS)
    that supports valid time and/or transaction time

17
Time Dimension Temporal Relations
  • Snapshot relation
  • Valid-time relation
  • Transaction-time
  • relation
  • Bitemporal relation

18
Extending Data Model
  • General approach
  • Database facts are associated with timestamps
  • Alternatives
  • Data model extended
  • Relational vs. object-oriented
  • Granularity of facts
  • Tuples/objects vs. attributes
  • Kind of timestamp
  • a single chronon (instant)
  • a single time period (period)
  • a temporal element (periods)
  • Time dimension
  • Valid time
  • Transaction time
  • Both dimensions

19
Extending Data Model BCDM model
  • Data model extended relational
  • Granularity of facts tuple
  • Kind of timestamp a single chronon
  • Time dimension both dimensions

20
Extending Query Language TSQL2
  • TSQL2
  • is a superset of SQL92
  • is based on BCDM model
  • Sample data definition command
  • CREATE TABLE prescription (
  • name char(30),
  • drug char(30),
  • dosage char(30),
  • frequency interval minute)
  • AS VALID STATE DAY AND TRANSACTION
  • Kinds of relations
  • Snapshot
  • Valid-time
  • Transaction-time
  • Bitemporal

21
Extending Query Language TSQL2
  • Sample queries
  • What has ever been prescribed any drugs?
  • SELECT SNAPSHOT name
  • FROM prescription
  • What drugs were prescribed to Lisa?
  • SELECT drug
  • FROM prescription
  • WHERE name Lisa
  • What drugs have been prescribed together with
    aspirin?
  • SELECT p1.name, p2.drug
  • FROM prescription AS p1, prescription AS p2
  • WHERE p1.drug aspirin AND
    p2.drugltgtaspirin
  • AND p1.name p2.name
  • Which drugs was Lisa prescribed during 1999?
  • SELECT p.drug
  • VALID INTERSECT (VALID(p), PERIOD 1999
    DAY)
  • FROM prescription AS p
  • WHERE p.name Lisa
  • What did the physician believe on September 10,
    1998, was Lisas prescription history?

22
Outline of this lecture
  • Database Management Systems
  • Spatial Databases
  • Temporal Databases
  • Moving Objects in Databases

23
Moving Objects in Databases
  • Moving object is a geometry that changes over
    time continuosly
  • Moving objects database is a database that can
    represent moving objects
  • Two perspectives on
  • moving objects databases
  • Location management perspective
  • Spatio-temporal data perspective

24
Location Management Perspective
  • Location management database is a snapshot
    database that is used to
  • maintain dynamically the locations of a set of
    currently moving objects
  • ask queries about the current or near-future
    positions of
  • the moving objects
  • Main task
  • Keeping the positions of a set of objects in a
    database,
  • e.g., a set of taxi cars, up-to-date
  • Scenario
  • Moving objects send their current positions to
    the database and
  • the database performes updates
  • Trade-off
  • If updates performed very often, then
  • the error is small
  • the update load is very high
  • If updates performed less frequently, then
  • the update load is low
  • the error is large
  • Solution
  • Additionaly, store speed and direction of moving
    objects

25
Spatio-Temporal Data Perspective
  • Spatio-temporal database is a spatial database
    that keeps history of changes to spatial objects
  • Two basic questions
  • What kinds of data are stored in spatial-temporal
    databases?
  • Point, line, region, network, partition
  • Which kinds of change may occur?
  • Discrete change any kind of data
  • Continuous change point and region
  • Moving object is a geometry that experience
    continuous changes
  • Two most important abstractions of moving
    objects
  • Moving point is an abstraction of a physical
    object moving around in the plane, for which only
    position is relevant
  • Moving region is an abstraction of an entity in
    the plane that changes its position, extent, and
    shape

26
Extending Data Model and Query Language
Temporal Database with STDs
  • Idea
  • Use a temporal DBMS and extend it with spatial
    data types (STDs).
  • Example TSQL2/BCDM extended with the ROSE
    algebra
  • Sample data definition command
  • CREATE TABLE real_estate (
  • owner char(30),
  • area region)
  • AS VALID STATE DAY
  • Sample query
  • Show the properties adjacent to the property
    of Charles Smith as of March 17, 1977
  • SELECT r2.area
  • FROM real_estate AS r1, real_estate AS r2
  • WHERE r1.owner Charles Smith AND
  • VALID(r1) OVERLAPS DATE 1977-03-17 AND
  • r1.area ADJACENT r2.area
  • This approach supports discrete changes, but does
    not support moving objects, i.e., continuous
    changes!

27
Extending Data Model and Query LanguageSpatio-Te
mporal Data Types
  • Idea
  • Use spatio-temporal data types with suitable
    operations
  • Spatio-temporal data types mpoint, mregion
  • Operations
  • Intersection mpoint x mregion ? mpoint
  • Distance mpoint x mpoint ? mreal
  • Min mreal ?
    real
  • Trajectory mpoint ?
    line
  • Deftime mpoint ?
    periods
  • At_time mregion x instant ?
    region
  • At_time mbool x instant ?
    bool
  • Length line ?
    real
  • Adjacent mregion x mregion ? mbool
  • This approach can manage both discrete and
    continuous changes!

28
Extending Data Model and Query Language
Spatio-Temporal Data Types
  • Sample relations
  • real_estate (owner char(30), areamregion)
  • flight (id string, from string, to string,
    route mpoint)
  • weather(id string, kind string, area mregion)
  • Sample queries
  • Show the properties adjacent to the property of
    Charles Smith as of March 17, 1977
  • SELECT at_time(r2, instant(March 17, 1977))
  • FROM real_estate AS r1, real_estate AS r2
  • WHERE r1.owner Charles Smith AND
  • at_time(adjacent(r1.area, r2.area),
    instant(March 17, 1977))
    true
  • Find all flight from Düsseldorf that are longer
    than 5,000 km?
  • SELECT id
  • FROM flight
  • WHERE fromDUS AND length(trajectory(route)) gt
    5000
  • Retrieve any pairs of airplanes, which, during
    their flight, came closer to each other than 500
    meters
  • SELECT f.id, g.id
  • FROM flight AS f, flight AS g
  • WHERE f.id ltgt g.id AND min(distance(f.route,g.
    route)) lt 0.5
  • At what time was flight BA488 within the
    snowstorm with ID S16?

29
Summary
  • Moving object databases are databases that allow
    efficient representing and querying of moving
    objects
  • Moving object is a geometry that changes
    continuously
  • Classical data models and query languages (and
    their implementations) need to be extended to
    support moving objects
  • Spatial extension
  • Spatial databases STDs with operations (ROSE
    algebra)
  • Temporal extension
  • Temporal databases BCDM data model and TSQL2
  • Spatio-temporal extensions
  • Temporal databases with STDs
  • Spatio-temporal data types with related
    operations
  • Location management database
Write a Comment
User Comments (0)
About PowerShow.com