$$%% examples \newcommand{\exGraph}{\graph_{\mathrm{ex}}} \newcommand{\exOnto}{\onto_{\mathrm{ex}}} \newcommand{\exMappings}{\mappings_{\mathrm{ex}}} \newcommand{\exExtensions}{\extensions_{\mathrm{ex}}} \newcommand{\exRule}{r_{\mathrm{ex}}} \newcommand{\RDFSrules}{\rules_{\mathrm{RDFS}}} %% RDF \newcommand{\triple}[3]{(#1, #2, #3)} \newcommand{\tuple}[1]{\langle #1 \rangle} \newcommand{\subject}{\mathtt{s}} \newcommand{\prop}{\mathtt{p}} \newcommand{\object}{\mathtt{o}} \newcommand{\blank}{\_{:}b} \newcommand{\blankn}[1]{\_{:}#1} \newcommand{\irin}[1]{{:}\mathrm{#1}} \newcommand{\class}{\mathtt{c}} \newcommand{\nsrdf}{\mathrm{rdf{:}}} \newcommand{\nsrdfs}{\mathrm{rdfs{:}}} \newcommand{\rdftype}{\mathrm{rdf{:}type}} \newcommand{\rdfLiteral}{\mathrm{rdf{:}Literal}} \newcommand{\rdfssubClassOf}{\mathrm{rdfs{:}subClassOf}} \newcommand{\rdfssubPropertyOf}{\mathrm{rdfs{:}subPropertyOf}} \newcommand{\rdfsdomain}{\mathrm{rdfs{:}domain}} \newcommand{\rdfsrange}{\mathrm{rdfs{:}range}} \newcommand{\rdfsClass}{\mathrm{rdfs{:}Class}} \newcommand{\rdfProperty}{\mathrm{rdf{:}Property}} \newcommand{\xsdint}{\mathrm{xsd{:}int}} %% \newcommand{\type}{\tau} \newcommand{\subclass}{\prec_{sc}} \newcommand{\subproperty}{\prec_{sp}} \newcommand{\domain}{\hookleftarrow_{d}} \newcommand{\range}{\hookrightarrow_{r}} \newcommand{\rdfentailment}{\vdash_{^\mathrm{RDF}}} \newcommand{\RDFS}[1]{\mathrm{RDFS}(#1)} \newcommand{\aka}{a.k.a.~} \newcommand{\etc}{etc} \newcommand{\wrt}{w.r.t.~} \newcommand{\st}{s.t.~} \newcommand{\ie}{i.e.,~} \newcommand{\eg}{e.g.,~} \newcommand{\graph}{G} \newcommand{\rules}{\mathcal{R}} \newcommand{\sources}{\mathcal{S}} \newcommand{\views}{\mathcal{V}} \newcommand{\extensions}{\mathcal{E}} \newcommand{\onto}{\mathcal{O}} \newcommand{\mappings}{\mathcal{M}} \newcommand{\modelsrdf}{\models_\rules} \newcommand{\bgp}{P} \newcommand{\Bl}[1]{\mathrm{Bl}(#1)} \newcommand{\Val}[1]{\mathrm{Val}(#1)} \newcommand{\Var}[1]{\mathrm{Var(#1)}} \newcommand{\ext}[1]{\mathrm{ext}(#1)} \newcommand{\cert}{\mathrm{cert}} \newcommand{\ans}{\mathrm{ans}} \newcommand{\query}{\leftarrow} \newcommand{\body}[1]{\textrm{body}(#1)} \newcommand{\head}[1]{\textrm{head}(#1)} \newcommand{\cs}{\mathrm{cs}} \newcommand{\lcs}{\mathrm{lcs}} \newcommand{\cl}{\mathrm{cl}} \newcommand{\lua}{\mathrm{lua}} \newcommand{\lur}{\mathrm{lur}} \newtheorem{lemma}{Lemma} \newtheorem{definition}{Definition} \newtheorem{problem}{Problem} \newtheorem{property}{Property} \newtheorem{corollary}{Corollary} \newtheorem{example}{Example} \newtheorem{theorem}{Theorem} \newcommand{\URIs}{\mathscr U} \newcommand{\IRIs}{\mathscr I} \newcommand{\BNodes}{\mathscr B} \newcommand{\Literals}{\mathscr L} \newcommand{\Variables}{\mathscr V} % DB \newcommand{\CQ}{\ensuremath{\mathtt{CQ}}\xspace} \newcommand{\UCQ}{\ensuremath{\mathtt{UCQ}}\xspace} \newcommand{\SQL}{\ensuremath{\mathtt{SQL}}\xspace} \newcommand{\rel}[1]{\mathsf{#1}} % Cost model \newcommand{\cans}[1]{|#1|_t} \newcommand{\cref}[1]{|#1|_r} \newcommand{\db}{\mathtt{db}} % DL \newcommand{\cn}{\ensuremath{N_{C}}\xspace} \newcommand{\rn}{\ensuremath{N_{R}}\xspace} \newcommand{\inds}{\ensuremath{N_{I}}\xspace} \newcommand{\ainds}{\ensuremath{\mathrm{Ind}}\xspace} \newcommand{\funct}{\mathit{funct} \ } \newcommand{\KB}{\mathcal{K}\xspace} \newcommand{\dlr}{DL-Lite$_{\mathcal{R}}$\xspace} % Logics \newcommand{\FOL}{\ensuremath{\mathtt{FOL}}\xspace} \newcommand{\datalog}{\ensuremath{\mathtt{Datalog}}\xspace} \newcommand{\dllite}{DL-Lite\xspace} \newcommand{\true}{\mathrm{true}} \newcommand{\false}{\mathrm{false}} \newcommand{\dis}{\mathtt{dis}} \newcommand{\vars}[1]{\ensuremath{\mathrm{vars}(#1)}} %\newcommand{\terms}[1]{\ensuremath{\mathrm{terms}(#1)}} %math \renewcommand{\phi}{\varphi} \newcommand\eqdef{\stackrel{\mathclap{\normalfont\mbox{def}}}{=}} \newcommand\restr[2]{#1_{|#2}} \newcommand{\ontoBody}[1]{\mathrm{body}_\onto(#1)} %proof of the rewriting theorem \newcommand{\rdfGraph}{\graph^{\mappings}_{\extensions}} \newcommand\systemGraph{\graph^{\mappings \cup \mappings^{\text{STD}}_\onto}_{\extensions \cup \extensions_\onto}} \newcommand\viewsGraph{\graph^{\mappings^{\rules,\onto} \cup \mappings^{\text{STD}}_\onto}_{\extensions \cup \extensions_\onto}} \newcommand{\standMappings}{\mappings^{\text{STD}}_\onto} \newcommand{\reminder}[1]{[\vadjust{\vbox to0pt{\vss\hbox to0pt{\hss{\Large $\Longrightarrow$}}}}{{\textsf{\small #1}}}]} %\newcommand{\FG}[1]{\textcolor{blue}{\reminder{FG:~#1}}} \newcommand{\extVersion}{false} \newcommand{\printIfExtVersion}[2] { \ifthenelse{\equal{\extVersion}{true}}{#1}{} \ifthenelse{\equal{\extVersion}{false}}{#2}{} } \newcommand{\bda}{\true} \newcommand{\ifBDA}[2]% {% \ifthenelse{\equal{\bda}{true}}{#1}{}% \ifthenelse{\equal{\bda}{false}}{#2}{}% } %%% Local Variables: %%% TeX-master: "paper" %%% End: $$

Experiments 27-03 BSBM existential 50M

This experiments are made on the RDF integration system using GLAV mappings on BSBM 50M.

Methods Comparison

Total time

It is the total query answering time.

total-time-comparison.png

Rewritings Processing Time

Rewritings processing is the part of query answering that concerns only rewriting building and rewriting optimization. It doesn't includes the query plan optimization and evaluation.

rewriting-processing-time.png

Query Plan Processing Time and Query Evaluation

Query plan processing time are the sum of query plan optimization and query plan evaluation. Since the two methods REW and REF return minimal equivalent rewriting set, we expect that there is no time different between the two method at this step. For materialization approach, we count the query evaluation time.

evaluation-time.png

Reformulation Based Method

Raw Statistics

This statistics are build from 5 runs after 1 dry run.

INPUT NANS NTRI NREF NREW NCLASH NCOVER TREF TREW TCLASH TCOVER TCORE TOP TQEV TTOTAL
Q01 15514.0 5.0 21.0 16.0 12.0 4.0 1.0 1347.0 0.4 1.2 25.6 5.0 254.2 1634.4
Q01a 111793.0 5.0 175.0 128.0 96.0 32.0 7.4 10115.2 2.4 11.2 199.2 49.6 1905.0 12290.0
Q01b 863729.0 5.0 1407.0 1024.0 768.0 256.0 20.0 81902.4 6.6 143.2 1640.2 378.4 15988.6 100079.4
Q02 124.0 6.0 63.0 32.0 24.0 8.0 1.2 19514.4 0.4 2.4 50.6 10.6 238.0 19817.6
Q02a 598.0 6.0 147.0 64.0 48.0 16.0 3.6 45851.4 1.8 5.2 101.2 21.6 492.2 46477.0
Q02b 1058.0 6.0 525.0 256.0 192.0 64.0 11.2 156318.8 3.6 25.8 385.2 87.6 1779.8 158612.0
Q02c 1570.0 6.0 1225.0 512.0 384.0 128.0 27.0 364311.6 5.0 66.0 779.2 189.8 3520.4 368899.0
Q02d nan 6.0 4221.0 nan nan nan 270.0 nan nan nan nan nan nan nan
Q02e nan 6.0 9849.0 nan nan nan 454.0 nan nan nan nan nan nan nan
Q03 nan 5.0 4375.0 nan nan nan 90.0 nan nan nan nan nan nan nan
Q04 4487.0 2.0 1.0 8.0 6.0 2.0 0.2 29.2 0.0 0.0 1.4 0.4 32.6 63.8
Q05 3000000.0 4.0 1.0 8.0 7.0 1.0 0.2 28.4 0.0 0.0 4.2 2.4 20157.2 20192.4
Q05a 1793489.0 4.0 3.0 2.0 nan 2.0 0.2 465.2 0.0 0.0 1.6 1.6 13238.4 13707.0
Q05b 2454945.0 4.0 7.0 4.0 nan 4.0 0.2 1007.0 0.0 0.2 3.2 2.0 18618.2 19630.8
Q06 2790902.0 3.0 5.0 2.0 nan 2.0 0.0 384.8 0.2 0.4 5.0 2.2 31590.8 31983.4
Q06a 1674256.0 6.0 15.0 4.0 nan 4.0 1.0 5638.2 0.4 1.4 11.2 6.6 28488.4 34147.2
Q06b 844190.0 6.0 35.0 8.0 nan 8.0 2.0 13656.6 0.2 2.8 21.8 12.2 24165.6 37861.2
Q07 2.0 3.0 5.0 2562.0 nan 2562.0 0.8 591.2 3.0 2392.8 229.0 7452.4 50722.0 61391.2
Q07a 3.0 3.0 19.0 10248.0 nan 5124.0 1.8 2221.2 11.6 18932.6 503.8 26729.0 102572.8 150972.8
Q08 3000000.0 3.0 1.0 1.0 nan 1.0 0.8 30.2 0.0 0.0 6.6 2.4 23358.4 23398.4
Q09 299902.0 1.0 7.0 2.0 nan 2.0 0.2 243.2 0.0 0.0 5.0 1.2 1276.0 1525.6
Q10 nan 3.0 9350.0 nan nan nan 81.0 nan nan nan nan nan nan nan
Q10a nan 3.0 28172.0 nan nan nan 374.0 nan nan nan nan nan nan nan
Q10b nan 3.0 66060.0 nan nan nan 1548.0 nan nan nan nan nan nan nan
Q11 nan 5.0 155600.0 nan nan nan 2763.0 nan nan nan nan nan nan nan
Q14 3000000.0 3.0 1.0 1.0 nan 1.0 0.2 180.4 0.0 0.0 4.8 2.0 22829.4 23016.8
Q15 1500000.0 5.0 1.0 4.0 3.0 1.0 0.8 165.8 0.0 0.0 7.4 3.4 17614.2 17791.6
Q16 249004.0 4.0 201.0 128.0 nan 128.0 3.0 21184.6 3.6 25.4 607.0 169.4 17744.8 39737.8
Q17 2790902.0 2.0 5.0 2.0 nan 2.0 0.4 338.4 0.0 0.2 5.0 1.6 22685.4 23031.0
Q18 3000000.0 4.0 1.0 4.0 3.0 1.0 1.0 113.4 0.0 0.0 8.2 3.2 29454.0 29579.8
Q19 39826.0 9.0 525.0 448.0 nan 128.0 21.0 329629.2 5.6 741.6 1063.2 900.8 8514.8 340876.2
Q19a 60834.0 9.0 1225.0 896.0 nan 256.0 42.4 766055.0 8.4 1958.4 2128.6 2168.4 16220.8 788582.0
Q19b nan 9.0 4221.0 nan nan nan 309.0 nan nan nan nan nan nan nan
Q19c nan 9.0 9849.0 nan nan nan 509.0 nan nan nan nan nan nan nan
Q20 904.0 11.0 63.0 8.0 nan 8.0 2.2 55536.4 0.6 80.6 85.2 101.0 1675.6 57481.6
Q20a 7818.0 11.0 525.0 64.0 nan 64.0 18.8 451280.0 4.2 829.6 722.2 1014.6 12668.0 466537.4
Q20b 10486.0 11.0 1225.0 128.0 nan 128.0 49.0 1056329.6 9.2 1679.8 1462.0 2046.6 24989.2 1086565.4
Q20c nan 11.0 4221.0 nan nan nan 372.0 nan nan nan nan nan nan nan
Q20d nan 11.0 9849.0 nan nan nan 601.0 nan nan nan nan nan nan nan
Q21 37176.0 3.0 9350.0 14180.0 6486.0 6401.0 104.2 97880.8 47.8 22393.8 1221.2 17596.0 152650.8 291894.6

Reformulation and Rewriting Numbers

reformulation-rewritings-numbers.png

Rewriting Processing Times

The label on bar represents the number of reformulations.

times-for-rewriting-ref.png

Rewriting Time According to Reformulation Number

rewriting time per reformulation number.png

Query Plan Processing Times

times-for-plan-evaluation-ref.png

Method Based on Mapping Saturation

Raw Statistics

INPUT NANS NTRI NREF NREW NCLASH NCOVER TREF TREW TCLASH TCOVER TCORE TOP TQEV TTOTAL
Q01 15514.0 5.0 nan 16.0 12.0 4.0 nan 503.6 0.0 0.8 24.0 4.6 249.2 782.2
Q01a 111793.0 5.0 nan 128.0 96.0 32.0 nan 511.8 0.6 5.8 186.6 35.4 1975.4 2715.6
Q01b 863729.0 5.0 nan 1024.0 768.0 256.0 nan 519.4 1.4 79.0 1659.6 560.8 15214.6 18034.8
Q02 124.0 6.0 nan 32.0 24.0 8.0 nan 699.8 0.0 1.8 45.0 9.8 227.6 984.0
Q02a 598.0 6.0 nan 64.0 48.0 16.0 nan 669.6 0.2 2.6 90.0 20.0 474.4 1256.8
Q02b 1058.0 6.0 nan 256.0 192.0 64.0 nan 683.4 0.2 13.6 389.2 83.8 1782.2 2952.4
Q02c 1570.0 6.0 nan 512.0 384.0 128.0 nan 711.8 0.8 32.2 796.0 186.4 3517.8 5245.0
Q02d 8842.0 6.0 nan 2048.0 1536.0 512.0 nan 740.2 2.6 259.4 3074.4 1221.0 14201.2 19498.8
Q02e 35130.0 6.0 nan 4096.0 3072.0 1024.0 nan 785.2 6.0 861.6 6004.0 3235.6 29843.8 40736.2
Q03 5.0 5.0 nan 1024.0 nan 512.0 nan 578.4 3.8 339.4 9101.8 1189.8 13310.8 24524.0
Q04 4487.0 2.0 nan 8.0 6.0 2.0 nan 100.8 0.0 0.0 1.8 0.4 29.8 132.8
Q05 3000000.0 4.0 nan 8.0 7.0 1.0 nan 109.8 0.0 0.0 3.0 2.6 16737.6 16853.0
Q05a 1793489.0 4.0 nan 2.0 nan 2.0 nan 376.4 0.2 0.0 1.6 1.8 10804.8 11184.8
Q05b 2454945.0 4.0 nan 4.0 nan 4.0 nan 372.8 0.0 0.0 2.8 2.0 16277.2 16654.8
Q06 2790902.0 3.0 nan 2.0 nan 2.0 nan 220.8 0.0 0.2 4.0 1.6 27114.4 27341.0
Q06a 1674256.0 6.0 nan 4.0 nan 4.0 nan 605.4 0.0 0.2 8.4 5.6 24784.0 25403.6
Q06b 844190.0 6.0 nan 8.0 nan 8.0 nan 617.6 0.4 0.8 17.6 10.6 21627.4 22274.4
Q07 2.0 3.0 nan 2562.0 nan 2562.0 nan 466.4 2.8 2465.6 210.6 7312.2 51574.0 62031.6
Q07a 3.0 3.0 nan 5124.0 nan 5124.0 nan 495.8 5.0 10046.0 423.6 26823.4 104287.0 142080.8
Q08 3000000.0 3.0 nan 1.0 nan 1.0 nan 102.8 0.0 0.0 5.0 2.2 20317.2 20427.2
Q09 299902.0 1.0 nan 2.0 nan 2.0 nan 242.8 0.0 0.4 3.6 0.6 1161.4 1408.8
Q10 10.0 3.0 nan 7690.0 nan 7690.0 nan 1135.4 12.0 24506.6 792.2 23947.2 161577.2 211970.6
Q10a 15.0 3.0 nan 15380.0 nan 15380.0 nan 1243.2 20.4 92006.6 1959.0 92001.8 331213.6 518444.6
Q10b 25.0 3.0 nan 30760.0 nan 30760.0 nan 1484.6 38.4 596871.0 4753.2 580816.8 674255.0 1858219.0
Q11 14571.0 5.0 nan 16.0 14.0 1.0 nan 1910.6 0.0 0.0 2.0 0.4 125.2 2038.2
Q14 3000000.0 3.0 nan 1.0 nan 1.0 nan 372.2 0.0 0.0 4.6 2.0 18306.2 18685.0
Q15 1500000.0 5.0 nan 4.0 3.0 1.0 nan 304.6 0.0 0.0 4.6 4.0 15168.0 15481.2
Q16 249004.0 4.0 nan 128.0 nan 128.0 nan 285.4 0.4 10.4 474.4 130.4 14825.0 15726.0
Q17 2790902.0 2.0 nan 2.0 nan 2.0 nan 204.0 0.0 0.6 3.6 1.2 18716.8 18926.2
Q18 3000000.0 4.0 nan 4.0 3.0 1.0 nan 260.0 0.0 0.0 6.6 3.2 25577.4 25847.2
Q19 39826.0 9.0 nan 448.0 nan 128.0 nan 1228.2 1.6 1213.6 1043.8 1001.2 8325.4 12813.8
Q19a 60834.0 9.0 nan 896.0 nan 256.0 nan 1254.2 2.2 2518.6 2089.6 2119.6 16233.4 24217.6
Q19b 386774.0 9.0 nan 3584.0 nan 1024.0 nan 1641.6 11.2 11519.0 8738.0 10043.4 70777.2 102730.4
Q19c 595104.0 9.0 nan 7168.0 nan 2048.0 nan 1728.6 23.8 26390.4 17051.8 24414.6 138340.4 207949.6
Q20 904.0 11.0 nan 8.0 nan 8.0 nan 1515.0 0.0 93.0 83.6 118.4 1722.8 3532.8
Q20a 7818.0 11.0 nan 64.0 nan 64.0 nan 1537.6 0.4 759.4 695.0 990.6 13139.0 17122.0
Q20b 10486.0 11.0 nan 128.0 nan 128.0 nan 1532.4 0.8 1493.4 1429.4 1939.6 24023.6 30419.2
Q20c 51988.0 11.0 nan 512.0 nan 512.0 nan 1625.8 2.6 6281.2 5728.8 8532.4 99908.4 122079.2
Q20d 201747.0 11.0 nan 1024.0 nan 1024.0 nan 1636.6 5.4 13139.8 11468.8 18598.8 214495.0 259344.4
Q21 37176.0 3.0 nan 12865.0 6459.0 6401.0 nan 817.8 16.4 15345.0 848.8 17153.6 152310.0 186491.6

Rewriting Numbers

rewritings-numbers.png

Rewriting Processing Times

times-for-rewriting-rew.png

Query Plan Processing Times

times-for-plan-evaluation-rew.png

Materialization

The materialization contains 108501140 triples before saturation using ontological reasoning. The materialization of mappings takes around 15min and the loading and saturation into OntoSQL takes less 19h 20min (69434141 ms).

Queries

Queries are build by groups of Q, Qa, Qb … where Qb is always more general than Qa according to the ontology.

Q01<$label, $featureLabel, $value> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType255>),
              triple($product, <bsbm:productFeature>, $productFeature),
              triple($productFeature, <rdfs:label>, $featureLabel),
              triple($product, <bsbm:productPropertyNumeric>, $value);

Q01a<$label, $featureLabel, $value> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType32>),
              triple($product, <bsbm:productFeature>, $productFeature),
              triple($productFeature, <rdfs:label>, $featureLabel),
              triple($product, <bsbm:productPropertyNumeric>, $value);

