From f735966d2872db4f8558faec4560ca9dc12847fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Sitera?= Date: Wed, 31 Aug 2005 15:49:46 +0000 Subject: [PATCH] Database design proposal --- .../config/glite-jp-index-dbsetup.sql | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 org.glite.jp.index/config/glite-jp-index-dbsetup.sql 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 index 0000000..fd8ff72 --- /dev/null +++ b/org.glite.jp.index/config/glite-jp-index-dbsetup.sql @@ -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_ ( +# jobid char(32) binary not null, +# value varchar(255) binary not null, +# full_value mediumblob not null, +# +# index (jobid), +# index (value) +#); + -- 1.8.2.3