$$%% 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: $$

Experiment on Big Relational Datasource

This experiments are made following this details.

Methods Comparison

Total time

It is the total query answering time.

The materialization (MATREF) takes ? (?ms) to compute and contains 108 501 139 triples. The saturated materialization (MATSAT) takes 15h06min (54 386 051ms) to compute and contains 184 854 053 triples.

total-time-comparison.png

Main Statistics on Queries

index Q01 Q01a Q01b Q02 Q02a Q02b Q02c Q03 Q04 Q07 Q07a Q09 Q10 Q13 Q13a Q13b Q14 Q16 Q19 Q19a Q20 Q20a Q20b Q20c Q21 Q22 Q22a Q23
NTRI 5 5 5 6 6 6 6 5 2 3 3 1 3 4 4 4 3 4 9 9 11 11 11 11 3 4 4 7
NREF 21 175 1407 63 147 525 1225 4375 1 5 19 7 9350 84 5628 5628 1 201 525 1225 63 525 1225 4221 9350 40 520 192
NANS 15514 111793 863729 124 598 1058 1570 5 4487 2 3 299902 10 167760 4416946 10049829 3000000 249004 39826 60834 904 7818 10486 51988 37176 1528 18588 1329887

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

Query plan processing time are the sum of query plan optimization and query plan evaluation. Since the two method returns minimal equivalent rewriting set, we expect that there is no time different between the two method at this step.

query-plan-time.png

Reformulation Based Method (REW-CA)

Raw Statistics

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 0.4 1209.0 0.2 1.4 25.8 4.2 140.8 1381.8
Q01a 111793.0 5.0 175.0 128.0 96.0 32.0 2.6 9199.4 0.6 8.2 172.8 21.8 1078.0 10483.4
Q01b 863729.0 5.0 1407.0 1024.0 768.0 256.0 17.8 72170.4 7.2 138.0 1413.6 196.0 8110.8 82053.8
Q02 124.0 6.0 63.0 32.0 24.0 8.0 1.4 15424.0 0.2 2.6 42.0 7.4 122.2 15599.8
Q02a 598.0 6.0 147.0 64.0 48.0 16.0 3.0 36698.6 0.8 3.4 84.8 14.2 243.8 37048.6
Q04 4487.0 2.0 1.0 8.0 6.0 2.0 0.2 29.4 0.0 0.0 1.6 0.2 27.0 58.4
Q05 3000000.0 4.0 1.0 8.0 7.0 1.0 0.2 28.4 0.0 0.0 3.2 0.6 15661.2 15693.6
Q05a 1793489.0 4.0 3.0 2.0 nan 2.0 0.0 370.2 0.0 0.0 1.6 1.6 8570.6 8944.0
Q05b 2454945.0 4.0 7.0 4.0 nan 4.0 0.4 839.2 0.2 0.0 3.2 2.8 12546.0 13391.8
Q06 2790902.0 3.0 5.0 2.0 nan 2.0 0.0 318.2 0.2 0.6 4.0 1.4 13688.8 14013.2
Q07 2.0 3.0 5.0 2562.0 nan 2562.0 0.0 583.6 3.4 2641.2 229.6 3237.8 29872.0 36567.6
Q07a 3.0 3.0 19.0 10248.0 nan 5124.0 0.4 2187.4 12.4 19947.0 413.0 10564.6 63509.6 96634.4
Q08 3000000.0 3.0 1.0 1.0 nan 1.0 0.0 40.2 0.0 0.0 4.8 0.6 19342.8 19388.4
Q09 299902.0 1.0 7.0 2.0 nan 2.0 0.2 200.2 0.0 0.0 3.2 0.8 813.2 1017.6
Q12 14571.0 5.0 2.0 8.0 7.0 1.0 0.4 310.8 0.0 0.0 2.0 0.8 122.6 436.6
Q12a 31322.0 5.0 6.0 16.0 14.0 2.0 0.2 857.0 0.0 0.0 3.2 1.0 370.0 1231.4
Q12b 117426.0 5.0 14.0 32.0 28.0 4.0 0.4 1986.6 0.2 0.0 6.6 2.0 1108.2 3104.0
Q13 167760.0 4.0 84.0 50.0 nan 42.0 1.0 5809.0 0.2 34.4 78.6 30.0 2850.8 8804.0
Q13a 4416946.0 4.0 5628.0 3200.0 nan 2688.0 47.8 372855.2 29.6 7608.2 5308.0 5363.0 111480.8 502692.6
Q13b 10049829.0 4.0 5628.0 3200.0 nan 2688.0 52.8 375818.8 34.8 7696.6 5406.2 5425.4 181357.0 575791.6
Q14 3000000.0 3.0 1.0 1.0 nan 1.0 0.0 141.6 0.0 0.0 4.2 1.0 13080.2 13227.0
Q15 1500000.0 5.0 1.0 4.0 3.0 1.0 0.2 107.0 0.0 0.0 4.2 1.4 13286.8 13399.6
Q16 249004.0 4.0 201.0 128.0 nan 128.0 2.0 15070.2 1.0 18.8 457.2 49.4 7287.4 22886.0
Q17 2790902.0 2.0 5.0 2.0 nan 2.0 0.2 262.8 0.0 0.4 3.2 1.0 10663.8 10931.4
Q18 3000000.0 4.0 1.0 4.0 3.0 1.0 0.2 91.4 0.0 0.0 6.4 1.4 21984.0 22083.4
Q19 39826.0 9.0 525.0 448.0 nan 128.0 15.0 256995.2 3.0 896.8 887.0 134.6 3026.4 261958.0
Q20 904.0 11.0 63.0 8.0 nan 8.0 2.0 41787.2 0.2 95.6 81.8 17.4 1977.8 43962.0
Q20a 7818.0 11.0 525.0 64.0 nan 64.0 17.0 342123.2 3.8 776.0 610.4 126.0 16884.8 360541.2
Q21 37176.0 3.0 9350.0 14180.0 6486.0 6401.0 114.2 109224.8 58.0 27936.8 852.4 17280.0 145699.2 301165.4
Q22 1528.0 4.0 40.0 32.0 nan 32.0 1.0 637.2 0.4 1.6 4.4 7.0 860.4 1512.0
Q22a 18588.0 4.0 520.0 384.0 nan 384.0 6.2 6874.8 4.6 148.6 50.6 143.2 10300.6 17528.6
Q23 1329887.0 7.0 192.0 80.0 56.0 24.0 3.8 30196.2 1.4 8.8 33.2 14.2 18362.2 48619.8
Q23a 2008985.0 7.0 448.0 160.0 112.0 48.0 6.2 69899.8 1.8 21.0 66.0 25.2 33587.6 103607.6