Q01b<$label, $featureLabel, $value> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType4>),
              triple($product, <bsbm:productFeature>, $productFeature),
              triple($productFeature, <rdfs:label>, $featureLabel),
              triple($product, <bsbm:productPropertyNumeric>, $value);

Q02<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType255>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType12>);

Q02<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType255>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType12>);

Q02a<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType255>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType1>);

Q02b<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType32>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType21>);

Q02c<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType32>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType2>);

Q02d<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType4>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType12>);

Q02e<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              triple($product, <rdf:type>, <bsbm-int:ProductType4>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType1>);

Q03<$product1, $product2> :-
           triple($product1, <rdf:type>, <bsbm-int:ProductType32>),
           triple($product1, <bsbm:productPropertyNumeric>, "1265"),
           triple($product1, <bsbm:producer>, $producer),
           triple($product2, <rdf:type>, <bsbm-int:ProductType26>),
           triple($product2, <bsbm:producer>, $producer);

Q04<$vendor, $vendorLabel, $vendorHomepage> :-
             triple($vendor, <rdfs:label>, $vendorLabel),
             triple($vendor, <foaf:homepage>, $vendorHomepage);

Q05<$offer, $offerURL, $vendor, $vendorLabel, $vendorHomepage> :-
             triple($offer, <bsbm:vendor>, $vendor),
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($vendor, <rdfs:label>, $vendorLabel),
             triple($vendor, <foaf:homepage>, $vendorHomepage);

