4.2. Multidimensional Data Cube Definition in QB4MobOLAP
The QB4OLAP vocabulary modeled a multidimensional data cube in RDF terms. Multidimensional models are typically interpreted as data cubes, with cube cells corresponding to observational facts that are central to MD analysis. Facts have a set of properties called measures, which have aggregate functions that can be defined. To provide alternative analytic viewpoints, a data cube has n dimensions (with the attribute of contextual information) on a multidimensional space, where each dimension might have hierarchies with levels. Users can aggregate measures (of facts) at multiple levels of detail by using levels (of dimensions) (also known as granularity). Dimensions and facts are tied to the structure to assist this analysis at various detail levels. Levels also include attributes that describe the basic features of the members of the level.
These MD concepts (cube elements) and their roles and relationships are annotated at the schema level in RDF triple format using the QB4OLAP Vocabulary. Schema level (RDF) cube elements correspond to tables and columns (of tables) in an MD. Fact members with measure values and level members with attribute values are instance-level MD concepts annotated at the instance level with QB4MobOLAP Vocabulary. These instance level (RDF) cube elements correspond to the actual data rows/records annotated in triple format with QB4MobOLAP.
An RDF triple t is made up of three parts: the subject (s), the predicate (p), and the object (o), which is defined as triple (s,p,o) ∈ t = (I ∪ Bn) × I × (I ∪ Bn ∪ L), where I is the set of IRIs, Bn is the set of blank nodes, and L is the set of literals. The Cube Schema (CS), with element x defined as CS(x) ∈ (I ∪ Bn ∪ L), yields a set of triples T and is denoted by (x rdf:type ex:Property).
MD Schema. A data structure definition (DSD) contains information about the schema of a data set (i.e., a cube, an instance of the class qb:DataSet). The DSD can be applied to a variety of data sets. A data set’s DSD includes dimensions, levels, measures, and attributes, in addition to component properties. As CS = DSD, the DSD is defined by a conceptual MD cube schema CS, which includes a collection of dimension types D, a collection of measures M, and a collection of fact types as CS = (D, M, F). The following definitions apply to the cube schema elements:
Attributes. An attribute a ∈ A = {a1, a2, …, an} has a domain a:dom in the cube schema CS with a set of triples ta ∈ T where ta is represented as (a rdf:type qb:AttributeProperty; rdfs:domain xsd:Schema).
Levels. A level l ∈ L = {l1, l2, …, ln} consists of a set of attributes Al, which is defined by a schema l(a1: dom1, …, an: domn), where l is the level, and each attribute a is defined over the domain dom. For each level l ∈ L in the cube schema CS, a set of triples tl ∈ T, is represented as (l rdf:type qb4o:LevelProperty; qb4o:hasAttribute a). Relevant levels for FFB DW examples are the Plantation level and the Afdeling level, described in example 1. Afdeling is an area in a plantation that is larger than a block. An afdeling has many blocks.
Examples 1
ffb:plantation rdf:type qb4o:LevelProperty; |
qb4o:hasAttribute ffb:plantationKey; |
qb4o:hasAttribute ffb:plantationName; |
qb4o:hasAttribute ffb:plantationGeo; |
qb4o:hasAttribute ffb:PMOGeo; |
qb4o:hasAttribute ffb:gateGeo. |
ffb:afdeling rdf:type qb4o:LevelProperty; |
qb4o:hasAttribute ffb:afdelingKey; |
qb4o:hasAttribute ffb:afdelingName; |
qb4o:hasAttribute ffb:afdelingGeo. |
Hierarchies. A hierarchy h ∈ H = {h1, h2, …, hn}, in the cube schema CS, is specified with a set of triples th ∈ T, and represented as (h rdf:type qb4o:HierarchyProperty; qb4o:hasLevel l; qb4o:inDimension D). h ∈ H is specified as h = (Lh, Rh) for each hierarchy, where Lh is a hierarchy level. Lh is a subset of Ld levels of the dimension D where Lh ⊆ Ld ∈ D and Ld is the dimension level. A hierarchy has a roll-up relation between its level, denoted by Rh, Rh = (Lc, Lp, c) where Lc and Lp are child and parent levels, respectively, and c is Cardinality, c ∈ {1 − 1, * − 1, 1 − *, * − *}, where * is many. For instance, Rh = (Afdeling, Plantation, *−1) shows that the roll-up relation between the child level Afdeling to the parent level Plantation is many-to-one, which means that plantation could have many afdelings. Relevant hierarchies for FFB DW examples include PlantationGeography, which is described in example 2.
Examples 2
#Hierarchies: |
ffb:plantationGeography rdf:type qb4o:hierarchy; |
qb4o:inDimension ffb:plantationDim; |
qb4o:hasLevel ffb:fruitCollectionPoint, |
ffb:block, ffb:afdeling, ffb:plantation. |
Dimensions. A set of dimensions D = {d1, d2, …, dn} form a cube schema with n dimensions. Each d ∈ D contains a tuple d = (L, H), where L is a Level and H is a Hierarchy. In the cube schema CS, each dimension d ∈ D has a set of triples td ∈ T, which are defined as (d rdf:type qb:DimensionProperty; qb4o:hasHierarchy h). Example 3 gives instances of four dimensions in FFB DW.
Example 3
#Dimensions: |
ffb:plantationDim rdf:type qb:DimensionProperty; |
qb4o:hasHierarchy ffb:plantationGeography. |
ffb:roadDim rdf:type qb:DimensionProperty; |
qb4o:hasHierarchy ffb:roadGeography. |
ffb:truckDim rdf:type qb:DimensionProperty; |
qb4o:hasHierarchy ffb:ownerName. |
ffb:dateDim rdf:type qb:DimensionProperty; |
qb4o:hasHierarchy ffb:timeHierarchy. |
Measures. Facts have a property called measures. A measure m ∈ M = {m1, m2, …, mn} in the cube schema CS is represented as (m rdf:type qb:MeasureProperty; rdfs:subPropertyOf sdmx-measure:obsValue; rdfs:domain xsd:schema). Measures are encoded with the sdmx definition, sdmx-measure:obsValue, which, for the attributes of rdfs:domain, specifies the schema of the measure property, and, for rdfs:range, defines the value types, i.e.,; integer, decimal, etc. For example, in FFB DW, there are duration and distance measures where the instance value is in the form of “65” ^^xsd:integer and “14.21” ^^xsd:decimal. Measures are related to facts and dimension levels.
Facts. Facts are associated with values of dimensions and measures. A fact is denoted as f ∈ F = { f1, f2, … , fn}. The relation of the facts is described in components in the schema level of the definition of the facts cube, which is determined by (F rdf:type qb:DataStructureDefinition; qb:component[qb4o:level l; qb4o:cardinality c]; qb:component[qb:measure m; qb4o:aggregateFunctionAF]). Cardinality, c ∈ {1 − 1, 1 − *, * − 1, * − *} specifies the relationship cardinality between facts and level members. The definition of the cube schema requires the specification of measures’ aggregate functions. QB4OLAP defines typical aggregate functions, for example, AF ∈ {Sum, Avg, Count, Min, Max}. The facts are presented at the instance level, with each fact f having a unique IRI I, an observation. The fact is represented as (f rdf:type qb:Observation). An example of a fact instance f with its relation to measure values and dimension levels is a sale transaction from customer “Anton” (dimension level value), for a product “Digital Camera” (another dimension level value), with a unit price of “1000” (measure value) Malaysian Ringgit, and a sales amount of “2” (another measure value) units. The fact member and dimension level customers have one-to-many relationships, which means that the same customer can make multiple sales. The aggregate function can be specified to measure unit price as “Average/Avg”, and the sales amount can be specified as “Sum”
.
4.3. Defining Spatiotemporally Enhanced MD Data in QB4MobOLAP
Spatial Attributes. Spatial attributes are specified on a domain level. Each attribute with a geometry domain (sa: domgeo ∈ A) is a member of the geo:Geometry class and is referred to as a spatial attribute, which is represented in the cube schema CS as (sa rdf:type qb:AttributeProperty; rdfs:domain geo:Geometry). In the instances, each spatial attribute type (point, polygon, line, etc.) is assigned using the predicate rdfs:range.
Spatial Levels. In the cube schema CS, a spatial level ls ∈ L is defined by a set of triples tls ∈ T and represented as (ls rdf:type qb4o:LevelProperty; qb4o:hasAttribute a, as; geo:hasGeometry geo:Geometry). Spatial levels must be geo:Geometry class members and may have spatial attributes. Example 4 shows the Plantation level as a spatial level with spatial attributes.
Example 4
#Attributes |
ffb:plantationKey rdf:type qb4o:levelAttribute; |
qb4o:inLevel ffb:plantation; |
rdfs:range xsd:Integer. |
ffb:plantationName rdf:type qb4o:levelAttribute; |
qb4o:inLevel ffb:Plantation; |
rdfs:range xsd:String. |
ffb:plantationGeo rdf:type qb4o:levelAttribute; |
qb4o:inLevel ffb:plantation; |
rdfs:subPropertyOf geo:Geometry; |
rdfs:range geo:wktLiteral; |
rdfs:domain geo:Polygon; |
rdfs:subClassOf geo:SpatialObject; |
Spatial Hierarchies. Two or more spatial levels ls relate to each other to create a spatial hierarchy hs ∈ H. The spatial hierarchy step describes a roll-up relation between the spatial levels. QB4SOLAP introduces topological relations, Tr, in addition to cardinalities in the roll-up relation that are encoded as R = (Lc, Lp, c, Tr) for the spatial hierarchy steps. Let tshs ∈ T be a set of triples to represent a hierarchical step for spatial levels in hierarchies, which is given with a blank node: _shhs ∈ B and encoded as (:_shhs rdf:type qb4o:HierarchyStep; qb4o:childLevel slhci; qb4o:parentLevel slhpi; qb4o:cardinality c; qb4so:hasTopologicalRelation Tr) where slhci ∈ Lc, slhpi ∈ Lp. For example, a spatial hierarchy is “geography”, which should have spatial levels (e.g., FruitCollectionPoint, Block, Afdeling, and Plantation) with the roll-up relation Rh = (Block, Afdeling, many-to-one, within), which also specifies that the child-level Afdeling is “within” the parent level Plantation.
Spatial Dimensions. Dimensions are considered spatial if they contain at least one spatial hierarchy. More than one dimension can share the same spatial hierarchy and spatial levels as that hierarchy.
Spatial Measures. A Spatial measure sm ∈ M is specified by a set of triples tsm ∈ T and represented as (sm rdf:type qb:MeasureProperty; rdfs:subPropertyOf sdmx-measure:obsValue; rdfs:domain geo:Geometry) in the cube schema CS. Spatial measures are represented by a geometry that uses geometry serialization standards in OGC schemas. For example, a spatial measure is a trajectory that contains a list of coordinates of locations, which is given as a line geometry type and is associated with an observational fact of the trajectory of delivery.
Mobility Measures. A mobility measure mm ∈ M is specified in the cube schema CS by a set of triples tmm ∈ T and encoded as (mm rdf:type qb:MeasureProperty; rdfs:subPropertyOf sdmx-measure:obsValue; rdfs:domain qb4mob:MobilityBase/MobilityGeometry). The class of the numeric value is given with the property rdfs:domain, and rdfs:range assigns the values from the class qb4mob:MobilityBase/mobilityPoint, i.e., the temporal integer, temporal float, temporal point, temporal polygon, etc., at the instance level. Mobility measures are represented by a mobility base/geometry. These mobility measures use schema extension of OGC schemas with temporal natures that change over time.
Mobility Facts. Mobility facts Fm have mobility/spatiotemporal natures that are related across several dimensions, either spatial or temporal. The mobility fact cube has mobility measures (mm), as its members make it possible to aggregate mobility measures with the aggregation functions Magg. Representation of a complete mobility fact cube at the schema level in RDF is given by a set of triples tfs ∈ T and encoded as (fs a qb:DataStructureDefinition; qb: component [qb: measure ms, sdmx-measure:obsValue; qb4mob:aggregate-functionMAF]). QB4MobOLAP extends the built-in functions of QB4OLAP with mobility aggregation functions, which are added with the class qb4mob:MobilityTemporalAggrFunc or qb4mob:MobilitySpatialAggrFunc. An example of a mobility fact instance fm with its relation to measuring values and dimension levels is a truck route delivery of some fruits (ffb:Route), which are created routes with coordinate points of the location that change by time. The cardinality of the dimension level truck and fact member is one-to-many, where a truck could have some delivery routes. Specification of the mobility aggregate function for route (coordinate points by time) can be specified as the “Time Centroid/TCentroid” route of locations.
Example 5
#Measures |
ffb:Distance rdf:type qb:MeasureProperty; |
rdfs:range xsd:decimal. |
ffb:Duration rdf:type qb:MeasureProperty; |
rdfs:range xsd:Time. |
ffb:Route rdf:type qb:MeasureProperty; |
rdfs:domain qb4mob:MobilityPoint; |
rdfs:range geo:wktLiteral; |
rdfs:subClassOf qb4mob: MobilityObject. |
ffb:Trajectory rdf:type qb:MeasureProperty; |
rdfs:domain geo:Linestring; |
rdfs:range geo:wktLiteral; |
rdfs:subClassOf geo:SpatialObject. |
ffb:Load rdf:type qb:MeasureProperty; |
rdfs:domain qb4mob:MobilityInteger; |
rdfs:range geo:wktLiteral; |
rdfs:subClassOf qb4mob:MobilitylObject. |
#Cube Definition |
ffb:freshFruitBunchDelivery rdf:type qb:DataStructureDefinition; |
#Lowest level for each dimension |
qb:component [qb4o:level ffb:plantation; |
cardinality qb4o:ManyToOne]; |
qb:component [qb4o:level ffb:truck; |
cardinality qb4o:ManyToOne]; |
qb:component [qb4o:level ffb:date; |
cardinality qb4o:ManyToOne]; |
#Cube measures |
qb:component [qb:measure ffb:Duration; qb4o:aggregateFunction qb4o:Avg]; |
qb:component [qb:measure ffb:Distance; qb4o:aggregateFunction qb4o:Avg]; |
qb:component [qb:measure ffb:Trajectory; qb4o:aggregateFunction qb4so:Centroid]; |
qb:component [qb:measure ffb:Route; qb4o:aggregateFunction qb4mob:TCentroid]; |
qb:component [qb:measure ffb:Load; qb4o:aggregateFunction qb4mob:TSum]; |
4.4. Defining MD Data Instance in QB4MobOLAP
The previous sub-chapter has shown that the data cube schema can be represented using QB4MobOLAP in the RDF format. This sub-chapter will explain the representation of the Delivery cube instance using QB4MobOLAP. The notation Graph Instance (GI) represents the RDF Graph of the data cube instance. The notation ffbi: is used for the prefix of GI, and the subgraph that refers to the specific instance with the index i is denoted by GI (i).
Level Members. A level
l has a set of level members
LM (
l) ={
lm1,...,
lmy}. Each level member
lmi has a unique IRI
idI (
lmi) ∈
I, linked in the cube instance graph
GI with the qb4o:LevelMember predicate. A level member is related to its level by the qb4o:memberOf property. The RDF graph formulation of the level members
LM (
l) is represented as
Definition of Level Members’ attributes. A level member has an attribute set lm = {a1, a2, …., ap}, which is used to describe the characteristics of the level member. Each attribute ai is linked to the level member with the identifier id (ai).
Example: The triples below show how some level members of the FFB DW are represented in RDF.
Example 6
#Instance |
ffbi:plantation_1 rdf:type qb4o:LevelMember; |
qb4o:memberOf ffb:plantation; |
ffb:plantationName “PT. LestariPlantation”; |
ffb:plantationGeo “POLYGON((-7.7737022 110.4307821, -7.7753163 110.4306087, …. ))”^^geo:wktLiteral |
ffb:PMOGeo “POINT(-7.7753163 110.435160)”ˆˆgeo:wktLiteral; |
ffb:gateGeo “POINT(-7.7753163 110.4352012)”ˆˆgeo:wktLiteral. |
ffbi:afdeling_2 rdf:type qb4o:LevelMember; |
qb4o:memberOf ffb:afdeling; |
ffb:afdelingName “Afdeling Alfa”; |
ffb:afdelingGeo “POLYGON((-7.7737022 110.4307821, -7.7753163 110.4306087, …. ))”^^geo:wktLiteral; |
skos:broader ffbi:plantation_1. |
Fact Members. A fact
F has a set of data members
FM (
F) = {
f1,
f2, …,
ft}, which are the instances of the data cube. Each fact
fi ∈
FM has a unique IRI id (
fi) ∈
I, which is linked in the cube instance graph
GI with the qb:Observation predicate. A fact member f
i is related to a set of dimension level
L(
fi) = {
l1,
l2, ….,
lr }and has a set of measure
M(
mi) = {
m1,
m2, ….,
mr}. Each dimension level
lj is linked to level member with the identifier id-S (
lj) and each measure
mk is linked to the level member with the identifier id-S(
mk). Dimension values and measure values are associated with a fact F. Dimension values are denoted by
f →
v(
di) and measure values denoted by
f →
v(
mj). The value of
v(
di) ∈
I, is the identifier of a level member in
LM (
lj). The value of every measure
mj is a literal such that
v(
di) ∈
L. The RDF graph formulation of the fact members
FM (
F) is represented as:
The RDF representation example below shows the fact member of FFB DW using the above definition. Note that the fact member and corresponding level members relating to dimensions are given with the prefix ffbi:. idS (aID) is a surrogate key that links the fact member with the corresponding dimensions.
Example 7
#Measure Instance |
ffbi:delivery_071219_1 rdf:type qb:Observation; |
ffb:truckKey ffbi:truck_1; |
ffb:dateKey ffbi:date_1; |
ffb:plantationKey ffbi:plantation_1; |
ffb:Route “TGEOGPOINT((-7.7737022 110.4307821@2019-09-02 08:00:01, |
-7.7753163 110.4306087@2019-09-02 08:00:01, …))^^geo:wktLiteral; |
ffb:trajectory “LINESTRING((-7.7737022 110.4307821, -7.7753163 110.4306087, …. )) “^^geo:wktLiteral; |
ffb:Load “TINT( 25@2019-09-02 08:00:01, 35@2019-09-02 08:00:02,…) “^^geo:wktLiteral; |
ffb:Distance “15.23”^^xsd:decimal; |
ffb:Duration “00:20:36”^^xsd:Time; |
4.5. Querying the Fresh Fruit Bunch for Transportation and Production Analysis
To evaluate or give proof of concept regarding how to implement mobility data cube concepts on the SW, and express queries for transportation and production analysis, the Fresh Fruit Bunch (FFB) data warehouse was explored. The FFB DW was built to support factory executives and farmers’ cooperation to analyze the transportation, loading/unloading, or even plantation productivity. The analysis aimed to reduce the transportation time to the POM to minimize the FFB quality loss, maximize the road support for effective FFB transportation, and maximize plantation productivity.
The queries are executed using the SPARQL, GeoSPARQL, and SPARQL function extensions for mobility queries that were developed in this research. These queries gather descriptive, diagnostic, and discovery analysis to know the event and phenomenon and the reason behind the event from the DW encoded in QB4MobOLAP vocabulary. The queries combine typical OLAP operations, such as roll-up, slice, spatial slice, temporal slice, and dice, with spatial and temporal operations on MOs.
The FFB DW contains 8826 triples consisting of approximately 7000 fact triples with nearly 1000 temporal data points each. In conventional data storage, the triple is equivalent to approximately 7 million records. The RDF graph is published using the GraphDB server on the Windows platform with a Pentium Core i5 8th generation with 16GB RAM computer. The server can be accessed at
http://lod.if.fti.uajy.ac.id:7200/sparql, accessed on 10 June 2021.
Query#1: Give the average distance traveled by each truck per month in Q3 2019.
The query involves some operations that are rolled-up along the Time and Truck dimensions. Then, the computation of the distance on the moving object data is conducted. Finally, slicing operations are performed for the Time dimension.
SELECT ?month ?truckKey (AVG(jsfn:length(?droute)) as ?lengthRoute) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:dateKey ?dateKey; |
ffb:Route ?droute. |
?dateKey qb4o:memberOf ffb:date; |
ffb:quarter ?quarter; |
ffb:year ?year; |
ffb:month ?month. |
FILTER ((?quarter = 3) && (?year=2019))} |
GROUP BY ?month ?truckKey |
Query#2: Give the average delivery duration per truck owner in September 2019.
The query involves some operations that are rolled-up along the Truck dimension. Then, the computation of the duration of the moving objects is conducted. Finally, slicing operations are performed for the Time dimension.
SELECT ?oName (AVG(jsfn:Duration(?droute)) as ?RouteTimeSpan) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:dateKey ?dateKey; |
ffb:Route ?droute. |
?dateKey qb4o:memberOf ffb:date; |
ffb:month ?month; |
ffb:year ?year. |
?truckKey qb4o:memberOf ffb:truck; |
ffb:ownerName ?oName. |
FILTER ((?month = 9) && (?year=2019)) |
} GROUP BY ?oName |
Query#3: Give the average duration of FFB delivery inside the Afdeling Alfa per truck owner.
The query involves some operations that are rolled-up along the Truck dimension. Then, the computation of the duration of the moving objects and geometry operations is conducted. Finally, spatial-slicing operations are performed within areas as a spatial function, sfWithin.
SELECT ?oName |
(AVG(jsfn:Duration(jsfn:insideGeometry(?droute,?afdelingGeo))) as ?x) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:Route ?droute; |
ffb:plantationKey ?plantationKey. |
?plantationKey qb4o:memberOf ffb:plantation; |
ffb:plantationGeo ?plantationGeo. |
?afdelingKey qb4o:memberOf ffb:afdeling; |
ffb:afdelingGeo ?afdelingGeo; |
ffb:afdelingName ‘Afdeling Alfa’. |
?truckKey qb4o:memberOf ffb:truck; |
ffb:ownerName ?oName. |
FILTER (geof:sfWithin(?afdelingGeo,?plantationGeo))} |
GROUP BY ?oName |
Query#4: Compute the truck’s average speed from the farmer’s plantation to the factory.
The query involves spatiotemporal roll-up along the Truck dimension, speed computation of the delivery, and slicing of the truck and date dimension.
SELECT ?lplate (AVG(jsfn:TWAvg(jsfn:TSpeed(?droute))) as ?AvgSpeed) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:dateKey ?dateKey; |
ffb:Route ?droute. |
?truckKey qb4o:memberOf ffb:truck; |
ffb:ownerName ?oName; |
ffb:licensePlate ?lplate. |
?dateKey qb4o:memberOf ffb:date; |
ffb:year ?year. |
FILTER ((?oName != ‘Factory’) && (?year = 2019))} |
GROUP BY ?lplate |
Query#5: Compute the average queue time in Palm Oil Mills (POM) by each truck owner in 2019.
The query involves some operations roll-up along the Truck dimension, computation of the queue time, and slicing operations performed for the Time dimension. The truck timespan, in a radius of 100 m from the loading ramp POM, defines the queue time.
SELECT ?oName |
(AVG(jsfn:Duration(jsfn:insideRadius(?droute,?PMOGeo,100))) as ?AverageQueueTime) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:dateKey ?dateKey; |
ffb:Route ?droute; |
ffb:plantationKey ?plantationKey. |
?dateKey qb4o:memberOf ffb:date; |
ffb:year ?year. |
?plantationKey qb4o:memberOf ffb:plantation; |
ffb:plantationGeo ?plantationGeo; |
ffb:PMOGeo ?PMOGeo. |
?truckKey qb4o:memberOf ffb:truck; |
ffb:ownerName ?oName. |
FILTER (?year = 2019) |
} |
GROUP BY ?oName |
Query#6: Compute the total Palm FFB harvest of each afdeling and block in the year between 2017 and 2019. This query involves some roll-up operations along the spatial dimension (afdeling and block), spatial computation of insideGeometry, slicing operations for periods, and spatial slice function.
SELECT |
?afdelingName ?blockName |
(SUM(jsfn:AtTimeStamp(?dload,(jsfn:EndTime |
(jsfn:GetTime(jsfn:insideGeometry(?droute,?blockGeo)))))- |
jsfn:AtTimeStamp(?dload,(jsfn:StartTime |
(jsfn:GetTime(jsfn:insideGeometry(?droute,?blockGeo)))))) as ?PSum) |
WHERE { |
?obs rdf:type qb:Observation; |
ffb:truckKey ?truckKey; |
ffb:dateKey ?dateKey; |
ffb:Load ?dload; |
ffb:Route ?droute. |
?dateKey qb4o:memberOf ffb:date; |
ffb:year ?year. |
?afdelingKey qb4o:memberOf ffb:afdeling; |
ffb:afdelingGeo ?afdelingGeo; |
ffb:afdelingName ?afdelingName. |
?blockKey qb4o:memberOf ffb:block; |
ffb:blockGeo ?blockGeo; |
ffb:blockName ?blockName. |
FILTER((?year >=2017)&&(?year <=2019)&&geof:sfWithin(?blockGeo,?afdelingGeo)) |
} |
GROUP BY ?afdelingName ?blockName |
The prefixes used in this query are:
Table 3 shows the experimental results for the six queries after five executions. Queries were executed many times to ensure optimal cache usage. It was shown that the Mobility DW on the SW has a convenient, simple model and expressive performance (below 3 s for regular OLAP query, below 1 min for spatiotemporal OLAP query with spatial slice combination, and approximately 2 min for OLAP query with extensive spatial slice combination). The spatial operations made the queries take a longer time. The usage of mobility fact measures in the DW adds query expressiveness and prevents extensive joining, as was the case for the previous segment trajectories proposal. Developing a detailed performance analysis as a comprehensive set of experiments is outside the scope of this paper and is planned in future work.