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

Join in Mongo VS Hash Join

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

Methods Comparison

Total time

It is the total query answering time.

total-time-comparison.png

Rewriting time

The rewriting time is the time to build complete set of rewriting of the query according to mappings. It doesn't include optimizations.

rewriting-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

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

Hash Join Based Method

Raw Statistics

INPUT NANS NTRI NREF NREW NCLASH NCOVER TREF TREW TCLASH TCOVER TCORE TOP TQEV TTOTAL
Q01 1272.0 5.0 nan 8.0 6.0 2.0 nan 32.2 0.0 0.2 12.8 2.6 575.2 623.0
Q01a 4376.0 5.0 nan 16.0 12.0 4.0 nan 30.8 0.0 0.8 24.6 4.2 1200.0 1260.4
Q01b 22738.0 5.0 nan 128.0 96.0 32.0 nan 37.0 0.0 4.8 189.8 27.6 9780.4 10039.6
Q02 16.0 6.0 nan 16.0 12.0 4.0 nan 47.0 0.2 0.4 24.8 5.2 67.6 145.2
Q02a 56.0 6.0 nan 32.0 24.0 8.0 nan 51.0 0.0 1.2 52.0 8.2 126.8 239.2
Q02b 174.0 6.0 nan 64.0 48.0 16.0 nan 45.4 0.0 2.4 89.4 15.2 264.6 417.0
Q02c 1342.0 6.0 nan 512.0 384.0 128.0 nan 56.0 0.8 27.6 778.8 128.0 2215.8 3207.0
Q03 19.0 5.0 nan 128.0 nan 64.0 nan 38.0 0.4 22.6 1089.2 143.4 472.4 1766.0
Q04 91.0 2.0 nan 8.0 6.0 2.0 nan 6.2 0.0 0.0 1.4 0.6 8.8 17.0
Q05 56200.0 4.0 nan 8.0 7.0 1.0 nan 6.6 0.0 0.0 3.2 0.6 994.2 1004.6
Q05a 33089.0 4.0 nan 2.0 nan 2.0 nan 22.0 0.0 0.0 1.8 1.0 1043.0 1067.8
Q05b 50958.0 4.0 nan 4.0 nan 4.0 nan 24.4 0.0 0.0 3.4 1.0 2011.6 2040.4
Q06 52208.0 3.0 nan 2.0 nan 2.0 nan 13.8 0.2 0.0 4.8 2.6 279.2 300.6
Q06a 29377.0 6.0 nan 4.0 nan 4.0 nan 41.0 0.0 0.4 9.2 4.0 573.2 627.8
Q06b 17815.0 6.0 nan 8.0 nan 8.0 nan 38.2 0.2 0.8 16.0 7.6 1009.4 1072.2
Q07 2.0 3.0 nan 194.0 nan 194.0 nan 26.2 0.2 14.8 16.2 27.0 1630.4 1714.8
Q07a 3.0 3.0 nan 388.0 nan 388.0 nan 29.2 0.4 59.8 34.0 85.0 3319.2 3527.6
Q08 56200.0 3.0 nan 1.0 nan 1.0 nan 6.6 0.0 0.0 4.8 0.6 1271.6 1283.6
Q09 5617.0 1.0 nan 2.0 nan 2.0 nan 13.0 0.0 0.0 3.6 0.8 18.0 35.4
Q10 9.0 3.0 nan 586.0 nan 586.0 nan 72.6 0.2 166.0 63.0 210.8 5069.0 5581.6
Q10a 14.0 3.0 nan 1172.0 nan 1172.0 nan 75.6 1.0 582.4 126.8 700.6 10370.4 11856.8
Q10b 24.0 3.0 nan 2344.0 nan 2344.0 nan 93.4 1.8 2395.8 255.2 2639.2 20781.0 26166.4
Q11 116.0 5.0 nan 16.0 14.0 1.0 nan 122.0 0.0 0.0 1.8 0.6 29.4 153.8
Q14 56200.0 3.0 nan 1.0 nan 1.0 nan 21.2 0.0 0.0 5.8 0.6 967.4 995.0
Q15 28100.0 5.0 nan 4.0 3.0 1.0 nan 17.4 0.0 0.0 4.0 2.4 271.0 294.8
Q16 8114.0 4.0 nan 16.0 nan 16.0 nan 16.8 0.0 0.0 54.6 20.0 217.8 309.2
Q17 52208.0 2.0 nan 2.0 nan 2.0 nan 11.6 0.0 0.0 3.8 1.6 235.8 252.8
Q18 56200.0 4.0 nan 4.0 3.0 1.0 nan 16.0 0.0 0.0 6.6 1.0 1397.0 1420.6
Q19 2015.0 9.0 nan 56.0 nan 16.0 nan 84.6 0.2 126.4 121.2 103.8 22067.0 22503.2
Q19a 3515.0 9.0 nan 112.0 nan 32.0 nan 90.2 0.2 265.2 690.0 207.4 44622.0 45875.0
Q19b 15511.0 9.0 nan 448.0 nan 128.0 nan 126.8 1.4 1065.8 992.8 837.0 186311.6 189335.4
Q20 0.0 11.0 nan 4.0 nan 4.0 nan 107.8 0.0 42.0 45.4 53.8 6384.6 6633.6
Q20a 236.0 11.0 nan 8.0 nan 8.0 nan 105.6 0.0 83.6 278.6 107.0 12605.4 13180.2
Q20b 2312.0 11.0 nan 64.0 nan 64.0 nan 111.4 0.6 662.2 812.8 809.8 103518.6 105915.4
Q20c 7564.0 11.0 nan 128.0 nan 128.0 nan 114.6 0.4 1338.2 1302.8 1802.8 208691.8 213250.6
Q21 1085.0 3.0 nan 929.0 539.0 385.0 nan 53.0 0.8 74.2 51.0 110.8 24430.6 24720.4