Q05a<$offer, $offerURL> :-
             triple($offer, <bsbm:vendor>, $vendor),
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($vendor, <bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType11>);

Q05b<$offer, $offerURL> :-
             triple($offer, <bsbm:vendor>, $vendor),
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($vendor, <bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType1>);

# add condition on reviewer country and/or on product type and/or producer country
Q06<$review, $product, $rating> :-
             triple($review, <bsbm:reviewFor>, $product),
             triple($review, <http://purl.org/stuff/rev#reviewer>, $reviewer),
             triple($review, <bsbm:rating>, $rating);

Q06a<$review, $product, $rating> :-
             triple($review, <bsbm:reviewFor>, $product),
             triple($review, <http://purl.org/stuff/rev#reviewer>, $reviewer),
             triple($review, <bsbm:rating>, $rating),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType11>);

Q06b<$review, $product, $rating> :-
             triple($review, <bsbm:reviewFor>, $product),
             triple($review, <http://purl.org/stuff/rev#reviewer>, $reviewer),
             triple($review, <bsbm:rating>, $rating),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType2>);

Q07<$country> :-
            triple($org, <rdf:type>, <foaf:Organization>),
            triple($org, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType222>);

Q07a<$country> :-
            triple($org, <rdf:type>, <foaf:Organization>),
            triple($org, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType22>);

Q08<$offer, $offerURL, $price, $deliveryDays> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays);