Rewriting Numbers

rewritings-numbers.png

Rewriting Processing Times

times-for-rewriting-ref.png

Query Plan Processing Times

times-for-plan-evaluation-ref.png

Rewriting Based Method (REW-C)

Raw Statistics

INPUT NANS NTRI NREF NREW NCLASH NCOVER TREF TREW TCLASH TCOVER TCORE TOP TQEV TTOTAL
Q01 15514.0 5.0 1.0 16.0 12.0 4.0 0.0 458.4 0.0 0.8 24.2 3.8 142.0 629.2
Q01a 111793.0 5.0 1.0 128.0 96.0 32.0 0.0 478.0 0.2 5.4 195.6 23.0 1049.2 1751.4
Q01b 863729.0 5.0 1.0 1024.0 768.0 256.0 0.0 503.2 1.2 76.6 1583.0 213.6 8236.0 10613.6
Q02 124.0 6.0 1.0 32.0 24.0 8.0 0.0 650.4 0.2 1.4 45.2 7.2 122.8 827.2
Q02a 598.0 6.0 1.0 64.0 48.0 16.0 0.0 645.2 0.0 3.0 178.6 13.0 243.8 1083.6
Q02b 1058.0 6.0 1.0 256.0 192.0 64.0 0.0 660.6 0.2 13.0 377.8 56.6 867.6 1975.8
Q02c 1570.0 6.0 1.0 512.0 384.0 128.0 0.0 670.4 0.8 30.2 739.8 113.2 1754.8 3309.2
Q03 5.0 5.0 1.0 1024.0 nan 512.0 0.2 521.8 2.2 357.0 9113.2 801.2 6769.6 17565.2
Q04 4487.0 2.0 1.0 8.0 6.0 2.0 0.0 129.8 0.0 0.0 1.2 0.4 27.0 158.4
Q05 3000000.0 4.0 1.0 8.0 7.0 1.0 0.2 128.4 0.0 0.0 3.4 0.6 15917.0 16049.6
Q05a 1793489.0 4.0 1.0 2.0 nan 2.0 0.4 381.8 0.0 0.0 1.8 1.8 8807.0 9192.8
Q05b 2454945.0 4.0 1.0 4.0 nan 4.0 0.0 374.6 0.0 0.0 3.2 2.4 12710.6 13090.8
Q06 2790902.0 3.0 1.0 2.0 nan 2.0 0.2 244.2 0.0 0.2 5.0 1.4 13699.2 13950.2
Q07 2.0 3.0 1.0 2562.0 nan 2562.0 0.0 493.0 3.6 2819.2 231.6 3517.0 29920.8 36985.2
Q07a 3.0 3.0 1.0 5124.0 nan 5124.0 0.0 465.4 6.0 12426.6 483.2 14037.6 63556.4 90975.2
Q08 3000000.0 3.0 1.0 1.0 nan 1.0 0.0 142.2 0.0 0.0 5.0 0.8 21213.2 21361.2
Q09 299902.0 1.0 1.0 2.0 nan 2.0 0.4 241.4 0.0 0.0 4.4 1.0 831.2 1078.4
Q10 10.0 3.0 1.0 7690.0 nan 7690.0 0.0 1094.0 14.0 28513.0 799.4 28894.8 153027.4 212342.6
Q12 14571.0 5.0 2.0 8.0 7.0 1.0 384.8 749.2 0.0 0.0 2.2 0.4 120.6 1257.2
Q12a 31322.0 5.0 2.0 16.0 14.0 2.0 351.2 698.6 0.0 0.0 3.6 1.0 364.2 1418.6
Q12b 117426.0 5.0 2.0 32.0 28.0 4.0 349.8 717.2 0.0 0.0 7.0 1.8 1070.4 2146.2
Q13 167760.0 4.0 16.0 50.0 nan 42.0 3.4 3310.4 0.0 34.2 95.8 37.0 2743.2 6224.0
Q13a 4416946.0 4.0 16.0 3200.0 nan 2688.0 3.4 3404.0 5.2 5629.4 5479.0 6106.8 112568.6 133196.4
Q13b 10049829.0 4.0 16.0 3200.0 nan 2688.0 3.6 3424.8 4.0 5613.6 5690.0 6415.8 183236.2 204388.0
Q14 3000000.0 3.0 1.0 1.0 nan 1.0 0.2 345.2 0.0 0.0 4.4 1.6 13111.6 13463.0
Q15 1500000.0 5.0 1.0 4.0 3.0 1.0 0.0 280.4 0.0 0.0 3.6 1.6 13661.6 13947.2
Q16 249004.0 4.0 1.0 128.0 nan 128.0 0.2 285.8 0.2 10.4 457.2 49.8 7446.2 8249.8
Q17 2790902.0 2.0 1.0 2.0 nan 2.0 0.0 208.8 0.0 0.2 4.0 1.4 10798.4 11012.8
Q18 3000000.0 4.0 1.0 4.0 3.0 1.0 0.2 271.4 0.0 0.0 7.4 1.4 22916.8 23197.2
Q19 39826.0 9.0 1.0 448.0 nan 128.0 0.2 1129.0 1.4 1248.4 1094.2 158.2 3051.4 6682.8
Q19a 60834.0 9.0 1.0 896.0 nan 256.0 0.2 1196.2 2.8 2558.8 2168.4 312.4 5861.8 12100.6
Q20 904.0 11.0 1.0 8.0 nan 8.0 0.0 1690.8 0.0 93.4 81.2 18.4 2177.4 4061.2
Q20a 7818.0 11.0 1.0 64.0 nan 64.0 0.0 1410.4 0.4 822.8 799.2 161.0 17337.4 20531.2
Q20b 10486.0 11.0 1.0 128.0 nan 128.0 0.6 1467.0 0.8 1775.2 1368.8 310.2 31928.6 36851.2
Q20c 51988.0 11.0 1.0 512.0 nan 512.0 0.2 1692.2 3.0 6768.4 6232.8 1323.4 123776.8 139796.8
Q20d 201747.0 11.0 1.0 1024.0 nan 1024.0 0.0 1695.6 6.4 12742.4 11809.8 3181.4 312638.0 342073.6
Q21 37176.0 3.0 1.0 12865.0 6459.0 6401.0 0.4 833.0 20.6 19377.0 805.8 19934.8 145191.4 186163.0
Q22 1528.0 4.0 24.0 32.0 nan 32.0 0.2 1818.0 0.4 2.4 4.4 6.8 858.0 2690.2
Q22a 18588.0 4.0 200.0 384.0 nan 384.0 2.8 15664.8 3.2 143.0 61.4 172.0 10246.4 26293.6
Q23 1329887.0 7.0 64.0 80.0 56.0 24.0 810.8 23670.6 1.2 10.4 36.8 12.8 19066.6 43609.2
Q23a 2008985.0 7.0 64.0 160.0 112.0 48.0 712.4 23375.0 1.0 19.8 74.6 26.6 34392.8 58602.2

