# QB4 MobOLAP: A Vocabulary Extension for Mobility OLAP on the Semantic Web
## 4 Results and Discussion
### Multidimensional Data Cube Definition in QB4 MobOLAP
\(h\in 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\subseteq Ld\in D\) and \(Ld\) is the dimension level. A hierarchy has a roll-up relation between its level, denoted by \(Rh\), \(Rlt=(Lc,Lp,c)\) where \(Lc\) and \(Lp\) are child and parent levels, respectively, and \(c\) is Cardinality, \(c\in\{1-1,\ast-1,1-\ast,\ast-\ast\}\), where \(\ast\) is many. For instance, \(Rh=(\)Afdeling, Plantation, \(\ast-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:rruitCollectionPoint,  
ffb:block, ffb:adeling, ffb:plantation. 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\in M=\{m_{1},m_{2},\ldots,m_{n}\}\) 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 sdmxdefinition, 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\" \"\(\sim\)ssd:integer and \"14.21\" \"\(\sim\)ssd: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\in F=\{f_{1},f_{2},\ldots,f_{n}\}\). 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[qb:level l; qb:cardinality c]; qb:component[qb:measure m; qb4:aggregateFunctionAF]). Cardinality, \(c\in\{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. QB4 OLAP defines typical aggregate functions, for example, \(AF\in\{\)_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_\".