Q09<$product, $value> :-
              triple($product, <bsbm:productPropertyNumeric>, $value);

Q10<$country, $agentType> :-
            triple($agent, <rdf:type>, $agentType),
            triple($agent, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType222>);

Q10a<$country, $agentType> :-
            triple($agent, <rdf:type>, $agentType),
            triple($agent, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType22>);

Q10b<$country, $agentType> :-
            triple($agent, <rdf:type>, $agentType),
            triple($agent, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType2>);

Q11<$label, $p, $country> :-
            triple($x, <rdfs:label>, $label),
            triple($x, $p, $org),
            triple($org, <rdf:type>, <foaf:Organization>),
            triple($org, <bsbm:country>, $country),
            triple($country, <rdf:type>, <bsbm:CountryType222>);

Q14<$product, $p, $offer, $vendor> :-
              triple($product, <bsbm:producer>, $p),
              triple($offer, <bsbm:product>, $product),
              triple($offer, <bsbm:vendor>, $vendor);

Q15<$review, $product, $label, $personName, $title> :-
             triple($product, <rdfs:label>, $label),
             triple($review, <bsbm:reviewFor>, $product),
             triple($review, <http://purl.org/stuff/rev#reviewer>, $person),
             triple($person, <foaf:name>, $personName),
             triple($review, <http://purl.org/dc/elements/1.1/title>, $title);

Q16<$review, $product, $title, $text> :-
             triple($review, <bsbm:reviewFor>, $product),
             triple($product, <rdf:type>, <bsbm-int:ProductType2>),
             triple($review, <http://purl.org/dc/elements/1.1/title>, $title),
             triple($review, <http://purl.org/stuff/rev#text>, $text);

Q17<$review, $product, $rating> :-
             triple($review, <bsbm:reviewFor>, $product),
             triple($review, <bsbm:rating>, $rating);

Q18<$offer, $product, $label, $vendor, $price> :-
              triple($offer, <bsbm:product>, $product),
              triple($product, <rdfs:label>, $label),
              triple($offer, <bsbm:vendor>, $vendor),
              triple($offer, <bsbm:price>, $price);

Q19<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <rdf:type>, <bsbm-int:ProductType32>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType12>);

Q19a<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <rdf:type>, <bsbm-int:ProductType32>),
             
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType2>);

Q19b<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <rdf:type>, <bsbm-int:ProductType3>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType12>);