Rewriting Numbers

rewritings-numbers.png

Rewriting Processing Times

times-for-rewriting-rew.png

Query Plan Processing Times

times-for-plan-evaluation-rew.png

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>);

Q02old<$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>);

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

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

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

Q13<$offer, $prop, $value> :-
              triple($offer, <bsbm:product>, $product),
              triple($product, <rdf:type>, <bsbm-int:ProductType110>),
              triple($product, $prop, $value),
              triple($prop, <rdfs:domain>, <bsbm:Product>);

Q13a<$offer, $prop, $value> :-
              triple($offer, <bsbm:product>, $product),
              triple($product, <rdf:type>, <bsbm-int:ProductType8>),
              triple($product, $prop, $value),
              triple($prop, <rdfs:domain>, <bsbm:Product>);

Q13b<$offer, $prop, $value> :-
              triple($offer, <bsbm:product>, $product),
              triple($product, <rdf:type>, <bsbm-int:ProductType2>),
              triple($product, $prop, $value),
              triple($prop, <rdfs:domain>, <bsbm:Product>);

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);

Q22<$product, $type> :-
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, $type),
             triple($type, <rdfs:subClassOf>, <bsbm-int:ProductType12>);

Q22a<$product, $type> :-
             triple($product, <bsbm:productFeature>, $productFeature),
             triple($productFeature, <rdfs:label>, "babka"),
             triple($product, <rdf:type>, $type),
             triple($type, <rdfs:subClassOf>, <bsbm-int:ProductType2>);

