<docbook><section><title>VirtTipsAndTricksLinkedDataViewsDB2Script</title><title>Script for building Linked Data Views for the DB2 tables</title>Script for building Linked Data Views for the DB2 tables
<programlisting>-- ABox Mappings:

grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;CL_SCHED&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;DEPARTMENT&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMPLOYEE&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_ACT&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_PHOTO&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_RESUME&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;IN_TRAY&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;ORG&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;PROJECT&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;SALES&quot; to SPARQL_SELECT;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;STAFF&quot; to SPARQL_SELECT;


SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:cl_sched &quot;http://^{URIQADefaultHost}^/db2views/cl_sched/CLASS_CODE/%U#this&quot; (in _CLASS_CODE varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:department &quot;http://^{URIQADefaultHost}^/db2views/department/DEPTNO/%U#this&quot; (in _DEPTNO varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:employee &quot;http://^{URIQADefaultHost}^/db2views/employee/EMPNO/%U#this&quot; (in _EMPNO varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:emp_act &quot;http://^{URIQADefaultHost}^/db2views/emp_act/EMPNO/%U/PROJNO/%U/ACTNO/%d#this&quot; (in _EMPNO varchar not null,in _PROJNO varchar not null,in _ACTNO integer not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:emp_photo &quot;http://^{URIQADefaultHost}^/db2views/emp_photo/EMPNO/%U/PHOTO_FORMAT/%U#this&quot; (in _EMPNO varchar not null,in _PHOTO_FORMAT varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:emp_photo_picture &quot;http://^{URIQADefaultHost}^/db2views/objects/emp_photo/EMPNO/%U/PHOTO_FORMAT/%U/PICTURE.jpe&quot; (in _EMPNO varchar not null,in _PHOTO_FORMAT varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:emp_resume &quot;http://^{URIQADefaultHost}^/db2views/emp_resume/EMPNO/%U/RESUME_FORMAT/%U#this&quot; (in _EMPNO varchar not null,in _RESUME_FORMAT varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:in_tray &quot;http://^{URIQADefaultHost}^/db2views/in_tray/RECEIVED/%1D/SOURCE/%U/SUBJECT/%U/NOTE_TEXT/%U#this&quot; (in _RECEIVED datetime not null,in _SOURCE varchar not null,in _SUBJECT varchar not null,in _NOTE_TEXT varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:org &quot;http://^{URIQADefaultHost}^/db2views/org/DEPTNUMB/%d/MANAGER/%d#this&quot; (in _DEPTNUMB integer not null,in _MANAGER integer not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:project &quot;http://^{URIQADefaultHost}^/db2views/project/PROJNO/%U#this&quot; (in _PROJNO varchar not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:sales &quot;http://^{URIQADefaultHost}^/db2views/sales/SALES_DATE/%1D/SALES_PERSON/%U/REGION/%U/SALES/%d#this&quot; (in _SALES_DATE date not null,in _SALES_PERSON varchar not null,in _REGION varchar not null,in _SALES integer not null) . ;
SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
create iri class db2views:staff &quot;http://^{URIQADefaultHost}^/db2views/staff/ID/%d#this&quot; (in _ID integer not null) . ;


