--- a/D002-1table2columns1row/r2rmlb.ttl Tue Mar 20 15:30:30 2012 +0100
+++ b/D002-1table2columns1row/r2rmlb.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -9,7 +9,7 @@
rr:logicalTable [ rr:tableName "\"Student\""; ];
- rr:subjectMap [ rr:template "students/{\"ID\"}" rr:termType rr:BlankNode; ];
+ rr:subjectMap [ rr:template "students/{\"ID\"}"; rr:termType rr:BlankNode; ];
rr:predicateObjectMap
[
--- a/D003-1table3columns1row/directGraph.ttl Tue Mar 20 15:30:30 2012 +0100
+++ b/D003-1table3columns1row/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -1,4 +1,4 @@
_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
-_:a <Student#ID> "10"^<http://www.w3.org/2001/XMLSchema#integer> .
+_:a <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:a <Student#FirstName> "Venus" .
_:a <Student#LastName> "Williams" .
--- a/D014-3tables1primarykey1foreignkey/directGraph.ttl Tue Mar 20 15:30:30 2012 +0100
+++ b/D014-3tables1primarykey1foreignkey/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -1,7 +1,7 @@
<EMP/empno-7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <EMP> .
<EMP/empno-7369> <EMP#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> .
<EMP/empno-7369> <EMP#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<EMP/empno-7369> <EMP#ref-deptno> <DEPT/deptno-10> .
+<EMP/empno-7369> <EMP#ref-deptno> _:c .
<EMP/empno-7369> <EMP#ename> "SMITH" .
<EMP/empno-7369> <EMP#job> "CLERK" .
<EMP/empno-7369> <EMP#etype> "PART_TIME" .
--- a/D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql Tue Mar 20 15:30:30 2012 +0100
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -8,21 +8,21 @@
"BirthDate" DATE,
"EntranceDate" TIMESTAMP,
"PaidInAdvance" BOOLEAN,
-"Photo" VARBINARY(200),
+"Photo" BINARY VARYING(200),
PRIMARY KEY ("ID")
);
INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance","Photo")
VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, CAST(
'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4\ux2F\ux2F8\ux2Fw38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg\ux3D\ux3D'
-AS VARBINARY(200)));
+AS BINARY VARYING(200)));
INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance","Photo")
VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,CAST(
'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P5\ux2F\ux2F8\ux2Fw38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg\ux3D\ux3D'
-AS VARBINARY(200)));
+AS BINARY VARYING(200)));
INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance","Photo")
VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,CAST(
'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P5\ux2F\ux2F6\ux2Fw38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg\ux3D\ux3D'
-AS VARBINARY(200)));
\ No newline at end of file
+AS BINARY VARYING(200)));
\ No newline at end of file
--- a/D016-1table1primarykey10columns3rowsSQLdatatypes/directGraph.ttl Tue Mar 20 15:30:30 2012 +0100
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -8,7 +8,7 @@
<Patient/ID-10> <Patient#BirthDate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
<Patient/ID-10> <Patient#EntranceDate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<Patient/ID-10> <Patient#PaidInAdvance> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
-<Patient/ID-10> <Patient#Photo> "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
+<Patient/ID-10> <Patient#Photo> "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFVQUFBQUZDQVlBQUFDTmJ5YmxBQUFBSEVsRVFWUUkxMlA0Ly84L3czOEdJQVhESUJLRTBESHhnbGpOQkFBTzlUWEwwWTRPSHdBQUFBQkpSVTVFcmtKZ2dnPT0="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
<Patient/ID-11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Patient> .
<Patient/ID-11> <Patient#ID> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<Patient/ID-11> <Patient#FirstName> "Rachel" .
@@ -19,7 +19,7 @@
<Patient/ID-11> <Patient#BirthDate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<Patient/ID-11> <Patient#EntranceDate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<Patient/ID-11> <Patient#PaidInAdvance> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
-<Patient/ID-11> <Patient#Photo> "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P5//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
+<Patient/ID-11> <Patient#Photo> "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFVQUFBQUZDQVlBQUFDTmJ5YmxBQUFBSEVsRVFWUUkxMlA1Ly84L3czOEdJQVhESUJLRTBESHhnbGpOQkFBTzlUWEwwWTRPSHdBQUFBQkpSVTVFcmtKZ2dnPT0="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
<Patient/ID-12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Patient> .
<Patient/ID-12> <Patient#ID> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<Patient/ID-12> <Patient#FirstName> "Chandler" .
@@ -30,4 +30,4 @@
<Patient/ID-12> <Patient#BirthDate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
<Patient/ID-12> <Patient#EntranceDate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<Patient/ID-12> <Patient#PaidInAdvance> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
-<Patient/ID-12> <Patient#Photo> "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P5//6/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
\ No newline at end of file
+<Patient/ID-12> <Patient#Photo> "aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFVQUFBQUZDQVlBQUFDTmJ5YmxBQUFBSEVsRVFWUUkxMlA1Ly82L3czOEdJQVhESUJLRTBESHhnbGpOQkFBTzlUWEwwWTRPSHdBQUFBQkpSVTVFcmtKZ2dnPT0="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
\ No newline at end of file
--- a/D018-1table1primarykey2columns3rows/directGraph.ttl Tue Mar 20 15:30:30 2012 +0100
+++ b/D018-1table1primarykey2columns3rows/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -1,9 +1,9 @@
_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
_:a <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:a <Student#Name> "Venus " .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
-_:a <Student#ID> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
-_:a <Student#Name> "Fernando " .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
-_:a <Student#ID> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
-_:a <Student#Name> "David " .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+_:b <Student#ID> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:b <Student#Name> "Fernando " .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+_:c <Student#ID> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:c <Student#Name> "David " .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D021-2tables2primarykeys1foreignkeyReferencesAllNulls/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,33 @@
+CREATE TABLE "Target" (
+ "PK" INT,
+ PRIMARY KEY("PK"),
+ "key1attr1" CHAR(5),
+ "key1attr2" CHAR(5),
+ UNIQUE ("key1attr1", "key1attr2"),
+ "key2attr1" CHAR(5),
+ "key2attr2" CHAR(5),
+ UNIQUE ("key2attr2", "key2attr1")
+);
+
+CREATE TABLE "Source" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "attrA" CHAR(5),
+ "attrB" CHAR(5),
+ FOREIGN KEY ("attrA", "attrB") REFERENCES "Target"("key2attr2", "key2attr1")
+);
+
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1010, 'K1A11' , 'K1A21' , 'K2A11' , 'K2A21' );
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1011, 'K1A12' , 'K1A22' , NULL , 'K2A22' );
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1012, 'K1A13' , 'K1A23' , NULL , NULL );
+
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1100, 'K2A21', 'K2A11');
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1101, 'K2A22', NULL );
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1102, NULL , NULL );
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D021-2tables2primarykeys1foreignkeyReferencesAllNulls/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,35 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<Target/PK-1010> a <Target> .
+<Target/PK-1010> <Target#PK> 1010 .
+<Target/PK-1010> <Target#key1attr1> "K1A11" .
+<Target/PK-1010> <Target#key1attr2> "K1A21" .
+<Target/PK-1010> <Target#key2attr1> "K2A11" .
+<Target/PK-1010> <Target#key2attr2> "K2A21" .
+
+<Target/PK-1011> a <Target> .
+<Target/PK-1011> <Target#PK> 1011 .
+<Target/PK-1011> <Target#key1attr1> "K1A12" .
+<Target/PK-1011> <Target#key1attr2> "K1A22" .
+<Target/PK-1011> <Target#key2attr2> "K2A22" .
+
+<Target/PK-1012> a <Target> .
+<Target/PK-1012> <Target#PK> 1012 .
+<Target/PK-1012> <Target#key1attr1> "K1A13" .
+<Target/PK-1012> <Target#key1attr2> "K1A23" .
+
+<Source/ID-1100> a <Source> .
+<Source/ID-1100> <Source#ID> 1100 .
+<Source/ID-1100> <Source#attrA> "K2A21" .
+<Source/ID-1100> <Source#attrB> "K2A11" .
+<Source/ID-1100> <Source#ref-attrA.attrB> <Target/PK-1010> .
+
+<Source/ID-1101> a <Source> .
+<Source/ID-1101> <Source#ID> 1101 .
+<Source/ID-1101> <Source#attrA> "K2A22" .
+<Source/ID-1101> <Source#ref-attrA.attrB> <Target/PK-1011> .
+
+<Source/ID-1102> a <Source> .
+<Source/ID-1102> <Source#ID> 1102 .
+<Source/ID-1102> <Source#ref-attrA.attrB> <Target/PK-1012> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D021-2tables2primarykeys1foreignkeyReferencesAllNulls/manifest.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,22 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .
+
+<d021> a rdb2rdftest:DataBase;
+ dcterms:title "Two tables, two primary keys, a foreign key, references all nulls" ;
+ dcterms:identifier "D021-2tables2primarykeys1foreignkeyReferencesAllNulls" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0021> ;
+.
+
+<dg0021> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Generation of triples for two tables, two primary keys, a foreign key, references all nulls";
+ dcterms:identifier "DirectGraphTC0021" ;
+ test:purpose "Generation of triples two tables, two primary keys, a foreign key, references all nulls" ;
+ test:specificationReference "#lead-ex" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d021> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D022-2tables1primarykey1foreignkeyReferencesNoPrimaryKey/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,24 @@
+CREATE TABLE "Target" (
+ "litattr1" INT,
+ -- PRIMARY KEY("PK"),
+ "key1attr1" CHAR(4),
+ "key1attr2" CHAR(4),
+ UNIQUE ("key1attr1", "key1attr2"),
+ "key2attr1" CHAR(4),
+ "key2attr2" CHAR(4),
+ UNIQUE ("key2attr2", "key2attr1")
+);
+
+CREATE TABLE "Source" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "attrA" CHAR(4),
+ "attrB" CHAR(4),
+ FOREIGN KEY ("attrA", "attrB") REFERENCES "Target"("key2attr2", "key2attr1")
+);
+
+INSERT INTO "Target" ("litattr1", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1010 , 'K1A1' , 'K1A2' , 'K2A1' , 'K2A2');
+
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1100, 'K2A2' , 'K2A1' );
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D022-2tables1primarykey1foreignkeyReferencesNoPrimaryKey/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,15 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+_:a a <Target> .
+_:a <Target#litattr1> 1010 .
+_:a <Target#key1attr1> "K1A1" .
+_:a <Target#key1attr2> "K1A2" .
+_:a <Target#key2attr1> "K2A1" .
+_:a <Target#key2attr2> "K2A2" .
+
+<Source/ID-1100> a <Source> .
+<Source/ID-1100> <Source#ID> 1100 .
+<Source/ID-1100> <Source#attrA> "K2A2" .
+<Source/ID-1100> <Source#attrB> "K2A1" .
+<Source/ID-1100> <Source#ref-attrA.attrB> _:a .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D022-2tables1primarykey1foreignkeyReferencesNoPrimaryKey/manifest.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,23 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .
+
+<d022> a rdb2rdftest:DataBase;
+ dcterms:title "Two tables, a primary key, a foreign key, references no primary keys" ;
+ dcterms:identifier "D022-2tables1primarykey1foreignkeyReferencesNoPrimaryKey" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0022> ;
+.
+
+<dg0022> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Generation of triples from two tables, a primary key, a foreign key, references no primary keys";
+ dcterms:identifier "DirectGraphTC0022" ;
+ test:purpose "Generation of triples from two tables, a primary key, a foreign key, references no primary keys" ;
+ test:specificationReference "#lead-ex" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d022> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.ttl" ;
+.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D023-2tables2primarykeys2foreignkeysReferencesToNon-primarykeys/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,24 @@
+CREATE TABLE "Target" (
+ "PK" INT,
+ PRIMARY KEY("PK"),
+ "key1attr1" CHAR(4),
+ "key1attr2" CHAR(4),
+ UNIQUE ("key1attr1", "key1attr2"),
+ "key2attr1" CHAR(4),
+ "key2attr2" CHAR(4),
+ UNIQUE ("key2attr2", "key2attr1")
+);
+
+CREATE TABLE "Source" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "attrA" CHAR(4),
+ "attrB" CHAR(4),
+ FOREIGN KEY ("attrA", "attrB") REFERENCES "Target"("key2attr2", "key2attr1")
+);
+
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1010, 'K1A1' , 'K1A2' , 'K2A1' , 'K2A2' );
+
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1100, 'K2A2' , 'K2A1' );
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D023-2tables2primarykeys2foreignkeysReferencesToNon-primarykeys/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,15 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<Target/PK-1010> a <Target> .
+<Target/PK-1010> <Target#PK> 1010 .
+<Target/PK-1010> <Target#key1attr1> "K1A1" .
+<Target/PK-1010> <Target#key1attr2> "K1A2" .
+<Target/PK-1010> <Target#key2attr1> "K2A1" .
+<Target/PK-1010> <Target#key2attr2> "K2A2" .
+
+<Source/ID-1100> a <Source> .
+<Source/ID-1100> <Source#ID> 1100 .
+<Source/ID-1100> <Source#attrA> "K2A2" .
+<Source/ID-1100> <Source#attrB> "K2A1" .
+<Source/ID-1100> <Source#ref-attrA.attrB> <Target/PK-1010> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D023-2tables2primarykeys2foreignkeysReferencesToNon-primarykeys/manifest.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,22 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .
+
+<d023> a rdb2rdftest:DataBase;
+ dcterms:title "Two tables, two primary keys, two foreign keys, references to a key other than primary key" ;
+ dcterms:identifier "D023-2tables2primarykeys2foreignkeysReferencesToNon-primarykeys" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0023> ;
+.
+
+<dg0023> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Generation of triples for two tables, two primary keys, two foreign keys, references to a key other than primary key";
+ dcterms:identifier "DirectGraphTC0023" ;
+ test:purpose "Generation of triples from two tables, two primary keys, two foreign keys, references to a key other than primary key" ;
+ test:specificationReference "#lead-ex" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d023> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D024-2tables2primarykeys1foreignkeyToARowWithSomeNulls/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,29 @@
+CREATE TABLE "Target" (
+ "PK" INT,
+ PRIMARY KEY("PK"),
+ "key1attr1" CHAR(5),
+ "key1attr2" CHAR(5),
+ UNIQUE ("key1attr1", "key1attr2"),
+ "key2attr1" CHAR(5),
+ "key2attr2" CHAR(5),
+ UNIQUE ("key2attr2", "key2attr1")
+);
+
+CREATE TABLE "Source" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "attrA" CHAR(5),
+ "attrB" CHAR(5),
+ FOREIGN KEY ("attrA", "attrB") REFERENCES "Target"("key2attr2", "key2attr1")
+);
+
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1010, 'K1A11' , 'K1A21' , 'K2A11' , 'K2A21' );
+INSERT INTO "Target" ("PK", "key1attr1", "key1attr2", "key2attr1", "key2attr2")
+ VALUES (1011, 'K1A12' , 'K1A22' , NULL , 'K2A22' );
+
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1100, 'K2A21', 'K2A11');
+INSERT INTO "Source" ("ID", "attrA", "attrB")
+ VALUES (1101, 'K2A22', NULL );
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D024-2tables2primarykeys1foreignkeyToARowWithSomeNulls/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,26 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<Target/PK-1010> a <Target> .
+<Target/PK-1010> <Target#PK> 1010 .
+<Target/PK-1010> <Target#key1attr1> "K1A11" .
+<Target/PK-1010> <Target#key1attr2> "K1A21" .
+<Target/PK-1010> <Target#key2attr1> "K2A11" .
+<Target/PK-1010> <Target#key2attr2> "K2A21" .
+
+<Target/PK-1011> a <Target> .
+<Target/PK-1011> <Target#PK> 1011 .
+<Target/PK-1011> <Target#key1attr1> "K1A12" .
+<Target/PK-1011> <Target#key1attr2> "K1A22" .
+<Target/PK-1011> <Target#key2attr2> "K2A22" .
+
+<Source/ID-1100> a <Source> .
+<Source/ID-1100> <Source#ID> 1100 .
+<Source/ID-1100> <Source#attrA> "K2A21" .
+<Source/ID-1100> <Source#attrB> "K2A11" .
+<Source/ID-1100> <Source#ref-attrA.attrB> <Target/PK-1010> .
+
+<Source/ID-1101> a <Source> .
+<Source/ID-1101> <Source#ID> 1101 .
+<Source/ID-1101> <Source#attrA> "K2A22" .
+<Source/ID-1101> <Source#ref-attrA.attrB> <Target/PK-1011> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D024-2tables2primarykeys1foreignkeyToARowWithSomeNulls/manifest.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,22 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .
+
+<d024> a rdb2rdftest:DataBase;
+ dcterms:title "Two tables, two primary keys, a foreign key to a row with some NULLs in the key." ;
+ dcterms:identifier "D024-2tables2primarykeys1foreignkeyToARowWithSomeNulls" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0024> ;
+.
+
+<dg0024> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Generation of triples from two tables, two primary keys, a foreign key to a row with some NULLs in the key.";
+ dcterms:identifier "DirectGraphTC0024" ;
+ test:purpose "Generation of triples from two tables, two primary keys, a foreign key to a row with some NULLs in the key." ;
+ test:specificationReference "#lead-ex" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d024> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D025-3tables3primarykeys3foreignkeys/create.sql Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,28 @@
+CREATE TABLE "Addresses" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "city" VARCHAR(10),
+ "state" CHAR(2)
+);
+
+CREATE TABLE "Department" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "name" VARCHAR(50),
+ "city" VARCHAR(50),
+ UNIQUE ("name", "city"),
+ "manager" INT
+);
+
+CREATE TABLE "People" (
+ "ID" INT,
+ PRIMARY KEY("ID"),
+ "fname" VARCHAR(10),
+ "addr" INT,
+ FOREIGN KEY ("addr") REFERENCES "Addresses"("ID"),
+ "deptName" VARCHAR(50),
+ "deptCity" VARCHAR(50)
+);
+
+ALTER TABLE "Department" ADD FOREIGN KEY("manager") REFERENCES "People"("ID");
+ALTER TABLE "People" ADD FOREIGN KEY("deptName", "deptCity") REFERENCES "Department"("name", "city");
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D025-3tables3primarykeys3foreignkeys/directGraph.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,50 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<People/ID-7> a <People> .
+<People/ID-7> <People#ID> 7 .
+<People/ID-7> <People#fname> "Bob" .
+<People/ID-7> <People#addr> 18 .
+<People/ID-7> <People#ref-addr> <Addresses/ID-18> .
+<People/ID-7> <People#deptName> "accounting" .
+<People/ID-7> <People#deptCity> "Cambridge" .
+<People/ID-7> <People#ref-deptName.deptCity> <Department/ID-23> .
+<People/ID-8> a <People> .
+<People/ID-8> <People#ID> 8 .
+<People/ID-8> <People#fname> "Sue" .
+
+<Addresses/ID-18> a <Addresses> .
+<Addresses/ID-18> <Addresses#ID> 18 .
+<Addresses/ID-18> <Addresses#city> "Cambridge" .
+<Addresses/ID-18> <Addresses#state> "MA" .
+
+<Department/ID-23> a <Department> .
+<Department/ID-23> <Department#ID> 23 .
+<Department/ID-23> <Department#name> "accounting" .
+<Department/ID-23> <Department#city> "Cambridge" .
+<Department/ID-23> <Department#manager> 8; .
+<Department/ID-23> <Department#ref-manager> <People/ID-8> .
+
+_:c a <Projects> .
+_:c <Projects#lead> 8 .
+_:c <Projects#ref-lead> <People/ID-8> .
+_:c <Projects#name> "pencil survey" .
+_:c <Projects#deptName> "accounting" .
+_:c <Projects#deptCity> "Cambridge" .
+_:c <Projects#ref-deptName.deptCity> <Department/ID-23> .
+
+_:d a <Projects> .
+_:d <Projects#lead> 8 .
+_:d <Projects#ref-lead> <People/ID-8> .
+_:d <Projects#name> "eraser survey" .
+_:d <Projects#deptName> "accounting" .
+_:d <Projects#deptCity> "Cambridge" .
+_:d <Projects#ref-deptName.deptCity> <Department/ID-23> .
+
+<TaskAssignments/worker-7.project-pencil%20survey> a <TaskAssignments> .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#worker> 7 .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#ref-worker> <People/ID-7> .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#project> "pencil survey" .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#deptName> "accounting" .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#deptCity> "Cambridge" .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#ref-deptName.deptCity> <Department/ID-23> .
+<TaskAssignments/worker-7.project-pencil%20survey> <TaskAssignments#ref-project.deptName.deptCity> _:c .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D025-3tables3primarykeys3foreignkeys/manifest.ttl Thu Mar 22 13:30:20 2012 +0100
@@ -0,0 +1,22 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://www.w3.org/2001/sw/rdb2rdf/test-cases/#> .
+
+<d025> a rdb2rdftest:DataBase;
+ dcterms:title "Three tables, three primary keys, three foreign keys" ;
+ dcterms:identifier "D025-3tables3primarykeys3foreignkeys" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0025>;
+.
+
+<dg0025> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Generation of triples from three tables, three primary keys, three foreign keys";
+ dcterms:identifier "DirectGraphTC0025" ;
+ test:purpose "Generation of triples from three tables, three primary keys, three foreign keys" ;
+ test:specificationReference "#lead-ex" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d025> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.ttl" ;
+.
Binary file ts1.zip has changed