Q23<$x, $class, $superProp, $value> :-
                triple($x, $prop, $value),
                triple($prop, <rdfs:subPropertyOf>, $superProp),
                triple($x, $p, $agent),
                triple($p, <rdfs:range>, <foaf:Agent>),
                triple($p, <rdfs:domain>, $class),
                triple($agent, <bsbm:country>, $country),
                triple($country, <rdf:type>, <bsbm:CountryType12>);

Q23a<$x, $class, $superProp, $value> :-
                triple($x, $prop, $value),
                triple($prop, <rdfs:subPropertyOf>, $superProp),
                triple($x, $p, $agent),
                triple($p, <rdfs:range>, <foaf:Agent>),
                triple($p, <rdfs:domain>, $class),
                triple($agent, <bsbm:country>, $country),
                triple($country, <rdf:type>, <bsbm:CountryType2>);

number of answers.png

REW Method Query Plans

  • Q01a

Q01a.svg

  • Q01b

Q01b.svg

  • Q01

Q01.svg

  • Q02a

Q02a.svg

  • Q02b

Q02b.svg

  • Q02c

Q02c.svg

  • Q02d

Q02d.svg

  • Q02e

Q02e.svg

  • Q02old

Q02old.svg

  • Q02

Q02.svg

  • Q03

Q03.svg

  • Q04

Q04.svg

  • Q05a

Q05a.svg

  • Q05b

Q05b.svg

  • Q05

Q05.svg

  • Q06a

Q06a.svg

  • Q06b

Q06b.svg

  • Q06

Q06.svg

  • Q07a

Q07a.svg

  • Q07

Q07.svg

  • Q08

Q08.svg

  • Q09

Q09.svg

  • Q11

Q11.svg

  • Q12a

Q12a.svg

  • Q12b

Q12b.svg

  • Q12

Q12.svg

  • Q13

Q13.svg

  • Q14

Q14.svg

  • Q15

Q15.svg

  • Q16

Q16.svg

  • Q17

Q17.svg

  • Q18

Q18.svg

  • Q19a

Q19a.svg

  • Q19b

Q19b.svg

  • Q19c

Q19c.svg

  • Q19

Q19.svg

  • Q20a

Q20a.svg

  • Q20b

Q20b.svg

  • Q20c

Q20c.svg

  • Q20d

Q20d.svg

  • Q20

Q20.svg

  • Q22a

Q22a.svg

  • Q22

Q22.svg

  • Q23a

Q23a.svg

  • Q23

Q23.svg