UCQProj : Containment of Union of Conjunctive Quries with Projection benchmark testcases

This benchmark testcase comprises 28 queries which have variables in the SELECT clause (aka distinguished variables) hence the name projection. In addition to the projection, the queries are chosen according to selectivity, number of conjunction and unions, and size (in terms of the number of connectives). This test suite assesses containment solvers that support projection and union of conjunctive queries.

Q11a Q11b
PREFIX : 

SELECT ?x WHERE { 
   ?x :takesCourse "Course10" . ?x :takesCourse "Course20" . 
}
                        
PREFIX : 


SELECT ?x WHERE { 
   ?x :takesCourse "Course10" .
}
                        
Q11b Q11a
PREFIX : 


SELECT ?x WHERE { 
   ?x :takesCourse "Course10" .
}
                        
PREFIX : 

SELECT ?x WHERE { 
   ?x :takesCourse "Course10" . ?x :takesCourse "Course20" . 
}
                        
Q12a Q12b
PREFIX : 

SELECT ?x ?y ?z WHERE {
	?x a :Student .
	?x :registeredAt ?y .
	?y a :University .
	?x :placeOfBirth ?z .
	?z a :City .
	?y :locatedAt ?z .	
}
                        
PREFIX : 

SELECT ?x ?y ?z WHERE {
	?x a :Student .
	?x :registeredAt ?y .
	?x :placeOfBirth ?z .
	?y a :University .
	?y :locatedAt ?z .	
	?z a :City .
}
                        
Q12b Q12a
PREFIX : 

SELECT ?x ?y ?z WHERE {
	?x a :Student .
	?x :registeredAt ?y .
	?x :placeOfBirth ?z .
	?y a :University .
	?y :locatedAt ?z .	
	?z a :City .
}
                        
PREFIX : 

SELECT ?x ?y ?z WHERE {
	?x a :Student .
	?x :registeredAt ?y .
	?y a :University .
	?x :placeOfBirth ?z .
	?z a :City .
	?y :locatedAt ?z .	
}
                        
Q13a Q13b
PREFIX : 

SELECT ?x ?y WHERE {
	?x a :Professor .
	?x :graduatedFrom ?y .
	?x :memeberOf ?y 
}
                        
PREFIX : 

SELECT ?x ?y WHERE {
	?x a :Professor .
	?x :memeberOf ?y 
}
                        
Q13b Q13a
PREFIX : 

SELECT ?x ?y WHERE {
	?x a :Professor .
	?x :memeberOf ?y 
}
                        
PREFIX : 

SELECT ?x ?y WHERE {
	?x a :Professor .
	?x :graduatedFrom ?y .
	?x :memeberOf ?y 
}
                        
Q14c Q14b
PREFIX : 

SELECT ?x   WHERE {
	?x :takesCourse ?c1 .
	?c1 :shortName "Cs200" .
	?x :takesCourse ?c2 .
	?c2 :shortName "Cs301" .
	?x :takesCourse _:b .
	_:b :shortName "Cs401" .
}
                        
PREFIX : 

SELECT ?x WHERE {
	?x :takesCourse ?c1 .
	?c1 :shortName "Cs200" .
	?x :takesCourse ?c2 .
	?c2 :shortName "Cs301" .
}
                        
Q14b Q14c
PREFIX : 

SELECT ?x WHERE {
	?x :takesCourse ?c1 .
	?c1 :shortName "Cs200" .
	?x :takesCourse ?c2 .
	?c2 :shortName "Cs301" .
}
                        
PREFIX : 

SELECT ?x   WHERE {
	?x :takesCourse ?c1 .
	?c1 :shortName "Cs200" .
	?x :takesCourse ?c2 .
	?c2 :shortName "Cs301" .
	?x :takesCourse _:b .
	_:b :shortName "Cs401" .
}
                        
Q15a Q15b
SELECT ?x ?y  WHERE {
	?x ?z ?y 
}
                        
PREFIX : 

SELECT ?x ?y  WHERE {
	?x :name ?y .
}
                        
Q15b Q15a
PREFIX : 

SELECT ?x ?y  WHERE {
	?x :name ?y .
}
                        
SELECT ?x ?y  WHERE {
	?x ?z ?y 
}
                        
Q16a Q16b
PREFIX : 

SELECT ?z WHERE {
	?x a :Department .
	?y a :University .
	?x ?z ?y .
}
                        
PREFIX : 

SELECT  ?z WHERE {
	?x a :Faculty .
	?y a :University .
	?x ?z ?y .
}
                        
Q16b Q16a
PREFIX : 

SELECT  ?z WHERE {
	?x a :Faculty .
	?y a :University .
	?x ?z ?y .
}
                        
PREFIX : 

SELECT ?z WHERE {
	?x a :Department .
	?y a :University .
	?x ?z ?y .
}
                        
