Database design proposal
authorJiří Sitera <sitera@civ.zcu.cz>
Wed, 31 Aug 2005 15:49:46 +0000 (15:49 +0000)
committerJiří Sitera <sitera@civ.zcu.cz>
Wed, 31 Aug 2005 15:49:46 +0000 (15:49 +0000)
org.glite.jp.index/config/glite-jp-index-dbsetup.sql [new file with mode: 0644]

diff --git a/org.glite.jp.index/config/glite-jp-index-dbsetup.sql b/org.glite.jp.index/config/glite-jp-index-dbsetup.sql
new file mode 100644 (file)
index 0000000..fd8ff72
--- /dev/null
@@ -0,0 +1,64 @@
+create table jobs (
+        jobid          char(32)        binary not null,
+        dg_jobid        varchar(255)    binary not null,
+        ownerid         char(32)        binary not null,
+        aclid           char(32)        binary null,
+
+        primary key (jobid),
+        unique (dg_jobid),
+        index (jobid),
+       index (dg_jobid)
+);
+
+create table attrs (
+               attrid          char(32)        binary not null,
+        name           varchar(255)    binary not null,
+       indexed         int             not null,
+       type            char(32)        binary null,
+
+        primary key (attrid),
+        index (attrid),
+       index (name)
+);
+
+create table feeds (
+        feedid         char(32)        binary not null,
+       state           int             not null,
+       source          varchar(255)    not null,
+       attrs           mediumblob      null,
+       condition       mediumblob      null,
+
+        primary key (feedid),
+        index (feedid),
+       index (state)
+);
+
+create table acls (
+        aclid           char(32)        binary not null,
+        value           mediumblob      not null,
+        refcnt          int             not null,
+
+        primary key (aclid)
+);
+
+create table users (
+        userid          char(32)        binary not null,
+        cert_subj       varchar(255)    binary not null,
+
+        primary key (userid),
+        unique (cert_subj)
+);
+
+
+# data tables - created one for each configured attribute, index on
+# value is created only for attributes configured to be indexed
+#
+#create table attr_<attrid> (
+#        jobid         char(32)        binary not null,
+#        value         varchar(255)    binary not null,
+#       full_value     mediumblob      not null,
+#
+#        index (jobid),
+#        index (value)
+#);
+