Rewriting Numbers

rewritings-numbers.png

Rewriting Processing Times

times-for-rewriting-hash.png

Query Plan Processing Times

times-for-plan-evaluation-hash.png

Join in MongoDB

Raw Statistics

INPUT NANS NTRI NREF NREW NCLASH NCOVER TREF TREW TCLASH TCOVER TCORE TOP TQEV TTOTAL
Q01 1272.0 5.0 nan 8.0 6.0 2.0 nan 35.5 0.0 0.5 11.5 2.5 582.0 632.0
Q01a 4376.0 5.0 nan 16.0 12.0 4.0 nan 31.0 0.0 1.0 29.5 4.5 1236.0 1302.0
Q01b 22738.0 5.0 nan 128.0 96.0 32.0 nan 36.5 0.0 4.5 195.0 28.0 9559.0 9823.0
Q02 16.0 6.0 nan 16.0 12.0 4.0 nan 44.5 0.0 1.0 22.0 5.0 255.0 327.5
Q02a 56.0 6.0 nan 32.0 24.0 8.0 nan 45.5 0.0 1.0 47.0 9.5 582.5 685.5
Q02b 174.0 6.0 nan 64.0 48.0 16.0 nan 48.0 1.0 2.0 91.5 14.5 990.5 1147.5
Q02c 1342.0 6.0 nan 512.0 384.0 128.0 nan 61.5 0.0 27.5 775.0 122.0 8329.0 9315.0
Q03 19.0 5.0 nan 128.0 nan 64.0 nan 49.5 0.0 22.0 1091.0 144.5 472.0 1779.0
Q04 91.0 2.0 nan 8.0 6.0 2.0 nan 6.5 0.0 0.0 2.0 0.5 10.0 19.0
Q05 56200.0 4.0 nan 8.0 7.0 1.0 nan 7.0 0.0 0.0 4.0 1.0 7576.0 7588.0
Q05a 33089.0 4.0 nan 2.0 nan 2.0 nan 21.5 0.0 0.0 1.5 1.0 1092.0 1116.0
Q05b 50958.0 4.0 nan 4.0 nan 4.0 nan 22.0 0.0 0.0 3.5 1.0 2006.5 2033.0
Q06 52208.0 3.0 nan 2.0 nan 2.0 nan 13.0 0.0 0.0 4.0 3.0 284.5 304.5
Q06a 29377.0 6.0 nan 4.0 nan 4.0 nan 41.5 0.0 0.0 10.5 4.5 803.5 860.0
Q06b 17815.0 6.0 nan 8.0 nan 8.0 nan 38.5 0.0 0.5 17.0 7.0 1512.0 1575.0
Q07 2.0 3.0 nan 194.0 nan 194.0 nan 26.5 0.0 15.0 18.0 28.5 1617.5 1705.5
Q07a 3.0 3.0 nan 388.0 nan 388.0 nan 29.0 0.5 57.0 34.5 81.5 3272.0 3474.5
Q08 56200.0 3.0 nan 1.0 nan 1.0 nan 7.0 0.0 0.0 6.0 0.5 10189.5 10203.0
Q09 5617.0 1.0 nan 2.0 nan 2.0 nan 15.0 0.0 0.0 5.0 1.0 21.5 42.5
Q10 9.0 3.0 nan 586.0 nan 586.0 nan 88.0 1.0 187.5 66.5 232.5 5270.0 5845.5
Q10a 14.0 3.0 nan 1172.0 nan 1172.0 nan 97.5 1.0 798.0 174.0 912.0 10750.5 12733.0
Q10b 24.0 3.0 nan 2344.0 nan 2344.0 nan 101.0 1.5 2569.0 264.0 2934.5 21382.5 27252.5
Q11 116.0 5.0 nan 16.0 14.0 1.0 nan 125.0 0.0 0.0 2.0 0.5 20.0 147.5
Q14 56200.0 3.0 nan 1.0 nan 1.0 nan 21.5 0.0 0.0 4.5 0.5 5360.0 5386.5
Q15 28100.0 5.0 nan 4.0 3.0 1.0 nan 18.5 0.0 0.0 5.5 1.5 274.0 299.5
Q16 8114.0 4.0 nan 16.0 nan 16.0 nan 17.0 0.0 0.5 58.5 19.5 219.0 314.5
Q17 52208.0 2.0 nan 2.0 nan 2.0 nan 11.0 0.0 0.0 4.0 1.5 234.0 250.5
Q18 56200.0 4.0 nan 4.0 3.0 1.0 nan 17.5 0.0 0.0 9.5 1.5 10144.5 10173.0
Q19 2015.0 9.0 nan 56.0 nan 16.0 nan 86.0 0.0 135.5 117.5 105.0 193405.0 193849.0
Q19a 3515.0 9.0 nan 112.0 nan 32.0 nan 89.0 0.0 255.0 235.0 205.0 442515.0 443299.0
Q19b 15511.0 9.0 nan 448.0 nan 128.0 nan 125.5 1.0 1043.5 980.5 837.0 1667383.0 1670370.5
Q20 0.0 11.0 nan 4.0 nan 4.0 nan 108.5 0.0 40.5 43.5 55.0 83409.5 83657.0
Q20a 236.0 11.0 nan 8.0 nan 8.0 nan 102.5 0.0 83.5 87.0 102.0 98340.0 98715.0
Q20b 2312.0 11.0 nan 64.0 nan 64.0 nan 114.0 1.0 666.0 647.0 836.0 1013444.0 1015708.0
Q20c 7564.0 11.0 nan 128.0 nan 128.0 nan 117.0 1.0 1387.0 1688.0 1642.0 1711051.0 1715886.0
Q21 1085.0 3.0 nan 929.0 539.0 385.0 nan 53.0 1.0 75.0 65.0 143.0 22953.0 23290.0

