
-----------------------------------------------------------------------------
-- OJB_HL_SEQ
-----------------------------------------------------------------------------

CREATE TABLE OJB_HL_SEQ
(
                TABLENAME VARCHAR (175) NOT NULL,
                FIELDNAME VARCHAR (70) NOT NULL,
                    MAX_KEY INTEGER,
                    GRAB_SIZE INTEGER,
                    VERSION INTEGER
);

ALTER TABLE OJB_HL_SEQ
    ADD PRIMARY KEY (TABLENAME,FIELDNAME);







-----------------------------------------------------------------------------
-- OJB_LOCKENTRY
-----------------------------------------------------------------------------

CREATE TABLE OJB_LOCKENTRY
(
                OID_ VARCHAR (250) NOT NULL,
                TX_ID VARCHAR (50) NOT NULL,
                TIMESTAMP_ TIMESTAMP,
                    ISOLATIONLEVEL INTEGER,
                    LOCKTYPE INTEGER
);

ALTER TABLE OJB_LOCKENTRY
    ADD PRIMARY KEY (OID_,TX_ID);







-----------------------------------------------------------------------------
-- OJB_NRM
-----------------------------------------------------------------------------

CREATE TABLE OJB_NRM
(
                NAME VARCHAR (250) NOT NULL,
                OID_ LONG VARCHAR FOR BIT DATA
);

ALTER TABLE OJB_NRM
    ADD PRIMARY KEY (NAME);







-----------------------------------------------------------------------------
-- OJB_DLIST
-----------------------------------------------------------------------------

CREATE TABLE OJB_DLIST
(
                    ID INTEGER NOT NULL,
                    SIZE_ INTEGER
);

ALTER TABLE OJB_DLIST
    ADD PRIMARY KEY (ID);







-----------------------------------------------------------------------------
-- OJB_DLIST_ENTRIES
-----------------------------------------------------------------------------

CREATE TABLE OJB_DLIST_ENTRIES
(
                    ID INTEGER NOT NULL,
                    DLIST_ID INTEGER,
                    POSITION_ INTEGER,
                OID_ LONG VARCHAR FOR BIT DATA
);

ALTER TABLE OJB_DLIST_ENTRIES
    ADD PRIMARY KEY (ID);







-----------------------------------------------------------------------------
-- OJB_DSET
-----------------------------------------------------------------------------

CREATE TABLE OJB_DSET
(
                    ID INTEGER NOT NULL,
                    SIZE_ INTEGER
);

ALTER TABLE OJB_DSET
    ADD PRIMARY KEY (ID);







-----------------------------------------------------------------------------
-- OJB_DSET_ENTRIES
-----------------------------------------------------------------------------

CREATE TABLE OJB_DSET_ENTRIES
(
                    ID INTEGER NOT NULL,
                    DLIST_ID INTEGER,
                    POSITION_ INTEGER,
                OID_ LONG VARCHAR FOR BIT DATA
);

ALTER TABLE OJB_DSET_ENTRIES
    ADD PRIMARY KEY (ID);







-----------------------------------------------------------------------------
-- OJB_DMAP
-----------------------------------------------------------------------------

CREATE TABLE OJB_DMAP
(
                    ID INTEGER NOT NULL,
                    SIZE_ INTEGER
);

ALTER TABLE OJB_DMAP
    ADD PRIMARY KEY (ID);







-----------------------------------------------------------------------------
-- OJB_HL_SEQ: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_LOCKENTRY: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_NRM: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_DLIST: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_DLIST_ENTRIES: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_DSET: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_DSET_ENTRIES: FOREIGN KEYS
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
-- OJB_DMAP: FOREIGN KEYS
-----------------------------------------------------------------------------

