~ s/STRING/VARCHAR(n)/
authorEric Prud'hommeaux <eric@w3.org>
Wed, 03 Nov 2010 14:17:38 -0400
changeset 261 24baacc5309b
parent 260 cf60d13d95da
child 262 3a640e0721af
~ s/STRING/VARCHAR(n)/
sparql2sqlendpoint/src/main/resources/default-config.json
--- a/sparql2sqlendpoint/src/main/resources/default-config.json	Wed Nov 03 14:04:23 2010 -0400
+++ b/sparql2sqlendpoint/src/main/resources/default-config.json	Wed Nov 03 14:17:38 2010 -0400
@@ -23,24 +23,24 @@
   // the ddl used for the direct mapping (default one)
   "default": {
     "ddl": "
-CREATE TABLE Addresses (ID INT PRIMARY KEY, city STRING, state STRING);
-CREATE TABLE Department (ID INT PRIMARY KEY, name STRING, city STRING, manager INT,
+CREATE TABLE Addresses (ID INT PRIMARY KEY, city VARCHAR(20), state CHAR(2));
+CREATE TABLE Department (ID INT PRIMARY KEY, name VARCHAR(20), city VARCHAR(20), manager INT,
                          FOREIGN KEY (manager) REFERENCES People(ID),
                          UNIQUE (name, city));
-CREATE TABLE People (ID INT PRIMARY KEY, fname STRING, addr INT,
+CREATE TABLE People (ID INT PRIMARY KEY, fname VARCHAR(20), addr INT,
                      FOREIGN KEY (addr) REFERENCES Addresses(ID),
-                     deptName STRING, deptCity STRING,
+                     deptName VARCHAR(20), deptCity VARCHAR(20),
                      FOREIGN KEY (deptName, deptCity) REFERENCES Department(name, city));
 CREATE TABLE Projects (lead INT,
                        FOREIGN KEY (lead) REFERENCES People(ID),
-                       name STRING, UNIQUE (lead, name), 
-                       deptName STRING, deptCity STRING,
+                       name VARCHAR(20), UNIQUE (lead, name), 
+                       deptName VARCHAR(20), deptCity VARCHAR(20),
                        UNIQUE (name, deptName, deptCity),
                        FOREIGN KEY (deptName, deptCity) REFERENCES Department(name, city));
 CREATE TABLE TaskAssignments (worker INT,
                               FOREIGN KEY (worker) REFERENCES People(ID),
-                              project STRING, PRIMARY KEY (worker, project), 
-                              deptName STRING, deptCity STRING,
+                              project VARCHAR(20), PRIMARY KEY (worker, project), 
+                              deptName VARCHAR(20), deptCity VARCHAR(20),
                               FOREIGN KEY (worker) REFERENCES People(ID),
                               FOREIGN KEY (project, deptName, deptCity) REFERENCES Projects(name, deptName, deptCity),
                               FOREIGN KEY (deptName, deptCity) REFERENCES Department(name, city));