Replace binary column for varbinary(200) following Richard suggestion
authorBoris Villazon-Terrazas <bvillazon@fi.upm.es>
Tue, 17 Apr 2012 17:31:13 +0200
changeset 85 8b381d48f912
parent 84 1105058eb3c9
child 86 c2588a3b2836
Replace binary column for varbinary(200) following Richard suggestion
D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql
D016-1table1primarykey10columns3rowsSQLdatatypes/mappedb.nq
ts1.zip
--- a/D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql	Wed Apr 11 15:38:08 2012 +0200
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql	Tue Apr 17 17:31:13 2012 +0200
@@ -8,21 +8,18 @@
 "BirthDate" DATE,
 "EntranceDate" TIMESTAMP,
 "PaidInAdvance" BOOLEAN,
-"Photo" BINARY VARYING(200),
+"Photo" VARBINARY(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 BINARY VARYING(200)));
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
 
 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 BINARY VARYING(200)));
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
 
 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 BINARY VARYING(200)));
\ No newline at end of file
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
\ No newline at end of file
--- a/D016-1table1primarykey10columns3rowsSQLdatatypes/mappedb.nq	Wed Apr 11 15:38:08 2012 +0200
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappedb.nq	Tue Apr 17 17:31:13 2012 +0200
@@ -2,9 +2,9 @@
 <http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
 <http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
 <http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/Patient11> <http://example.com/weight> "70.22E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
 <http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
 <http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/Patient12> <http://example.com/weight> "90.31E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
 <http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
 
Binary file ts1.zip has changed