Q16a Q16c
PREFIX : 

SELECT ?z WHERE {
	?x a :Department .
	?y a :University .
	?x ?z ?y .
}
                        
PREFIX : 

SELECT  ?z WHERE {
	?x ?z ?y .
}
                        
Q16c Q16a
PREFIX : 

SELECT  ?z WHERE {
	?x ?z ?y .
}
                        
PREFIX : 

SELECT ?z WHERE {
	?x a :Department .
	?y a :University .
	?x ?z ?y .
}
                        
Q17a Q17b
PREFIX : 

SELECT ?x ?y ?z ?t ?s ?ag ?sx ?email ?dept ?course WHERE 
{ 
  ?x a :Student .
  ?x :name ?y . 
  ?x :nickName ?z . 
  ?x :telephone ?t . 
  ?x :ssn ?s . 
  ?x :age ?ag . 
  ?x :sex ?sx . 
  ?x :emailAddress ?email . 
  ?x :memberOf ?dept . 
  ?x :takesCourse ?course . 
}
                        
PREFIX : 

SELECT ?x ?y ?z ?t ?s ?ag ?sx ?email ?dept ?course  WHERE 
{ 
  ?x a :Student .
  ?x :name ?y . 
  ?x :nickName ?z . 
  ?x :telephone ?t . 
  ?x :ssn ?s . 
  ?x :age ?ag . 
  ?x :sex ?sx . 
  ?x :emailAddress ?email . 
  ?x :memberOf ?dept . 
  ?x :takesCourse ?course . 
  ?x :masterDegreeFrom ?master .
}
                        
Q17b Q17a
PREFIX : 

SELECT ?x ?y ?z ?t ?s ?ag ?sx ?email ?dept ?course  WHERE 
{ 
  ?x a :Student .
  ?x :name ?y . 
  ?x :nickName ?z . 
  ?x :telephone ?t . 
  ?x :ssn ?s . 
  ?x :age ?ag . 
  ?x :sex ?sx . 
  ?x :emailAddress ?email . 
  ?x :memberOf ?dept . 
  ?x :takesCourse ?course . 
  ?x :masterDegreeFrom ?master .
}
                        
PREFIX : 

SELECT ?x ?y ?z ?t ?s ?ag ?sx ?email ?dept ?course WHERE 
{ 
  ?x a :Student .
  ?x :name ?y . 
  ?x :nickName ?z . 
  ?x :telephone ?t . 
  ?x :ssn ?s . 
  ?x :age ?ag . 
  ?x :sex ?sx . 
  ?x :emailAddress ?email . 
  ?x :memberOf ?dept . 
  ?x :takesCourse ?course . 
}
                        
Q18a Q18b
PREFIX : 

SELECT ?x ?y ?z ?r  WHERE {
	?x :subOrganizationOf ?y .
	?y :subOrganizationOf ?z .
	?z :subOrganizationOf ?r .
	?r :subOrganizationOf :Unibz .
}


                        
PREFIX : 

SELECT ?x ?y ?z ?r WHERE {
	?x :subOrganizationOf ?y .
	?y :subOrganizationOf ?z .
	?z :subOrganizationOf ?r .
}


                        
Q18b Q18a
PREFIX : 

SELECT ?x ?y ?z ?r WHERE {
	?x :subOrganizationOf ?y .
	?y :subOrganizationOf ?z .
	?z :subOrganizationOf ?r .
}


                        
PREFIX : 

SELECT ?x ?y ?z ?r  WHERE {
	?x :subOrganizationOf ?y .
	?y :subOrganizationOf ?z .
	?z :subOrganizationOf ?r .
	?r :subOrganizationOf :Unibz .
}


                        
Q19a Q19b
PREFIX : 

SELECT ?x ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :UniversityO .
	?x :email ?z .
}
                        
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :University1 .
	?x :email ?z .
}
                        
Q19b Q19a
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :University1 .
	?x :email ?z .
}
                        
PREFIX : 

SELECT ?x ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :UniversityO .
	?x :email ?z .
}
                        
Q19c Q19b
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf ?u .
	?x :email ?z .
}
                        
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :University1 .
	?x :email ?z .
}
                        
Q19b Q19c
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf :University1 .
	?x :email ?z .
}
                        
PREFIX : 

SELECT ?x  ?z WHERE {
	?x a :GraduateStudent .
	?y a :Department .
	?x :memberOf ?y .
	?y :subOrganizationOf ?u .
	?x :email ?z .
}
                        
Q20a Q20b
PREFIX : 







SELECT * WHERE 
{ 
  ?x a :Student .  
  {?x :name ?y } 
    UNION 
  {?x :nickName ?z } 
  UNION 
  {?x :telephone ?tel } 
  UNION 
  {?x :ssn ?ssn } 
     UNION 
  {?x :sex ?sex }
   UNION 
  {?x :memberOf ?dept } 
 UNION 
  {?x :emailAddress ?email }
  UNION 
  {?x :age ?age }  
 ?x :takesCourse ?course .
}
                        