Q19c<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <rdf:type>, <bsbm-int:ProductType2>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType2>);

Q20<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, <bsbm-int:ProductType122>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType12>);

Q20a<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, <bsbm-int:ProductType15>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType12>);

Q20b<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, <bsbm-int:ProductType15>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType2>);

Q20c<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, <bsbm-int:ProductType2>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType12>);

Q20d<$offer, $offerURL, $price, $deliveryDays, $value> :-
             triple($offer, <bsbm:offerWebpage>, $offerURL),
             triple($offer, <bsbm:price>, $price),
             triple($offer, <bsbm:deliveryDays>, $deliveryDays),
             triple($offer, <bsbm:product>, $product),
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, <bsbm-int:ProductType2>),
             triple($product, <bsbm:productPropertyNumeric>, $value),
             triple($product, <bsbm:producer>, $producer),
             triple($producer,<bsbm:country>, $country),
             triple($country, <rdf:type>, <bsbm:CountryType1>);

Q21<$product, $type> :-
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, $type);

number of answers.png

Query Plans

  • Q01a

Q01a.png

  • Q01b

Q01b.png

  • Q01

Q01.png

  • Q02a

Q02a.png

  • Q02b

Q02b.png

  • Q02c

Q02c.png

  • Q02d

Q02d.png

  • Q02e

