CREATE TABLE DOCUMENTGROUP
(
  DOCUMENTGROUPID INTEGER NOT NULL AUTO_INCREMENT,
  USERID      VARCHAR(60),
  NAME		VARCHAR(80),
  DESCRIPTION  VARCHAR(250),
CONSTRAINT DOCGROUPPRIMARYKEY1 PRIMARY KEY (DOCUMENTGROUPID)
);

CREATE INDEX DOCUMENTGROUPUSERID ON DOCUMENTGROUP (USERID);

CREATE TABLE DOCUMENTGROUPDOCUMENT
(
  DOCUMENTGROUPID INTEGER NOT NULL,
  DOCUMENTID      INTEGER NOT NULL,
CONSTRAINT DOCGROUPPRIMARYKEY1 PRIMARY KEY (DOCUMENTGROUPID, DOCUMENTID)
);

CREATE INDEX DOCUMENTGROUPDOC ON DOCUMENTGROUPDOCUMENT (DOCUMENTID);