PREFIX : 






SELECT * WHERE { 
  ?x a :Student . 
  {?x :name ?y } 
    UNION 
  {?x :nickName ?z .
   ?x :telephone ?tel .
   ?x :ssn ?ssn .
   ?x :sex ?sex . 
   ?x :memberOf ?dept .
   ?x :emailAddress ?email .
   ?x :age ?age  .
    } 
 ?x :takesCourse ?course .
}
                        
Q20b Q20a
PREFIX : 






SELECT * WHERE { 
  ?x a :Student . 
  {?x :name ?y } 
    UNION 
  {?x :nickName ?z .
   ?x :telephone ?tel .
   ?x :ssn ?ssn .
   ?x :sex ?sex . 
   ?x :memberOf ?dept .
   ?x :emailAddress ?email .
   ?x :age ?age  .
    } 
 ?x :takesCourse ?course .
}
                        
PREFIX : 







SELECT * WHERE 
{ 
  ?x a :Student .  
  {?x :name ?y } 
    UNION 
  {?x :nickName ?z } 
  UNION 
  {?x :telephone ?tel } 
  UNION 
  {?x :ssn ?ssn } 
     UNION 
  {?x :sex ?sex }
   UNION 
  {?x :memberOf ?dept } 
 UNION 
  {?x :emailAddress ?email }
  UNION 
  {?x :age ?age }  
 ?x :takesCourse ?course .
}
                        
Q21a Q21b
PREFIX : 

SELECT ?name ?email 
WHERE 
{ 
  ?x a :Student . 
  ?x :name ?name . 
  ?x :email ?email .
  { 
    ?x :takesCourse ?c . 
    ?c :shortName "Course10" .
  }
  UNION 
  { ?x :takesCourse ?c .
    ?c :shortName "Course20" .
  }
  UNION 
  { ?x :takesCourse ?c .
    ?c :shortName "Course30" .
  }
}
                        
PREFIX : 

SELECT ?name ?email 
WHERE { 
  ?x a :Student . 
  ?x :name ?name . 
  ?x :email ?email .
  ?x :takesCourse ?c1 . 
  ?c1 :shortName "Course10" . 
  ?x :takesCourse ?c2 . 
  ?c2 :shortName "Course20" . 
  ?x :takesCourse ?c . 
  ?c :shortName "Course30" .
}
                        
Q21b Q21a
PREFIX : 

SELECT ?name ?email 
WHERE { 
  ?x a :Student . 
  ?x :name ?name . 
  ?x :email ?email .
  ?x :takesCourse ?c1 . 
  ?c1 :shortName "Course10" . 
  ?x :takesCourse ?c2 . 
  ?c2 :shortName "Course20" . 
  ?x :takesCourse ?c . 
  ?c :shortName "Course30" .
}
                        
PREFIX : 

SELECT ?name ?email 
WHERE 
{ 
  ?x a :Student . 
  ?x :name ?name . 
  ?x :email ?email .
  { 
    ?x :takesCourse ?c . 
    ?c :shortName "Course10" .
  }
  UNION 
  { ?x :takesCourse ?c .
    ?c :shortName "Course20" .
  }
  UNION 
  { ?x :takesCourse ?c .
    ?c :shortName "Course30" .
  }
}
                        
Q22a Q22b
PREFIX : 

SELECT ?x ?y WHERE 
{
  {
    { ?x a :UndergradStudent .  
      ?x :takesCourse ?y }
       UNION 
    { ?x a :GraduateStudent .
      ?x :takesCourse ?y 
    }
  } 
  ?y a :CsCourse .
}
                        
PREFIX : 

SELECT ?x ?y WHERE 
{ 
  { ?x a :UndergradStudent .
    ?x :takesCourse ?y . 
    ?y a :CsCourse 
  }
    UNION 
  { 
     ?x a :GraduateStudent .
     ?x :takesCourse ?y 
  }
}
                        
Q22b Q22a
PREFIX : 

SELECT ?x ?y WHERE 
{ 
  { ?x a :UndergradStudent .
    ?x :takesCourse ?y . 
    ?y a :CsCourse 
  }
    UNION 
  { 
     ?x a :GraduateStudent .
     ?x :takesCourse ?y 
  }
}
                        
PREFIX : 

SELECT ?x ?y WHERE 
{
  {
    { ?x a :UndergradStudent .  
      ?x :takesCourse ?y }
       UNION 
    { ?x a :GraduateStudent .
      ?x :takesCourse ?y 
    }
  } 
  ?y a :CsCourse .
}
                        
Generated on Fri Jun 14 16:41:27 CEST 2013 with SuiteTool.