[Swift-commit] r3334 - provenancedb

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon May 24 16:28:39 CDT 2010


Author: lgadelha
Date: 2010-05-24 16:28:38 -0500 (Mon, 24 May 2010)
New Revision: 3334

Modified:
   provenancedb/prov-init.sql
Log:
Creation of annotation table.


Modified: provenancedb/prov-init.sql
===================================================================
--- provenancedb/prov-init.sql	2010-05-21 20:15:34 UTC (rev 3333)
+++ provenancedb/prov-init.sql	2010-05-24 21:28:38 UTC (rev 3334)
@@ -16,7 +16,8 @@
 DROP TABLE extrainfo;
 DROP TABLE createarray;
 DROP TABLE createarray_member;
-DROP TABLE arrayrange;
+DROP TABLE array_range;
+DROP TABLE annotations;
 
 
 -- associates each process with its containing workflow
@@ -24,14 +25,14 @@
 -- in which case this looks very much like a compound/app
 -- containment?
 CREATE TABLE processes_in_workflows
-    (workflow_id char(128),
-     process_id char(128)
+    (workflow_id char(256),
+     process_id char(256)
     );
 
 -- processes gives information about each process (in the OPM sense)
 -- it is augmented by information in other tables
 CREATE TABLE processes
-    (id char(128) PRIMARY KEY, -- a uri
+    (id char(256) PRIMARY KEY, -- a uri
      type char(16) -- specifies the type of process. for any type, it
                    -- must be the case that the specific type table
                    -- has an entry for this process.
@@ -43,12 +44,12 @@
 -- each execute is identified by a unique URI. other information from
 -- swift logs is also stored here. an execute is an OPM process.
 CREATE TABLE executes
-    (id char(128) PRIMARY KEY, -- actually foreign key to processes
+    (id char(256) PRIMARY KEY, -- actually foreign key to processes
      starttime numeric,
      duration numeric,
-     finalstate char(128),
-     app char(128),
-     scratch char(128)
+     finalstate char(256),
+     app char(256),
+     scratch char(256)
     );
 
 -- this gives information about each execute2, which is an attempt to
@@ -56,12 +57,12 @@
 -- information such as wrapper logs
 
 CREATE TABLE execute2s
-    (id char(128) PRIMARY KEY,
-     execute_id, -- secondary key to executes and processes tables
+    (id char(256) PRIMARY KEY,
+     execute_id char(256), -- secondary key to executes and processes tables
      starttime numeric,
      duration numeric,
-     finalstate char(128),
-     site char(128)
+     finalstate char(256),
+     site char(256)
     );
 
 -- dataset_usage records usage relationships between processes and datasets;
@@ -73,11 +74,11 @@
 -- dataset_id for common queries? maybe add arbitrary ID for sake of it?
 
 CREATE TABLE dataset_usage
-    (process_id char(128), -- foreign key but not enforced because maybe process
+    (process_id char(256), -- foreign key but not enforced because maybe process
                            -- doesn't exist at time. same type as processes.id
      direction char(1), -- I or O for input or output
-     dataset_id char(128), -- this will perhaps key against dataset table
-     param_name char(128) -- the name of the parameter in this execute that
+     dataset_id char(256), -- this will perhaps key against dataset table
+     param_name char(256) -- the name of the parameter in this execute that
                           -- this dataset was bound to. sometimes this must
                           -- be contrived (for example, in positional varargs)
     );
@@ -91,8 +92,8 @@
 
 -- TODO primary key should be execute_id
 CREATE TABLE invocation_procedure_names
-    (execute_id char(128),
-     procedure_name char(128)
+    (execute_id char(256),
+     procedure_name char(256)
     );
 
 
@@ -106,8 +107,8 @@
 -- a containment hierarchy. The relationship (such as array index or
 -- structure member name) should also be stored in this table.
 CREATE TABLE dataset_containment
-    ( outer_dataset_id char(128),
-      inner_dataset_id char(128)
+    ( outer_dataset_id char(256),
+      inner_dataset_id char(256)
     );
 
 
@@ -117,8 +118,8 @@
 
 -- TODO dataset_id should be primary key
 CREATE TABLE dataset_filenames
-    ( dataset_id char(128),
-      filename char(128)
+    ( dataset_id char(256),
+      filename char(256)
     );
 
 -- dataset_values stores the value for each dataset which is known to have
@@ -127,8 +128,8 @@
 -- example) SQL numerical operations should not be expected to work, even
 -- though the user knows that a particular dataset stores a numeric value.
 CREATE TABLE dataset_values
-    ( dataset_id char(128), -- should be primary key
-      value char(128)
+    ( dataset_id char(256), -- should be primary key
+      value char(256)
     );
 
 -- The above dataset_* tables are the original containment representation
@@ -138,21 +139,21 @@
 -- It is unclear which is the better representation.
 
 CREATE TABLE createarray
-    ( array_id char(128)
+    ( array_id char(256)
     );
 
 CREATE TABLE createarray_member
-    ( array_id char(128),
-      ix char(128),
-      member_id char(128)
+    ( array_id char(256),
+      ix char(256),
+      member_id char(256)
     );
 
 -- TODO step
 CREATE TABLE array_range
-    ( array_id char(128),
-      from_id char(128),
-      to_id char(128),
-      step_id char(128) -- nullable, if step is unspecified
+    ( array_id char(256),
+      from_id char(256),
+      to_id char(256),
+      step_id char(256) -- nullable, if step is unspecified
     );
 
 -- known_workflows stores some information about each workflow log that has
@@ -160,27 +161,33 @@
 -- status.
 CREATE TABLE known_workflows
     (
-      workflow_id char(128),
-      workflow_log_filename char(128),
-      version char(128),
-      importstatus char(128)
+      workflow_id char(256),
+      workflow_log_filename char(256),
+      version char(256),
+      importstatus char(256)
     );
 
 
 -- workflow_events stores the start time and duration for each workflow
 -- that has been successfully imported.
 CREATE TABLE workflow_events
-    ( workflow_id char(128),
+    ( workflow_id char(256),
       starttime numeric,
       duration numeric
     );
 
 -- extrainfo stores lines generated by the SWIFT_EXTRA_INFO feature
 CREATE TABLE extrainfo
-    ( execute2id char(128),
+    ( execute2id char(256),
       extrainfo char(1024)
     );
 
+-- annotations
+CREATE TABLE annotations
+   ( id char(256), -- either dataset_id, process_id, or workflow_id
+     name char(256),
+     value char(256)
+   );
 
 -- this GRANT does not work for sqlite; you'll get a syntax error but
 -- ignore it, as it is not needed in sqlite




More information about the Swift-commit mailing list