Rewriting Numbers

rewritings-numbers.png

Rewriting Processing Times

times-for-rewriting-mongo.png

Query Plan Processing Times

times-for-plan-evaluation-mongo.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:ProductType110>),
              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:ProductType8>),
              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:ProductType110>),
              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:ProductType110>),
              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:ProductType8>),
              triple($product, <bsbm:productPropertyNumeric>, $value),
              triple($product, <bsbm:producer>, $producer),
              triple($producer,<bsbm:country>, $country),
              triple($country, <rdf:type>, <bsbm:CountryType1>);

Q02c<$label, $value, $country> :-
              triple($product, <rdfs:label>, $label),
              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>);

Q03<$product1, $product2> :-
           triple($product1, <rdf:type>, <bsbm-int:ProductType12>),
           triple($product1, <bsbm:productPropertyNumeric>, "774"),
           triple($product1, <bsbm:producer>, $producer),
           triple($product2, <rdf:type>, <bsbm-int:ProductType2>),
           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>);

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:ProductType8>),
             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:ProductType8>),
             
             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>);

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>, "biographies"),
             triple($product, <rdf:type>, <bsbm-int:ProductType110>),
             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>, "biographies"),
             triple($product, <rdf:type>, <bsbm-int:ProductType8>),
             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>, "biographies"),
             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>);

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>, "biographies"),
             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>, "biographies"),
             triple($product, <rdf:type>, $type);

number of answers.png

Hash Join Method Query Plans

  • Q01a

Q01a.png

  • Q01b

Q01b.png

  • Q01

Q01.png

  • Q02a

Q02a.png

  • Q02b

Q02b.png

  • Q02c

Q02c.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

  • Q07a

Q07a.png

  • Q07

Q07.png

  • Q08

Q08.png

  • Q09

Q09.png

  • Q10

Q10.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

  • Q19

Q19.png

  • Q20a

Q20a.png

  • Q20b

Q20b.png

  • Q20c

Q20c.png

  • Q20

Q20.png

  • Q21

Q21.png

Mongo Method Query Plans

  • Q01a

Q01a.png

  • Q01b

Q01b.png

  • Q01

Q01.png

  • Q02a

Q02a.png

  • Q02b

Q02b.png

  • Q02c

Q02c.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

  • Q07a

Q07a.png

  • Q07

Q07.png

  • Q08

Q08.png

  • Q09

Q09.png

  • Q10

Q10.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

  • Q19

Q19.png

  • Q20a

Q20a.png

  • Q20b

Q20b.png

  • Q20c

Q20c.png

  • Q20

Q20.png

  • Q21

Q21.png