Database Reference
In-Depth Information
function
. The simplest approach to define similarity between two trajectories is
viewing them as vectors and using the Euclidean distance as similarity mea-
sure. The problem with this technique is that it cannot be easily applied to
trajectories having different length or sampling rate (see Chapter
2
), and it
is not effective in the presence of noise in the data. A typical way of aggre-
gating trajectories is clustering them together, considering different distance
functions or other characteristics (e.g., same starting point, same ending point,
etc.). Discovering trajectories with the same pattern is another way of aggre-
gating trajectories. This is extensively covered in Chapters
6
,
7
,and
8
of this
topic.
Finally, in Section
4.6
we will study an alternative design of a trajectory data
warehouse, where space and time are partitioned into spatio-temporal cells, and
where each cell contains aggregated measures that are precomputed from the
trajectories that cross the cell. Examples of such aggregated measures would
be the number of trajectories or their average speed. In this way, the movement
tracks of individual trajectories are no longer stored in the data warehouse, only
aggregated data about the trajectories are kept.
4.4 Querying Trajectory Data Warehouses
In order to address queries to our TDW we translate the conceptual schema in
Figure
4.2
into a snowflake schema.
Episode
becomes a fact table, dimension
levels become dimension tables (with identifier
id
), and foreign keys are used
for linking the fact table to dimension tables, and to link dimension tables that
represent two consecutive levels in a dimension hierarchy. For example, the
hierarchical relationship between
District
and
Zone
is represented by the
attributes
zone
in the former and
id
in the latter, where
id
is a foregin key
referencing
zone
. The resulting schema is given next.
Episode(time, district, road, trajectory, car, route, distance,
duration, avgSpeed)
Time(id, date, week, isHoliday, ..., month)
Month(id, month, ..., quarter)
Quarter(id, quarter, ..., year)
Year(id, year, ...)
District(id, name, population, area, ..., zone)
Zone(id, number, name, ...)
Road(id, number, name, ...)
Trajectory(id, number, distance, duration, startTime, endTime,
startLocation, endLocation, ...)
Car(id, number, model, year, fuel, ..., carType)
CarType(id, name, ...)