Basic Testing Use Case -- Query Templates


In the following query templates, terms enclosed within a leading and trailing %s are placeholders that get instantiated dynamically by the query generator based on the constraints in the #mapping command at the beginning of each query template.

Query Template Estimated selectivities (number of unique solutions of each variable) at 10M triples Query Graph
L1:
#mapping v1 wsdbm:Website uniform
SELECT ?v0 ?v2 ?v3 WHERE {
	?v0	wsdbm:subscribes	%v1% .
	?v2	sorg:caption	?v3 .
	?v0	wsdbm:likes	?v2 .
}
?v0?v2?v3
?v0 wsdbm:subscribes %v1%15n/an/a
?v2 sorg:caption ?v3n/a25022502
?v0 wsdbm:likes ?v22392223800n/a
overall 222
L2:
#mapping v0 wsdbm:City uniform
SELECT ?v1 ?v2 WHERE {
	%v0%	gn:parentCountry	?v1 .
	?v2	wsdbm:likes	wsdbm:Product0 .
	?v2	sorg:nationality	?v1 .
}
?v1?v2
%v0% gn:parentCountry ?v12n/a
?v2 wsdbm:likes wsdbm:Product0n/a4244
?v2 sorg:nationality ?v11992526
overall 237
L3:
#mapping v2 wsdbm:Website uniform
SELECT ?v0 ?v1 WHERE {
	?v0	wsdbm:likes	?v1 .
	?v0	wsdbm:subscribes	%v2% .
}
?v0?v1
?v0 wsdbm:likes ?v1 .2392223800
?v0 wsdbm:subscribes %v2%15n/a
overall 650
L4:
#mapping v1 wsdbm:Topic uniform
SELECT ?v0 ?v2 WHERE {
	?v0	og:tag	%v1% .
	?v0	sorg:caption	?v2 .
}
?v0?v2
?v0 og:tag %v1%280n/a
?v0 sorg:caption ?v225022502
overall 3030
L5:
#mapping v2 wsdbm:City uniform
SELECT ?v0 ?v1 ?v3 WHERE {
	?v0	sorg:jobTitle	?v1 .
	%v2%	gn:parentCountry	?v3 .
	?v0	sorg:nationality	?v3 .
}
?v0?v1?v3
?v0 sorg:jobTitle ?v150095008n/a
%v2% gn:parentCountry ?v3n/an/a2
?v0 sorg:nationality ?v31992526n/a
overall 39392
S1:
#mapping v2 wsdbm:Retailer uniform
SELECT ?v0 ?v1 ?v3 ?v4 ?v5 ?v6 ?v7 ?v8 ?v9 WHERE {
	?v0	gr:includes	?v1 .
	%v2%	gr:offers	?v0 .
	?v0	gr:price	?v3 .
	?v0	gr:serialNumber	?v4 .
	?v0	gr:validFrom	?v5 .
	?v0	gr:validThrough	?v6 .
	?v0	sorg:eligibleQuantity	?v7 .
	?v0	sorg:eligibleRegion	?v8 .
	?v0	sorg:priceValidUntil	?v9 .
}
?v0
?v0 gr:includes ?v190001
%v2% gr:offers ?v078
?v0 gr:price ?v3240001
?v0 gr:serialNumber ?v490001
?v0 gr:validFrom ?v536251
?v0 gr:validThrough ?v636347
?v0 sorg:eligibleQuantity ?v790001
?v0 sorg:eligibleRegion ?v844936
?v0 sorg:priceValidUntil ?v917900
overall 2
S2:
#mapping v2 wsdbm:Country uniform
SELECT ?v0 ?v1 ?v3 WHERE {
	?v0	dc:Location	?v1 .
	?v0	sorg:nationality	%v2% .
	?v0	wsdbm:gender	?v3 .
	?v0	rdf:type	wsdbm:Role2 .
}
?v0
?v0 dc:Location ?v140298
?v0 sorg:nationality %v2%5240
?v0 wsdbm:gender ?v359785
?v0 rdf:type wsdbm:Role221269
overall 256
S3:
#mapping v1 wsdbm:ProductCategory uniform
SELECT ?v0 ?v2 ?v3 ?v4 WHERE {
	?v0	rdf:type	%v1% .
	?v0	sorg:caption	?v2 .
	?v0	wsdbm:hasGenre	?v3 .
	?v0	sorg:publisher	?v4 .
}
?v0
?v0 rdf:type %v1%808
?v0 sorg:caption ?v2 2502
?v0 wsdbm:hasGenre ?v325001
?v0 sorg:publisher ?v41351
overall 2
S4:
#mapping v1 wsdbm:AgeGroup uniform
SELECT ?v0 ?v2 ?v3 WHERE {
	?v0	foaf:age	%v1% .
	?v0	foaf:familyName	?v2 .
	?v3	mo:artist	?v0 .
	?v0	sorg:nationality	wsdbm:Country1 .
}
?v0
?v0 foaf:age %v1%211
?v0 foaf:familyName ?v269971
?v3 mo:artist ?v0713
?v0 sorg:nationality wsdbm:Country12637
overall 2
S5:
#mapping v1 wsdbm:ProductCategory uniform
SELECT ?v0 ?v2 ?v3 WHERE {
	?v0	rdf:type	%v1% .
	?v0	sorg:description	?v2 .
	?v0	sorg:keywords	?v3 .
	?v0	sorg:language	wsdbm:Language0 .
}
?v0
?v0 rdf:type %v1%808
?v0 sorg:description ?v214961
?v0 sorg:keywords ?v37411
?v0 sorg:language wsdbm:Language01461
overall 2
S6:
#mapping v3 wsdbm:SubGenre uniform
SELECT ?v0 ?v1 ?v2 WHERE {
	?v0	mo:conductor	?v1 .
	?v0	rdf:type	?v2 .
	?v0	wsdbm:hasGenre	%v3% .
}
?v0
?v0 mo:conductor ?v1 1
?v0 rdf:type ?v2 125146
?v0 wsdbm:hasGenre %v3%79
overall 3
S7:
#mapping v3 wsdbm:User uniform
SELECT ?v0 ?v1 ?v2 WHERE {
	?v0	rdf:type	?v1 .
	?v0	sorg:text	?v2 .
	%v3%	wsdbm:likes	?v0 .
}
?v0
?v0 rdf:type ?v1125146
?v0 sorg:text ?v27477
%v3% wsdbm:likes ?v02
overall 2
F1:
#mapping v1 wsdbm:Topic uniform
SELECT ?v0 ?v2 ?v3 ?v4 ?v5 WHERE {
	?v0	og:tag	%v1% .
	?v0	rdf:type	?v2 .
	?v3	sorg:trailer	?v4 .
	?v3	sorg:keywords	?v5 .
	?v3	wsdbm:hasGenre	?v0 .
	?v3	rdf:type	wsdbm:ProductCategory2 .
}
?v0?v3
?v0 og:tag %v1%280n/a
?v0 rdf:type ?v2125146n/a
?v3 sorg:trailer ?v4n/a135
?v3 sorg:keywords ?v5n/a7411
?v3 wsdbm:hasGenre ?v014625001
?v3 rdf:type wsdbm:ProductCategory2n/a1635
overall 22
F2:
#mapping v8 wsdbm:SubGenre uniform
SELECT ?v0 ?v1 ?v2 ?v4 ?v5 ?v6 ?v7 WHERE {
	?v0	foaf:homepage	?v1 .
	?v0	og:title	?v2 .
	?v0	rdf:type	?v3 .
	?v0	sorg:caption	?v4 .
	?v0	sorg:description	?v5 .
	?v1	sorg:url	?v6 .
	?v1	wsdbm:hits	?v7 .
	?v0	wsdbm:hasGenre	%v8% .
}
?v0?v1
?v0 foaf:homepage ?v1112054984
?v0 og:title ?v225001n/a
?v0 rdf:type ?v3125146n/a
?v0 sorg:caption ?v42502n/a
?v0 sorg:description ?v514961n/a
?v1 sorg:url ?v6n/a5001
?v1 wsdbm:hits ?v7n/a5001
?v0 wsdbm:hasGenre %v8%79n/a
overall 22
F3:
#mapping v3 wsdbm:SubGenre uniform
SELECT ?v0 ?v1 ?v2 ?v4 ?v5 ?v6 WHERE {
	?v0	sorg:contentRating	?v1 .
	?v0	sorg:contentSize	?v2 .
	?v0	wsdbm:hasGenre	%v3% .
	?v4	wsdbm:makesPurchase	?v5 .
	?v5	wsdbm:purchaseDate	?v6 .
	?v5	wsdbm:purchaseFor	?v0 .
}
?v0?v5
?v0 sorg:contentRating ?v17531n/a
?v0 sorg:contentSize ?v22439n/a
?v0 wsdbm:hasGenre %v3%79n/a
?v4 wsdbm:makesPurchase ?v5n/a149999
?v5 wsdbm:purchaseDate ?v6n/a44722
?v5 wsdbm:purchaseFor ?v017675150001
overall 33
F4:
#mapping v3 wsdbm:Topic uniform
SELECT ?v0 ?v1 ?v2 ?v4 ?v5 ?v6 ?v7 ?v8 WHERE {
	?v0	foaf:homepage	?v1 .
	?v2	gr:includes	?v0 .
	?v0	og:tag	%v3% .
	?v0	sorg:description	?v4 .
	?v0	sorg:contentSize	?v8 .
	?v1	sorg:url	?v5 .
	?v1	wsdbm:hits	?v6 .
	?v1	sorg:language	wsdbm:Language0 .
	?v7	wsdbm:likes	?v0 .
}
?v0?v1
?v0 foaf:homepage ?v1112054984
?v2 gr:includes ?v024275n/a
?v0 og:tag %v3%280n/a
?v0 sorg:description ?v414961n/a
?v0 sorg:contentSize ?v82439n/a
?v1 sorg:url ?v5n/a5001
?v1 wsdbm:hits ?v6n/a5001
?v1 sorg:language wsdbm:Language0n/a1461
?v7 wsdbm:likes ?v0 23800n/a
overall 44
F5:
#mapping v2 wsdbm:Retailer uniform
SELECT ?v0 ?v1 ?v3 ?v4 ?v5 ?v6 WHERE {
	?v0	gr:includes	?v1 .
	%v2%	gr:offers	?v0 .
	?v0	gr:price	?v3 .
	?v0	gr:validThrough	?v4 .
	?v1	og:title	?v5 .
	?v1	rdf:type	?v6 .
}
?v0?v1
?v0 gr:includes ?v19000124275
%v2% gr:offers ?v072n/a
?v0 gr:price ?v3 24275n/a
?v0 gr:validThrough ?v436347n/a
?v1 og:title ?v5n/a25001
?v1 rdf:type ?v6n/a125146
overall 130
C1:
SELECT ?v0 ?v4 ?v6 ?v7 WHERE {
	?v0	sorg:caption	?v1 .
	?v0	sorg:text	?v2 .
	?v0	sorg:contentRating	?v3 .
	?v0	rev:hasReview	?v4 .
	?v4	rev:title	?v5 .
	?v4	rev:reviewer	?v6 .
	?v7	sorg:actor	?v6 .
	?v7	sorg:language	?v8 .
}
?v0?v4?v6?v7
?v0 sorg:caption ?v12502n/an/an/a
?v0 sorg:text ?v27477n/an/an/a
?v0 sorg:contentRating ?v37531n/an/an/a
?v0 rev:hasReview ?v45160149635n/an/a
?v4 rev:title ?v5n/a44831n/an/a
?v4 rev:reviewer ?v6n/a15000130926n/a
?v7 sorg:actor ?v6n/an/a112701282
?v7 sorg:language ?v8n/an/an/a5515
overall 7779
C2:
SELECT ?v0 ?v3 ?v4 ?v8 WHERE {
	?v0	sorg:legalName	?v1 .
	?v0	gr:offers	?v2 .
	?v2	sorg:eligibleRegion	wsdbm:Country5 .
	?v2	gr:includes	?v3 .
	?v4	sorg:jobTitle	?v5 .
	?v4	foaf:homepage	?v6 .
	?v4	wsdbm:makesPurchase	?v7 .
	?v7	wsdbm:purchaseFor	?v3 .
	?v3	rev:hasReview	?v8 .
	?v8	rev:totalVotes	?v9 .
}
?v0?v2?v3?v4?v7?v8
?v0 sorg:legalName ?v1109n/an/an/an/an/a
?v0 gr:offers ?v2120044842n/an/an/an/a
?v2 sorg:eligibleRegion wsdbm:Country5n/a8914n/an/an/an/a
?v2 gr:includes ?v3n/a9000124275n/an/an/a
?v4 sorg:jobTitle ?v5n/an/an/a5009n/an/a
?v4 foaf:homepage ?v6n/an/an/a11205n/an/a
?v4 wsdbm:makesPurchase ?v7n/an/an/a15830149999n/a
?v7 wsdbm:purchaseFor ?v3n/an/a17675n/a150001n/a
?v3 rev:hasReview ?v8n/an/a2n/an/a2
?v8 rev:totalVotes ?v9n/an/an/an/an/a2
222222
C3:
SELECT ?v0 WHERE {
	?v0	wsdbm:likes	?v1 .
	?v0	wsdbm:friendOf	?v2 .
	?v0	dc:Location	?v3 .
	?v0	foaf:age	?v4 .
	?v0	wsdbm:gender	?v5 .
	?v0	foaf:givenName	?v6 .
}
?v0
?v0 wsdbm:likes ?v123922
?v0 wsdbm:friendOf ?v239782
?v0 dc:Location ?v340298
?v0 foaf:age ?v450096
?v0 wsdbm:gender ?v559785
?v0 foaf:givenName ?v669971
overall 806

Campaign Waterloo

Data Systems Group
David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1
Tel: 519-888-4567
Fax: 519-885-1208

Contact | Feedback: db-webmaster@cs.uwaterloo.ca | Data Systems Group


Valid HTML 4.01!Valid CSS! Last modified: Saturday, 12-Jul-2014 00:03:29 EDT


Menu:ShowHide