Q02e.png

  • Q02

Q02.png

  • Q03

Q03.png

  • Q04

Q04.png

  • Q05a

Q05a.png

  • Q05b

Q05b.png

  • Q05

Q05.png

  • Q06a

Q06a.png

  • Q06b

Q06b.png

  • Q06

Q06.png

  • Q08

Q08.png

  • Q09

Q09.png

  • Q11

Q11.png

  • Q14

Q14.png

  • Q15

Q15.png

  • Q16

Q16.png

  • Q17

Q17.png

  • Q18

Q18.png

  • Q19a

Q19a.png

  • Q19b

Q19b.png

  • Q19c

Q19c.png

  • Q19

Q19.png

  • Q20a

Q20a.png

  • Q20b

Q20b.png

  • Q20c

Q20c.png

  • Q20d

Q20d.png

  • Q20

Q20.png Q01a.png

  • Q01b

Q01b.png

  • Q01

Q01.png

  • Q02a

Q02a.png

  • Q02b

Q02b.png

  • Q02c

Q02c.png

  • Q02d

Q02d.png

  • Q02e

Q02e.png

  • Q02

Q02.png

  • Q04

Q04.png

  • Q05a

Q05a.png

  • Q05b

Q05b.png

  • Q05

Q05.png

  • Q06a

Q06a.png

  • Q06b

Q06b.png

  • Q06

Q06.png

  • Q08

Q08.png

  • Q09

Q09.png

  • Q14

Q14.png

  • Q15

Q15.png

  • Q16

Q16.png

  • Q17

Q17.png

  • Q18

Q18.png

  • Q19a

Q19a.png

  • Q19b

Q19b.png

  • Q19c

Q19c.png

  • Q19

Q19.png

  • Q20a

Q20a.png

  • Q20b

Q20b.png

  • Q20c

Q20c.png

  • Q20d

Q20d.png

  • Q20

Q20.png