----------------------------------------------------------------------------- -- PREFS_PROPERTY_VALUE ----------------------------------------------------------------------------- CREATE TABLE PREFS_PROPERTY_VALUE ( PROPERTY_VALUE_ID INTEGER NOT NULL, NODE_ID INTEGER, PROPERTY_NAME VARCHAR (100), PROPERTY_VALUE VARCHAR (254), CREATION_DATE TIMESTAMP, MODIFIED_DATE TIMESTAMP ); ALTER TABLE PREFS_PROPERTY_VALUE ADD PRIMARY KEY (PROPERTY_VALUE_ID); ----------------------------------------------------------------------------- -- PREFS_NODE ----------------------------------------------------------------------------- CREATE TABLE PREFS_NODE ( NODE_ID INTEGER NOT NULL, PARENT_NODE_ID INTEGER, NODE_NAME VARCHAR (100), NODE_TYPE SMALLINT, FULL_PATH VARCHAR (254), CREATION_DATE TIMESTAMP, MODIFIED_DATE TIMESTAMP ); ALTER TABLE PREFS_NODE ADD PRIMARY KEY (NODE_ID); ----------------------------------------------------------------------------- -- PREFS_PROPERTY_VALUE: FOREIGN KEYS ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- PREFS_NODE: FOREIGN KEYS ----------------------------------------------------------------------------- ALTER TABLE PREFS_NODE ADD CONSTRAINT FK_PREFS_NODE_1 FOREIGN KEY (PARENT_NODE_ID) REFERENCES PREFS_NODE (NODE_ID) ;