drop view &quot;DB2&quot;.&quot;db2ma&quot;.&quot;db2views__Total&quot;;
create view &quot;DB2&quot;.&quot;db2ma&quot;.&quot;db2views__Total&quot; as select (cnt0*cnt1)+(cnt2*cnt3)+(cnt4*cnt5)+(cnt6*cnt7)+(cnt8*cnt9)+(cnt10*cnt11)+(cnt12*cnt13)+(cnt14*cnt15)+(cnt16*cnt17)+(cnt18*cnt19)+(cnt20*cnt21) AS cnt from
(select count(*) cnt0 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;CL_SCHED&quot;) tb0,
(select count(*)+1 as cnt1 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.CL_SCHED&#39;) tb1,
(select count(*) cnt2 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;DEPARTMENT&quot;) tb2,
(select count(*)+1 as cnt3 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.DEPARTMENT&#39;) tb3,
(select count(*) cnt4 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMPLOYEE&quot;) tb4,
(select count(*)+1 as cnt5 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.EMPLOYEE&#39;) tb5,
(select count(*) cnt6 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_ACT&quot;) tb6,
(select count(*)+1 as cnt7 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.EMP_ACT&#39;) tb7,
(select count(*) cnt8 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_PHOTO&quot;) tb8,
(select count(*)+1 as cnt9 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.EMP_PHOTO&#39;) tb9,
(select count(*) cnt10 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_RESUME&quot;) tb10,
(select count(*)+1 as cnt11 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.EMP_RESUME&#39;) tb11,
(select count(*) cnt12 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;IN_TRAY&quot;) tb12,
(select count(*)+1 as cnt13 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.IN_TRAY&#39;) tb13,
(select count(*) cnt14 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;ORG&quot;) tb14,
(select count(*)+1 as cnt15 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.ORG&#39;) tb15,
(select count(*) cnt16 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;PROJECT&quot;) tb16,
(select count(*)+1 as cnt17 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.PROJECT&#39;) tb17,
(select count(*) cnt18 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;SALES&quot;) tb18,
(select count(*)+1 as cnt19 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.SALES&#39;) tb19,
(select count(*) cnt20 from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;STAFF&quot;) tb20,
(select count(*)+1 as cnt21 from DB.DBA.TABLE_COLS where &quot;TABLE&quot; = &#39;DB2.db2ma.STAFF&#39;) tb21
;
grant select on &quot;DB2&quot;.&quot;db2ma&quot;.&quot;db2views__Total&quot; to SPARQL_SELECT;


SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;CL_SCHED&quot; as cl_sched_s
{
   create db2views:qm-cl_sched as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.CL_SCHED&quot;
      db2views:cl_sched (cl_sched_s.&quot;CLASS_CODE&quot;)  a db2views:CL_SCHED ;
      db2views:class_code cl_sched_s.&quot;CLASS_CODE&quot; as db2views:db2ma-cl_sched-class_code ;
      db2views:day cl_sched_s.&quot;DAY&quot; as db2views:db2ma-cl_sched-day ;
      db2views:starting cl_sched_s.&quot;STARTING&quot; as db2views:db2ma-cl_sched-starting ;
      db2views:ending cl_sched_s.&quot;ENDING&quot; as db2views:db2ma-cl_sched-ending .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;DEPARTMENT&quot; as department_s
{
   create db2views:qm-department as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.DEPARTMENT&quot;
      db2views:department (department_s.&quot;DEPTNO&quot;)  a db2views:DEPARTMENT ;
      db2views:deptno department_s.&quot;DEPTNO&quot; as db2views:db2ma-department-deptno ;
      db2views:deptname department_s.&quot;DEPTNAME&quot; as db2views:db2ma-department-deptname ;
      db2views:mgrno department_s.&quot;MGRNO&quot; as db2views:db2ma-department-mgrno ;
      db2views:admrdept department_s.&quot;ADMRDEPT&quot; as db2views:db2ma-department-admrdept ;
      db2views:location department_s.&quot;LOCATION&quot; as db2views:db2ma-department-location .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMPLOYEE&quot; as employee_s
{
   create db2views:qm-employee as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.EMPLOYEE&quot;
      db2views:employee (employee_s.&quot;EMPNO&quot;)  a db2views:EMPLOYEE ;
       a foaf:Person ;
      db2views:empno employee_s.&quot;EMPNO&quot; as db2views:db2ma-employee-empno ;
      db2views:firstnme employee_s.&quot;FIRSTNME&quot; as db2views:db2ma-employee-firstnme ;
      db2views:midinit employee_s.&quot;MIDINIT&quot; as db2views:db2ma-employee-midinit ;
      db2views:lastname employee_s.&quot;LASTNAME&quot; as db2views:db2ma-employee-lastname ;
      db2views:workdept employee_s.&quot;WORKDEPT&quot; as db2views:db2ma-employee-workdept ;
      db2views:phoneno employee_s.&quot;PHONENO&quot; as db2views:db2ma-employee-phoneno ;
      db2views:hiredate employee_s.&quot;HIREDATE&quot; as db2views:db2ma-employee-hiredate ;
      db2views:job employee_s.&quot;JOB&quot; as db2views:db2ma-employee-job ;
      db2views:edlevel employee_s.&quot;EDLEVEL&quot; as db2views:db2ma-employee-edlevel ;
      db2views:sex employee_s.&quot;SEX&quot; as db2views:db2ma-employee-sex ;
      db2views:birthdate employee_s.&quot;BIRTHDATE&quot; as db2views:db2ma-employee-birthdate ;
      db2views:salary employee_s.&quot;SALARY&quot; as db2views:db2ma-employee-salary ;
      db2views:bonus employee_s.&quot;BONUS&quot; as db2views:db2ma-employee-bonus ;
      db2views:comm employee_s.&quot;COMM&quot; as db2views:db2ma-employee-comm .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_ACT&quot; as emp_act_s
{
   create db2views:qm-emp_act as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.EMP_ACT&quot;
      db2views:emp_act (emp_act_s.&quot;EMPNO&quot;,emp_act_s.&quot;PROJNO&quot;,emp_act_s.&quot;ACTNO&quot;)  a db2views:EMP_ACT ;
      db2views:empno emp_act_s.&quot;EMPNO&quot; as db2views:db2ma-emp_act-empno ;
      db2views:projno emp_act_s.&quot;PROJNO&quot; as db2views:db2ma-emp_act-projno ;
      db2views:actno emp_act_s.&quot;ACTNO&quot; as db2views:db2ma-emp_act-actno ;
      db2views:emptime emp_act_s.&quot;EMPTIME&quot; as db2views:db2ma-emp_act-emptime ;
      db2views:emstdate emp_act_s.&quot;EMSTDATE&quot; as db2views:db2ma-emp_act-emstdate ;
      db2views:emendate emp_act_s.&quot;EMENDATE&quot; as db2views:db2ma-emp_act-emendate .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_PHOTO&quot; as emp_photo_s
{
   create db2views:qm-emp_photo as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.EMP_PHOTO&quot;
      db2views:emp_photo (emp_photo_s.&quot;EMPNO&quot;,emp_photo_s.&quot;PHOTO_FORMAT&quot;)  a db2views:EMP_PHOTO ;
      db2views:empno emp_photo_s.&quot;EMPNO&quot; as db2views:db2ma-emp_photo-empno ;
      db2views:photo_format emp_photo_s.&quot;PHOTO_FORMAT&quot; as db2views:db2ma-emp_photo-photo_format ;
      db2views:picture db2views:emp_photo_picture (emp_photo_s.&quot;EMPNO&quot;,emp_photo_s.&quot;PHOTO_FORMAT&quot;)  as db2views:db2ma-emp_photo-picture .
      db2views:emp_photo_picture (emp_photo_s.&quot;EMPNO&quot;,emp_photo_s.&quot;PHOTO_FORMAT&quot;)  a aowl:Content ; aowl:body emp_photo_s.&quot;PICTURE&quot; as db2views:db2ma-emp_photo-picture-content ; aowl:type &quot;image/jpeg&quot; .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_RESUME&quot; as emp_resume_s
{
   create db2views:qm-emp_resume as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.EMP_RESUME&quot;
      db2views:emp_resume (emp_resume_s.&quot;EMPNO&quot;,emp_resume_s.&quot;RESUME_FORMAT&quot;)  a db2views:EMP_RESUME ;
      db2views:empno emp_resume_s.&quot;EMPNO&quot; as db2views:db2ma-emp_resume-empno ;
      db2views:resume_format emp_resume_s.&quot;RESUME_FORMAT&quot; as db2views:db2ma-emp_resume-resume_format ;
      db2views:resume emp_resume_s.&quot;RESUME&quot; as db2views:db2ma-emp_resume-resume .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;IN_TRAY&quot; as in_tray_s
{
   create db2views:qm-in_tray as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.IN_TRAY&quot;
      db2views:in_tray (in_tray_s.&quot;RECEIVED&quot;,in_tray_s.&quot;SOURCE&quot;,in_tray_s.&quot;SUBJECT&quot;,in_tray_s.&quot;NOTE_TEXT&quot;)  a db2views:IN_TRAY ;
      db2views:received in_tray_s.&quot;RECEIVED&quot; as db2views:db2ma-in_tray-received ;
      db2views:source in_tray_s.&quot;SOURCE&quot; as db2views:db2ma-in_tray-source ;
      db2views:subject in_tray_s.&quot;SUBJECT&quot; as db2views:db2ma-in_tray-subject ;
      db2views:note_text in_tray_s.&quot;NOTE_TEXT&quot; as db2views:db2ma-in_tray-note_text .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;ORG&quot; as org_s
{
   create db2views:qm-org as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.ORG&quot;
      db2views:org (org_s.&quot;DEPTNUMB&quot;,org_s.&quot;MANAGER&quot;)  a db2views:ORG ;
      db2views:deptnumb org_s.&quot;DEPTNUMB&quot; as db2views:db2ma-org-deptnumb ;
      db2views:deptname org_s.&quot;DEPTNAME&quot; as db2views:db2ma-org-deptname ;
      db2views:manager org_s.&quot;MANAGER&quot; as db2views:db2ma-org-manager ;
      db2views:division org_s.&quot;DIVISION&quot; as db2views:db2ma-org-division ;
      db2views:location org_s.&quot;LOCATION&quot; as db2views:db2ma-org-location .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;PROJECT&quot; as project_s
{
   create db2views:qm-project as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.PROJECT&quot;
      db2views:project (project_s.&quot;PROJNO&quot;)  a db2views:PROJECT ;
      db2views:projno project_s.&quot;PROJNO&quot; as db2views:db2ma-project-projno ;
      db2views:projname project_s.&quot;PROJNAME&quot; as db2views:db2ma-project-projname ;
      db2views:deptno project_s.&quot;DEPTNO&quot; as db2views:db2ma-project-deptno ;
      db2views:respemp project_s.&quot;RESPEMP&quot; as db2views:db2ma-project-respemp ;
      db2views:prstaff project_s.&quot;PRSTAFF&quot; as db2views:db2ma-project-prstaff ;
      db2views:prstdate project_s.&quot;PRSTDATE&quot; as db2views:db2ma-project-prstdate ;
      db2views:prendate project_s.&quot;PRENDATE&quot; as db2views:db2ma-project-prendate ;
      db2views:majproj project_s.&quot;MAJPROJ&quot; as db2views:db2ma-project-majproj .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;SALES&quot; as sales_s
{
   create db2views:qm-sales as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.SALES&quot;
      db2views:sales (sales_s.&quot;SALES_DATE&quot;,sales_s.&quot;SALES_PERSON&quot;,sales_s.&quot;REGION&quot;,sales_s.&quot;SALES&quot;)  a db2views:SALES ;
      db2views:sales_date sales_s.&quot;SALES_DATE&quot; as db2views:db2ma-sales-sales_date ;
      db2views:sales_person sales_s.&quot;SALES_PERSON&quot; as db2views:db2ma-sales-sales_person ;
      db2views:region sales_s.&quot;REGION&quot; as db2views:db2ma-sales-region ;
      db2views:sales sales_s.&quot;SALES&quot; as db2views:db2ma-sales-sales .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;STAFF&quot; as staff_s
{
   create db2views:qm-staff as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;)
    {
      # Maps from columns of &quot;DB2.db2ma.STAFF&quot;
      db2views:staff (staff_s.&quot;ID&quot;)  a db2views:STAFF ;
      db2views:id staff_s.&quot;ID&quot; as db2views:db2ma-staff-id ;
      db2views:name staff_s.&quot;NAME&quot; as db2views:db2ma-staff-name ;
      db2views:dept staff_s.&quot;DEPT&quot; as db2views:db2ma-staff-dept ;
      db2views:job staff_s.&quot;JOB&quot; as db2views:db2ma-staff-job ;
      db2views:years staff_s.&quot;YEARS&quot; as db2views:db2ma-staff-years ;
      db2views:salary staff_s.&quot;SALARY&quot; as db2views:db2ma-staff-salary ;
      db2views:comm staff_s.&quot;COMM&quot; as db2views:db2ma-staff-comm .

    }
}

;

SPARQL
prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;
prefix db2views-stat:&lt;http://demo.openlinksw.com/db2views/stat#&gt;
prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
prefix void:&lt;http://rdfs.org/ns/void#&gt;
prefix scovo:&lt;http://purl.org/NET/scovo#&gt;
prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;
prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;
alter quad storage virtrdf:DefaultQuadStorage
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;CL_SCHEDCount&quot; as cl_schedcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;DEPARTMENTCount&quot; as departmentcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMPLOYEECount&quot; as employeecount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_ACTCount&quot; as emp_actcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_PHOTOCount&quot; as emp_photocount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;EMP_RESUMECount&quot; as emp_resumecount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;IN_TRAYCount&quot; as in_traycount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;ORGCount&quot; as orgcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;PROJECTCount&quot; as projectcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;SALESCount&quot; as salescount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;STAFFCount&quot; as staffcount_s
from &quot;DB2&quot;.&quot;db2ma&quot;.&quot;db2views__Total&quot; as db2views__total_s
{
   create db2views:qm-VoidStatistics as graph iri (&quot;http://^{URIQADefaultHost}^/db2views#&quot;) option (exclusive)
    {
      # voID Statistics
      db2views-stat: a void:Dataset as db2views:dataset-db2 ;
       void:sparqlEndpoint&lt;http://demo.openlinksw.com/sparql&gt;   as db2views:dataset-sparql-db2 ;
      void:statItem db2views-stat:Stat .
      db2views-stat:Stat a scovo:Item ;
       rdf:value db2views__total_s.cnt as db2views:stat-decl-db2 ;
       scovo:dimension void:numOfTriples .

      db2views-stat: void:statItem db2views-stat:CL_SCHEDStat as db2views:statitem-db2-cl_sched .
      db2views-stat:CL_SCHEDStat a scovo:Item as db2views:statitem-decl-db2-cl_sched ;
      rdf:value cl_schedcount_s.cnt as db2views:statitem-cnt-db2-cl_sched ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-cl_sched ;
      scovo:dimension db2views:CL_SCHED as db2views:statitem-type-2-db2-cl_sched .

      db2views-stat: void:statItem db2views-stat:DEPARTMENTStat as db2views:statitem-db2-department .
      db2views-stat:DEPARTMENTStat a scovo:Item as db2views:statitem-decl-db2-department ;
      rdf:value departmentcount_s.cnt as db2views:statitem-cnt-db2-department ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-department ;
      scovo:dimension db2views:DEPARTMENT as db2views:statitem-type-2-db2-department .

      db2views-stat: void:statItem db2views-stat:EMPLOYEEStat as db2views:statitem-db2-employee .
      db2views-stat:EMPLOYEEStat a scovo:Item as db2views:statitem-decl-db2-employee ;
      rdf:value employeecount_s.cnt as db2views:statitem-cnt-db2-employee ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-employee ;
      scovo:dimension db2views:EMPLOYEE as db2views:statitem-type-2-db2-employee .

      db2views-stat: void:statItem db2views-stat:EMP_ACTStat as db2views:statitem-db2-emp_act .
      db2views-stat:EMP_ACTStat a scovo:Item as db2views:statitem-decl-db2-emp_act ;
      rdf:value emp_actcount_s.cnt as db2views:statitem-cnt-db2-emp_act ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-emp_act ;
      scovo:dimension db2views:EMP_ACT as db2views:statitem-type-2-db2-emp_act .

      db2views-stat: void:statItem db2views-stat:EMP_PHOTOStat as db2views:statitem-db2-emp_photo .
      db2views-stat:EMP_PHOTOStat a scovo:Item as db2views:statitem-decl-db2-emp_photo ;
      rdf:value emp_photocount_s.cnt as db2views:statitem-cnt-db2-emp_photo ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-emp_photo ;
      scovo:dimension db2views:EMP_PHOTO as db2views:statitem-type-2-db2-emp_photo .

      db2views-stat: void:statItem db2views-stat:EMP_RESUMEStat as db2views:statitem-db2-emp_resume .
      db2views-stat:EMP_RESUMEStat a scovo:Item as db2views:statitem-decl-db2-emp_resume ;
      rdf:value emp_resumecount_s.cnt as db2views:statitem-cnt-db2-emp_resume ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-emp_resume ;
      scovo:dimension db2views:EMP_RESUME as db2views:statitem-type-2-db2-emp_resume .

      db2views-stat: void:statItem db2views-stat:IN_TRAYStat as db2views:statitem-db2-in_tray .
      db2views-stat:IN_TRAYStat a scovo:Item as db2views:statitem-decl-db2-in_tray ;
      rdf:value in_traycount_s.cnt as db2views:statitem-cnt-db2-in_tray ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-in_tray ;
      scovo:dimension db2views:IN_TRAY as db2views:statitem-type-2-db2-in_tray .

      db2views-stat: void:statItem db2views-stat:ORGStat as db2views:statitem-db2-org .
      db2views-stat:ORGStat a scovo:Item as db2views:statitem-decl-db2-org ;
      rdf:value orgcount_s.cnt as db2views:statitem-cnt-db2-org ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-org ;
      scovo:dimension db2views:ORG as db2views:statitem-type-2-db2-org .

      db2views-stat: void:statItem db2views-stat:PROJECTStat as db2views:statitem-db2-project .
      db2views-stat:PROJECTStat a scovo:Item as db2views:statitem-decl-db2-project ;
      rdf:value projectcount_s.cnt as db2views:statitem-cnt-db2-project ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-project ;
      scovo:dimension db2views:PROJECT as db2views:statitem-type-2-db2-project .

      db2views-stat: void:statItem db2views-stat:SALESStat as db2views:statitem-db2-sales .
      db2views-stat:SALESStat a scovo:Item as db2views:statitem-decl-db2-sales ;
      rdf:value salescount_s.cnt as db2views:statitem-cnt-db2-sales ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-sales ;
      scovo:dimension db2views:SALES as db2views:statitem-type-2-db2-sales .

      db2views-stat: void:statItem db2views-stat:STAFFStat as db2views:statitem-db2-staff .
      db2views-stat:STAFFStat a scovo:Item as db2views:statitem-decl-db2-staff ;
      rdf:value staffcount_s.cnt as db2views:statitem-cnt-db2-staff ;
      scovo:dimension void:numberOfResources as db2views:statitem-type-1-db2-staff ;
      scovo:dimension db2views:STAFF as db2views:statitem-type-2-db2-staff .

    }
}
;



-- Virtual directories for instance data
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule2&#39;,
1,
&#39;(/[^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/sparql?query=DESCRIBE+%%3Chttp%%3A//^{URIQADefaultHost}^%U%%23this%%3E+FROM+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views%%23%%3E&amp;format=%U&#39;,
vector(&#39;path&#39;, &#39;*accept*&#39;),
null,
&#39;(text/rdf.n3)|(application/rdf.xml)|(text/n3)|(application/json)&#39;,
2,
null
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule4&#39;,
1,
&#39;/db2views/stat([^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/sparql?query=DESCRIBE+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views/stat%%23%%3E+%%3Fo+FROM+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views%%23%%3E+WHERE+{+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views/stat%%23%%3E+%%3Fp+%%3Fo+}&amp;format=%U&#39;,
vector(&#39;*accept*&#39;),
null,
&#39;(text/rdf.n3)|(application/rdf.xml)|(text/n3)|(application/json)&#39;,
2,
null
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule6&#39;,
1,
&#39;/db2views/objects/([^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/sparql?query=DESCRIBE+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views/objects/%U%%3E+FROM+%%3Chttp%%3A//^{URIQADefaultHost}^/db2views%%23%%3E&amp;format=%U&#39;,
vector(&#39;path&#39;, &#39;*accept*&#39;),
null,
&#39;(text/rdf.n3)|(application/rdf.xml)|(text/n3)|(application/json)&#39;,
2,
null
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule1&#39;,
1,
&#39;([^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/describe/?url=http%%3A//^{URIQADefaultHost}^%U%%23this&amp;graph=http%%3A//^{URIQADefaultHost}^/db2views%%23&#39;,
vector(&#39;path&#39;),
null,
null,
2,
303
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule7&#39;,
1,
&#39;/db2views/stat([^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/describe/?url=http%%3A//^{URIQADefaultHost}^/db2views/stat%%23&amp;graph=http%%3A//^{URIQADefaultHost}^/db2views%%23&#39;,
vector(&#39;path&#39;),
null,
null,
2,
303
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_rule5&#39;,
1,
&#39;/db2views/objects/(.*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/services/rdf/object.binary?path=%%2Fdb2views%%2Fobjects%%2F%U&amp;accept=%U&#39;,
vector(&#39;path&#39;, &#39;*accept*&#39;),
null,
null,
2,
null
);
DB.DBA.URLREWRITE_CREATE_RULELIST ( &#39;db2views_rule_list1&#39;, 1, vector ( &#39;db2views_rule1&#39;, &#39;db2views_rule7&#39;, &#39;db2views_rule5&#39;, &#39;db2views_rule2&#39;, &#39;db2views_rule4&#39;, &#39;db2views_rule6&#39;));
DB.DBA.VHOST_REMOVE (lpath=&gt;&#39;/db2views&#39;);
DB.DBA.VHOST_DEFINE (lpath=&gt;&#39;/db2views&#39;, ppath=&gt;&#39;/&#39;, vsp_user=&gt;&#39;dba&#39;, is_dav=&gt;0,
is_brws=&gt;0, opts=&gt;vector (&#39;url_rewrite&#39;, &#39;db2views_rule_list1&#39;)
);

-- Virtual directories for ontology
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_owl_rule2&#39;,
1,
&#39;(/[^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/sparql?query=DESCRIBE+%%3Chttp%%3A//^{URIQADefaultHost}^%U%%3E+FROM+%%3Chttp%%3A//^{URIQADefaultHost}^/schemas/db2views%%23%%3E&amp;format=%U&#39;,
vector(&#39;path&#39;, &#39;*accept*&#39;),
null,
&#39;(text/rdf.n3)|(application/rdf.xml)|(text/n3)|(application/json)&#39;,
2,
null
);
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
&#39;db2views_owl_rule1&#39;,
1,
&#39;([^#]*)&#39;,
vector(&#39;path&#39;),
1,
&#39;/describe/?url=http://^{URIQADefaultHost}^%U&#39;,
vector(&#39;path&#39;),
null,
null,
2,
303
);
DB.DBA.URLREWRITE_CREATE_RULELIST ( &#39;db2views_owl_rule_list1&#39;, 1, vector ( &#39;db2views_owl_rule1&#39;, &#39;db2views_owl_rule2&#39;));
DB.DBA.VHOST_REMOVE (lpath=&gt;&#39;/schemas/db2views&#39;);
DB.DBA.VHOST_DEFINE (lpath=&gt;&#39;/schemas/db2views&#39;, ppath=&gt;&#39;/&#39;, vsp_user=&gt;&#39;dba&#39;, is_dav=&gt;0,
is_brws=&gt;0, opts=&gt;vector (&#39;url_rewrite&#39;, &#39;db2views_owl_rule_list1&#39;)
);

-- TBox Mappings:

@prefix owl:&lt;http://www.w3.org/2002/07/owl#&gt;   .
@prefix rdf:&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;   .
@prefix rdfs:&lt;http://www.w3.org/2000/01/rdf-schema#&gt;   .
@prefix xsd:&lt;http://www.w3.org/2001/XMLSchema#&gt;   .
@prefix aowl:&lt;http://bblfish.net/work/atom-owl/2006-06-06/&gt;   .
@prefix virtrdf:&lt;http://www.openlinksw.com/schemas/virtrdf#&gt;   .
@prefix db2views:&lt;http://demo.openlinksw.com/schemas/db2views/&gt;   .
@prefix foaf:&lt;http://xmlns.com/foaf/0.1/&gt;   .

db2views: a owl:Ontology .

# DB2.db2ma.CL_SCHED
db2views:CL_SCHED a rdfs:Class .
db2views:CL_SCHED rdfs:isDefinedBy db2views: .
db2views:CL_SCHED rdfs:label &quot;DB2.db2ma.CL_SCHED&quot; .
db2views:class_code a owl:DatatypeProperty .
db2views:class_code rdfs:range xsd:string .
db2views:class_code rdfs:domain db2views:CL_SCHED .
db2views:class_code rdfs:isDefinedBy db2views: .
db2views:class_code rdfs:label &quot;CLASS_CODE&quot; .
db2views:day a owl:DatatypeProperty .
db2views:day rdfs:range xsd:int .
db2views:day rdfs:domain db2views:CL_SCHED .
db2views:day rdfs:isDefinedBy db2views: .
db2views:day rdfs:label &quot;DAY&quot; .
db2views:starting a owl:DatatypeProperty .
db2views:starting rdfs:range xsd:time .
db2views:starting rdfs:domain db2views:CL_SCHED .
db2views:starting rdfs:isDefinedBy db2views: .
db2views:starting rdfs:label &quot;STARTING&quot; .
db2views:ending a owl:DatatypeProperty .
db2views:ending rdfs:range xsd:time .
db2views:ending rdfs:domain db2views:CL_SCHED .
db2views:ending rdfs:isDefinedBy db2views: .
db2views:ending rdfs:label &quot;ENDING&quot; .

# DB2.db2ma.DEPARTMENT
db2views:DEPARTMENT a rdfs:Class .
db2views:DEPARTMENT rdfs:isDefinedBy db2views: .
db2views:DEPARTMENT rdfs:label &quot;DB2.db2ma.DEPARTMENT&quot; .
db2views:deptno a owl:DatatypeProperty .
db2views:deptno rdfs:range xsd:string .
db2views:deptno rdfs:domain db2views:DEPARTMENT .
db2views:deptno rdfs:isDefinedBy db2views: .
db2views:deptno rdfs:label &quot;DEPTNO&quot; .
db2views:deptname a owl:DatatypeProperty .
db2views:deptname rdfs:range xsd:string .
db2views:deptname rdfs:domain db2views:DEPARTMENT .
db2views:deptname rdfs:isDefinedBy db2views: .
db2views:deptname rdfs:label &quot;DEPTNAME&quot; .
db2views:mgrno a owl:DatatypeProperty .
db2views:mgrno rdfs:range xsd:string .
db2views:mgrno rdfs:domain db2views:DEPARTMENT .
db2views:mgrno rdfs:isDefinedBy db2views: .
db2views:mgrno rdfs:label &quot;MGRNO&quot; .
db2views:admrdept a owl:DatatypeProperty .
db2views:admrdept rdfs:range xsd:string .
db2views:admrdept rdfs:domain db2views:DEPARTMENT .
db2views:admrdept rdfs:isDefinedBy db2views: .
db2views:admrdept rdfs:label &quot;ADMRDEPT&quot; .
db2views:location a owl:DatatypeProperty .
db2views:location rdfs:range xsd:string .
db2views:location rdfs:domain db2views:DEPARTMENT .
db2views:location rdfs:isDefinedBy db2views: .
db2views:location rdfs:label &quot;LOCATION&quot; .

# DB2.db2ma.EMPLOYEE
db2views:EMPLOYEE a rdfs:Class .
db2views:EMPLOYEE rdfs:isDefinedBy db2views: .
db2views:EMPLOYEE rdfs:label &quot;DB2.db2ma.EMPLOYEE&quot; .
db2views:EMPLOYEE rdfs:subClassOf foaf:Person .
db2views:empno a owl:DatatypeProperty .
db2views:empno rdfs:range xsd:string .
db2views:empno rdfs:domain db2views:EMPLOYEE .
db2views:empno rdfs:isDefinedBy db2views: .
db2views:empno rdfs:label &quot;EMPNO&quot; .
db2views:firstnme a owl:DatatypeProperty .
db2views:firstnme rdfs:range xsd:string .
db2views:firstnme rdfs:domain db2views:EMPLOYEE .
db2views:firstnme rdfs:isDefinedBy db2views: .
db2views:firstnme rdfs:label &quot;FIRSTNME&quot; .
db2views:midinit a owl:DatatypeProperty .
db2views:midinit rdfs:range xsd:string .
db2views:midinit rdfs:domain db2views:EMPLOYEE .
db2views:midinit rdfs:isDefinedBy db2views: .
db2views:midinit rdfs:label &quot;MIDINIT&quot; .
db2views:lastname a owl:DatatypeProperty .
db2views:lastname rdfs:range xsd:string .
db2views:lastname rdfs:domain db2views:EMPLOYEE .
db2views:lastname rdfs:isDefinedBy db2views: .
db2views:lastname rdfs:label &quot;LASTNAME&quot; .
db2views:workdept a owl:DatatypeProperty .
db2views:workdept rdfs:range xsd:string .
db2views:workdept rdfs:domain db2views:EMPLOYEE .
db2views:workdept rdfs:isDefinedBy db2views: .
db2views:workdept rdfs:label &quot;WORKDEPT&quot; .
db2views:phoneno a owl:DatatypeProperty .
db2views:phoneno rdfs:range xsd:string .
db2views:phoneno rdfs:domain db2views:EMPLOYEE .
db2views:phoneno rdfs:isDefinedBy db2views: .
db2views:phoneno rdfs:label &quot;PHONENO&quot; .
db2views:hiredate a owl:DatatypeProperty .
db2views:hiredate rdfs:range xsd:date .
db2views:hiredate rdfs:domain db2views:EMPLOYEE .
db2views:hiredate rdfs:isDefinedBy db2views: .
db2views:hiredate rdfs:label &quot;HIREDATE&quot; .
db2views:job a owl:DatatypeProperty .
db2views:job rdfs:range xsd:string .
db2views:job rdfs:domain db2views:EMPLOYEE .
db2views:job rdfs:isDefinedBy db2views: .
db2views:job rdfs:label &quot;JOB&quot; .
db2views:edlevel a owl:DatatypeProperty .
db2views:edlevel rdfs:range xsd:int .
db2views:edlevel rdfs:domain db2views:EMPLOYEE .
db2views:edlevel rdfs:isDefinedBy db2views: .
db2views:edlevel rdfs:label &quot;EDLEVEL&quot; .
db2views:sex a owl:DatatypeProperty .
db2views:sex rdfs:range xsd:string .
db2views:sex rdfs:domain db2views:EMPLOYEE .
db2views:sex rdfs:isDefinedBy db2views: .
db2views:sex rdfs:label &quot;SEX&quot; .
db2views:birthdate a owl:DatatypeProperty .
db2views:birthdate rdfs:range xsd:date .
db2views:birthdate rdfs:domain db2views:EMPLOYEE .
db2views:birthdate rdfs:isDefinedBy db2views: .
db2views:birthdate rdfs:label &quot;BIRTHDATE&quot; .
db2views:salary a owl:DatatypeProperty .
db2views:salary rdfs:range xsd:numeric .
db2views:salary rdfs:domain db2views:EMPLOYEE .
db2views:salary rdfs:isDefinedBy db2views: .
db2views:salary rdfs:label &quot;SALARY&quot; .
db2views:bonus a owl:DatatypeProperty .
db2views:bonus rdfs:range xsd:numeric .
db2views:bonus rdfs:domain db2views:EMPLOYEE .
db2views:bonus rdfs:isDefinedBy db2views: .
db2views:bonus rdfs:label &quot;BONUS&quot; .
db2views:comm a owl:DatatypeProperty .
db2views:comm rdfs:range xsd:numeric .
db2views:comm rdfs:domain db2views:EMPLOYEE .
db2views:comm rdfs:isDefinedBy db2views: .
db2views:comm rdfs:label &quot;COMM&quot; .

# DB2.db2ma.EMP_ACT
db2views:EMP_ACT a rdfs:Class .
db2views:EMP_ACT rdfs:isDefinedBy db2views: .
db2views:EMP_ACT rdfs:label &quot;DB2.db2ma.EMP_ACT&quot; .
db2views:empno a owl:DatatypeProperty .
db2views:empno rdfs:range xsd:string .
db2views:empno rdfs:domain db2views:EMP_ACT .
db2views:empno rdfs:isDefinedBy db2views: .
db2views:empno rdfs:label &quot;EMPNO&quot; .
db2views:projno a owl:DatatypeProperty .
db2views:projno rdfs:range xsd:string .
db2views:projno rdfs:domain db2views:EMP_ACT .
db2views:projno rdfs:isDefinedBy db2views: .
db2views:projno rdfs:label &quot;PROJNO&quot; .
db2views:actno a owl:DatatypeProperty .
db2views:actno rdfs:range xsd:int .
db2views:actno rdfs:domain db2views:EMP_ACT .
db2views:actno rdfs:isDefinedBy db2views: .
db2views:actno rdfs:label &quot;ACTNO&quot; .
db2views:emptime a owl:DatatypeProperty .
db2views:emptime rdfs:range xsd:numeric .
db2views:emptime rdfs:domain db2views:EMP_ACT .
db2views:emptime rdfs:isDefinedBy db2views: .
db2views:emptime rdfs:label &quot;EMPTIME&quot; .
db2views:emstdate a owl:DatatypeProperty .
db2views:emstdate rdfs:range xsd:date .
db2views:emstdate rdfs:domain db2views:EMP_ACT .
db2views:emstdate rdfs:isDefinedBy db2views: .
db2views:emstdate rdfs:label &quot;EMSTDATE&quot; .
db2views:emendate a owl:DatatypeProperty .
db2views:emendate rdfs:range xsd:date .
db2views:emendate rdfs:domain db2views:EMP_ACT .
db2views:emendate rdfs:isDefinedBy db2views: .
db2views:emendate rdfs:label &quot;EMENDATE&quot; .

# DB2.db2ma.EMP_PHOTO
db2views:EMP_PHOTO a rdfs:Class .
db2views:EMP_PHOTO rdfs:isDefinedBy db2views: .
db2views:EMP_PHOTO rdfs:label &quot;DB2.db2ma.EMP_PHOTO&quot; .
db2views:empno a owl:DatatypeProperty .
db2views:empno rdfs:range xsd:string .
db2views:empno rdfs:domain db2views:EMP_PHOTO .
db2views:empno rdfs:isDefinedBy db2views: .
db2views:empno rdfs:label &quot;EMPNO&quot; .
db2views:photo_format a owl:DatatypeProperty .
db2views:photo_format rdfs:range xsd:string .
db2views:photo_format rdfs:domain db2views:EMP_PHOTO .
db2views:photo_format rdfs:isDefinedBy db2views: .
db2views:photo_format rdfs:label &quot;PHOTO_FORMAT&quot; .
db2views:picture a owl:ObjectProperty .
db2views:picture rdfs:range aowl:Content .
db2views:picture rdfs:domain db2views:EMP_PHOTO .
db2views:picture rdfs:isDefinedBy db2views: .
db2views:picture rdfs:label &quot;PICTURE&quot; .

# DB2.db2ma.EMP_RESUME
db2views:EMP_RESUME a rdfs:Class .
db2views:EMP_RESUME rdfs:isDefinedBy db2views: .
db2views:EMP_RESUME rdfs:label &quot;DB2.db2ma.EMP_RESUME&quot; .
db2views:empno a owl:DatatypeProperty .
db2views:empno rdfs:range xsd:string .
db2views:empno rdfs:domain db2views:EMP_RESUME .
db2views:empno rdfs:isDefinedBy db2views: .
db2views:empno rdfs:label &quot;EMPNO&quot; .
db2views:resume_format a owl:DatatypeProperty .
db2views:resume_format rdfs:range xsd:string .
db2views:resume_format rdfs:domain db2views:EMP_RESUME .
db2views:resume_format rdfs:isDefinedBy db2views: .
db2views:resume_format rdfs:label &quot;RESUME_FORMAT&quot; .
db2views:resume a owl:DatatypeProperty .
db2views:resume rdfs:range xsd:string .
db2views:resume rdfs:domain db2views:EMP_RESUME .
db2views:resume rdfs:isDefinedBy db2views: .
db2views:resume rdfs:label &quot;RESUME&quot; .

# DB2.db2ma.IN_TRAY
db2views:IN_TRAY a rdfs:Class .
db2views:IN_TRAY rdfs:isDefinedBy db2views: .
db2views:IN_TRAY rdfs:label &quot;DB2.db2ma.IN_TRAY&quot; .
db2views:received a owl:DatatypeProperty .
db2views:received rdfs:range xsd:dateTime .
db2views:received rdfs:domain db2views:IN_TRAY .
db2views:received rdfs:isDefinedBy db2views: .
db2views:received rdfs:label &quot;RECEIVED&quot; .
db2views:source a owl:DatatypeProperty .
db2views:source rdfs:range xsd:string .
db2views:source rdfs:domain db2views:IN_TRAY .
db2views:source rdfs:isDefinedBy db2views: .
db2views:source rdfs:label &quot;SOURCE&quot; .
db2views:subject a owl:DatatypeProperty .
db2views:subject rdfs:range xsd:string .
db2views:subject rdfs:domain db2views:IN_TRAY .
db2views:subject rdfs:isDefinedBy db2views: .
db2views:subject rdfs:label &quot;SUBJECT&quot; .
db2views:note_text a owl:DatatypeProperty .
db2views:note_text rdfs:range xsd:string .
db2views:note_text rdfs:domain db2views:IN_TRAY .
db2views:note_text rdfs:isDefinedBy db2views: .
db2views:note_text rdfs:label &quot;NOTE_TEXT&quot; .

# DB2.db2ma.ORG
db2views:ORG a rdfs:Class .
db2views:ORG rdfs:isDefinedBy db2views: .
db2views:ORG rdfs:label &quot;DB2.db2ma.ORG&quot; .
db2views:deptnumb a owl:DatatypeProperty .
db2views:deptnumb rdfs:range xsd:int .
db2views:deptnumb rdfs:domain db2views:ORG .
db2views:deptnumb rdfs:isDefinedBy db2views: .
db2views:deptnumb rdfs:label &quot;DEPTNUMB&quot; .
db2views:deptname a owl:DatatypeProperty .
db2views:deptname rdfs:range xsd:string .
db2views:deptname rdfs:domain db2views:ORG .
db2views:deptname rdfs:isDefinedBy db2views: .
db2views:deptname rdfs:label &quot;DEPTNAME&quot; .
db2views:manager a owl:DatatypeProperty .
db2views:manager rdfs:range xsd:int .
db2views:manager rdfs:domain db2views:ORG .
db2views:manager rdfs:isDefinedBy db2views: .
db2views:manager rdfs:label &quot;MANAGER&quot; .
db2views:division a owl:DatatypeProperty .
db2views:division rdfs:range xsd:string .
db2views:division rdfs:domain db2views:ORG .
db2views:division rdfs:isDefinedBy db2views: .
db2views:division rdfs:label &quot;DIVISION&quot; .
db2views:location a owl:DatatypeProperty .
db2views:location rdfs:range xsd:string .
db2views:location rdfs:domain db2views:ORG .
db2views:location rdfs:isDefinedBy db2views: .
db2views:location rdfs:label &quot;LOCATION&quot; .

# DB2.db2ma.PROJECT
db2views:PROJECT a rdfs:Class .
db2views:PROJECT rdfs:isDefinedBy db2views: .
db2views:PROJECT rdfs:label &quot;DB2.db2ma.PROJECT&quot; .
db2views:projno a owl:DatatypeProperty .
db2views:projno rdfs:range xsd:string .
db2views:projno rdfs:domain db2views:PROJECT .
db2views:projno rdfs:isDefinedBy db2views: .
db2views:projno rdfs:label &quot;PROJNO&quot; .
db2views:projname a owl:DatatypeProperty .
db2views:projname rdfs:range xsd:string .
db2views:projname rdfs:domain db2views:PROJECT .
db2views:projname rdfs:isDefinedBy db2views: .
db2views:projname rdfs:label &quot;PROJNAME&quot; .
db2views:deptno a owl:DatatypeProperty .
db2views:deptno rdfs:range xsd:string .
db2views:deptno rdfs:domain db2views:PROJECT .
db2views:deptno rdfs:isDefinedBy db2views: .
db2views:deptno rdfs:label &quot;DEPTNO&quot; .
db2views:respemp a owl:DatatypeProperty .
db2views:respemp rdfs:range xsd:string .
db2views:respemp rdfs:domain db2views:PROJECT .
db2views:respemp rdfs:isDefinedBy db2views: .
db2views:respemp rdfs:label &quot;RESPEMP&quot; .
db2views:prstaff a owl:DatatypeProperty .
db2views:prstaff rdfs:range xsd:numeric .
db2views:prstaff rdfs:domain db2views:PROJECT .
db2views:prstaff rdfs:isDefinedBy db2views: .
db2views:prstaff rdfs:label &quot;PRSTAFF&quot; .
db2views:prstdate a owl:DatatypeProperty .
db2views:prstdate rdfs:range xsd:date .
db2views:prstdate rdfs:domain db2views:PROJECT .
db2views:prstdate rdfs:isDefinedBy db2views: .
db2views:prstdate rdfs:label &quot;PRSTDATE&quot; .
db2views:prendate a owl:DatatypeProperty .
db2views:prendate rdfs:range xsd:date .
db2views:prendate rdfs:domain db2views:PROJECT .
db2views:prendate rdfs:isDefinedBy db2views: .
db2views:prendate rdfs:label &quot;PRENDATE&quot; .
db2views:majproj a owl:DatatypeProperty .
db2views:majproj rdfs:range xsd:string .
db2views:majproj rdfs:domain db2views:PROJECT .
db2views:majproj rdfs:isDefinedBy db2views: .
db2views:majproj rdfs:label &quot;MAJPROJ&quot; .

# DB2.db2ma.SALES
db2views:SALES a rdfs:Class .
db2views:SALES rdfs:isDefinedBy db2views: .
db2views:SALES rdfs:label &quot;DB2.db2ma.SALES&quot; .
db2views:sales_date a owl:DatatypeProperty .
db2views:sales_date rdfs:range xsd:date .
db2views:sales_date rdfs:domain db2views:SALES .
db2views:sales_date rdfs:isDefinedBy db2views: .
db2views:sales_date rdfs:label &quot;SALES_DATE&quot; .
db2views:sales_person a owl:DatatypeProperty .
db2views:sales_person rdfs:range xsd:string .
db2views:sales_person rdfs:domain db2views:SALES .
db2views:sales_person rdfs:isDefinedBy db2views: .
db2views:sales_person rdfs:label &quot;SALES_PERSON&quot; .
db2views:region a owl:DatatypeProperty .
db2views:region rdfs:range xsd:string .
db2views:region rdfs:domain db2views:SALES .
db2views:region rdfs:isDefinedBy db2views: .
db2views:region rdfs:label &quot;REGION&quot; .
db2views:sales a owl:DatatypeProperty .
db2views:sales rdfs:range xsd:int .
db2views:sales rdfs:domain db2views:SALES .
db2views:sales rdfs:isDefinedBy db2views: .
db2views:sales rdfs:label &quot;SALES&quot; .

# DB2.db2ma.STAFF
db2views:STAFF a rdfs:Class .
db2views:STAFF rdfs:isDefinedBy db2views: .
db2views:STAFF rdfs:label &quot;DB2.db2ma.STAFF&quot; .
db2views:id a owl:DatatypeProperty .
db2views:id rdfs:range xsd:int .
db2views:id rdfs:domain db2views:STAFF .
db2views:id rdfs:isDefinedBy db2views: .
db2views:id rdfs:label &quot;ID&quot; .
db2views:name a owl:DatatypeProperty .
db2views:name rdfs:range xsd:string .
db2views:name rdfs:domain db2views:STAFF .
db2views:name rdfs:isDefinedBy db2views: .
db2views:name rdfs:label &quot;NAME&quot; .
db2views:dept a owl:DatatypeProperty .
db2views:dept rdfs:range xsd:int .
db2views:dept rdfs:domain db2views:STAFF .
db2views:dept rdfs:isDefinedBy db2views: .
db2views:dept rdfs:label &quot;DEPT&quot; .
db2views:job a owl:DatatypeProperty .
db2views:job rdfs:range xsd:string .
db2views:job rdfs:domain db2views:STAFF .
db2views:job rdfs:isDefinedBy db2views: .
db2views:job rdfs:label &quot;JOB&quot; .
db2views:years a owl:DatatypeProperty .
db2views:years rdfs:range xsd:int .
db2views:years rdfs:domain db2views:STAFF .
db2views:years rdfs:isDefinedBy db2views: .
db2views:years rdfs:label &quot;YEARS&quot; .
db2views:salary a owl:DatatypeProperty .
db2views:salary rdfs:range xsd:numeric .
db2views:salary rdfs:domain db2views:STAFF .
db2views:salary rdfs:isDefinedBy db2views: .
db2views:salary rdfs:label &quot;SALARY&quot; .
db2views:comm a owl:DatatypeProperty .
db2views:comm rdfs:range xsd:numeric .
db2views:comm rdfs:domain db2views:STAFF .
db2views:comm rdfs:isDefinedBy db2views: .
db2views:comm rdfs:label &quot;COMM&quot; .

</programlisting><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtTipsAndTricksGuideTrblLinkedDataViews">Troubleshooting Linked Data Views generated from a Relational Database</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuide">Virtuoso Tips and Tricks Collection</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksRDFTriggers">&quot;Generate RDB2RDF triggers&quot; and &quot;Enable Data Syncs with Physical Quad Store&quot; Linked Data Views options</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideConductorR2RML">Generate Transient and/or Persistent Linked Data Views atop ODBC or JDBC accessible Relational Data Sources</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideOWLIinfLinkedVocab">Using OWL based inference to exploit the power of Linked Vocabularies</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksImportLinkedDataCreateFeature">Import Linked Data using the Briefcase &quot;Create&quot; feature</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksInstallPattern">Simple Linked Data Deployment using Virtuoso&#39;s HTTP Re-write Rules</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideReificationAltern">Reification alternatives usage for Linked Data publishing</ulink> </listitem>
<listitem><ulink url="VirtTipsAndTricksGuideLinkedDataSimpleGuide">Virtuoso Linked Data Deployment In 3 Simple Steps</ulink> </listitem>
<listitem><ulink url="VirtXMLAODBCExplorerLinkedDataViews">Expose Linked Data View URIs associated with &quot;References&quot; on a given Table</ulink> </listitem>
<listitem><ulink url="VirtLinkedDataPresCollection">Manage Linked (Open) Data</ulink></listitem>
</itemizedlist></section></docbook>