-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
106 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
CREATE TABLE LIB_FEAT (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, VERSION NUMBER(5) NOT NULL, FEAT_HASH VARCHAR2(40) NOT NULL, FEAT_DESC VARCHAR2(150), FELEM_VALUES CLOB NOT NULL, ANONYMIZED CHAR(1) NOT NULL) ; | ||
ALTER TABLE LIB_FEAT ADD CONSTRAINT LIB_FEAT_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX; | ||
CREATE UNIQUE INDEX LIB_FEAT_SK ON LIB_FEAT(FEAT_HASH, FTYPE_ID, ANONYMIZED) ; | ||
CREATE TABLE SYS_HW_CHECK (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, VERSION NUMBER(5) NOT NULL, FEAT_HASH VARCHAR2(40) NOT NULL, FEAT_DESC VARCHAR2(150), FELEM_VALUES CLOB NOT NULL, ANONYMIZED CHAR(1) NOT NULL) ; | ||
ALTER TABLE SYS_HW_CHECK ADD CONSTRAINT SYS_HW_CHECK_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX; | ||
CREATE UNIQUE INDEX SYS_HW_CHECK_SK ON SYS_HW_CHECK(FEAT_HASH, FTYPE_ID, ANONYMIZED) ; | ||
CREATE TABLE DSRC_RECORD (CONFIG_ID NUMBER, FIRST_SEEN_DT DATE, LAST_SEEN_DT DATE, RECORD_ID VARCHAR2(250) NOT NULL, ENT_SRC_KEY VARCHAR2(40) NOT NULL, DSRC_ID NUMBER(5) NOT NULL, JSON_DATA CLOB) ; | ||
ALTER TABLE DSRC_RECORD ADD CONSTRAINT DSRC_RECORD_PK PRIMARY KEY(RECORD_ID, DSRC_ID) USING INDEX; | ||
CREATE INDEX DSRC_RECORD_SK ON DSRC_RECORD(ENT_SRC_KEY, DSRC_ID) ; | ||
CREATE TABLE OBS_ENT (OBS_ENT_ID NUMBER NOT NULL, LOCKING_ID NUMBER NOT NULL, LAST_TOUCH_DT NUMBER, DSRC_ID NUMBER(5) NOT NULL, LOCK_DSRC_ACTION CHAR(1), ENT_SRC_KEY VARCHAR2(40) NOT NULL, FEATURES CLOB) ; | ||
ALTER TABLE OBS_ENT ADD CONSTRAINT OBS_ENT_PK PRIMARY KEY(OBS_ENT_ID) USING INDEX; | ||
CREATE UNIQUE INDEX OBS_ENT_SK ON OBS_ENT(ENT_SRC_KEY, DSRC_ID) ; | ||
CREATE TABLE RES_ENT (RES_ENT_ID NUMBER NOT NULL, LOCKING_ID NUMBER NOT NULL, LAST_TOUCH_DT NUMBER, ENT_STATE NUMBER, LOCK_DSRC_ACTION CHAR(1)) ; | ||
ALTER TABLE RES_ENT ADD CONSTRAINT RES_ENT_PK PRIMARY KEY(RES_ENT_ID) USING INDEX; | ||
CREATE TABLE RES_ENT_OKEY (OBS_ENT_ID NUMBER NOT NULL, RES_ENT_ID NUMBER NOT NULL, MATCH_KEY CLOB, ERRULE_ID NUMBER(5) NOT NULL) ; | ||
ALTER TABLE RES_ENT_OKEY ADD CONSTRAINT RES_ENT_OKEY_PK PRIMARY KEY(OBS_ENT_ID) USING INDEX; | ||
CREATE INDEX RES_ENT_OKEY_SK ON RES_ENT_OKEY(RES_ENT_ID, OBS_ENT_ID) ; | ||
CREATE TABLE RES_FEAT_EKEY (RES_ENT_ID NUMBER NOT NULL, LIB_FEAT_ID NUMBER NOT NULL, OBS_ENT_CNT NUMBER, USED_FROM_DT DATE, USED_THRU_DT DATE, FTYPE_ID NUMBER(5) NOT NULL, SUPPRESSED CHAR(1), UTYPE_CODE VARCHAR2(255)) ; | ||
CREATE UNIQUE INDEX RES_FEAT_EKEY_PK ON RES_FEAT_EKEY(LIB_FEAT_ID, RES_ENT_ID, UTYPE_CODE) ; | ||
CREATE INDEX RES_FEAT_EKEY_SK ON RES_FEAT_EKEY(RES_ENT_ID) ; | ||
CREATE TABLE RES_FEAT_STAT (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, NUM_RES_ENT NUMBER(7) NOT NULL, NUM_RES_ENT_OOM NUMBER(7) NOT NULL, CANDIDATE_CAP_REACHED CHAR(1) DEFAULT 'N' NOT NULL, SCORING_CAP_REACHED CHAR(1) DEFAULT 'N' NOT NULL) ; | ||
ALTER TABLE RES_FEAT_STAT ADD CONSTRAINT RES_FEAT_STAT_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX; | ||
CREATE TABLE RES_RELATE (RES_REL_ID NUMBER NOT NULL, MIN_RES_ENT_ID NUMBER NOT NULL, MAX_RES_ENT_ID NUMBER NOT NULL, LAST_ERRULE_ID NUMBER(5), IS_DISCLOSED NUMBER(1), IS_AMBIGUOUS NUMBER(1), MATCH_KEY CLOB, MATCH_KEY_DETAILS CLOB, MATCH_LEVELS VARCHAR2(50)) ; | ||
ALTER TABLE RES_RELATE ADD CONSTRAINT RES_RELATE_PK PRIMARY KEY(RES_REL_ID) USING INDEX; | ||
CREATE TABLE RES_REL_EKEY (RES_ENT_ID NUMBER NOT NULL, REL_ENT_ID NUMBER NOT NULL, RES_REL_ID NUMBER NOT NULL) ; | ||
ALTER TABLE RES_REL_EKEY ADD CONSTRAINT RES_REL_EKEY_PK PRIMARY KEY(RES_ENT_ID, REL_ENT_ID) USING INDEX; | ||
CREATE TABLE SYS_SEQUENCE (SEQUENCE_NAME VARCHAR2(50) NOT NULL, NEXT_SEQUENCE NUMBER NOT NULL, CACHE_SIZE NUMBER NOT NULL) ; | ||
ALTER TABLE SYS_SEQUENCE ADD CONSTRAINT SYS_SEQUENCE_PK PRIMARY KEY(SEQUENCE_NAME) USING INDEX; | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('ER_ID',1,100000); | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('LIB_FEAT_ID',1,100000); | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('OBS_ENT_ID',1,100000); | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('OBS_ID',1,100000); | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('RES_REL_ID',1,100000); | ||
CREATE TABLE SYS_CFG (CONFIG_DATA_ID NUMBER NOT NULL, CONFIG_DATA CLOB NOT NULL, CONFIG_COMMENTS VARCHAR2(200) NOT NULL, SYS_CREATE_DT DATE NOT NULL) ; | ||
ALTER TABLE SYS_CFG ADD CONSTRAINT SYS_CFG_PK PRIMARY KEY(CONFIG_DATA_ID) USING INDEX; | ||
CREATE TABLE SYS_CODES_USED (CODE_TYPE VARCHAR2(25) NOT NULL, CODE VARCHAR2(25) NOT NULL, CODE_ID NUMBER NOT NULL) ; | ||
ALTER TABLE SYS_CODES_USED ADD CONSTRAINT SYS_CODES_USED_PK PRIMARY KEY(CODE_TYPE, CODE) USING INDEX; | ||
CREATE UNIQUE INDEX SYS_CODES_USED_SK ON SYS_CODES_USED(CODE_TYPE, CODE_ID) ; | ||
CREATE TABLE SYS_VARS (VAR_GROUP VARCHAR2(25) NOT NULL, VAR_CODE VARCHAR2(25) NOT NULL, VAR_VALUE VARCHAR2(25) NOT NULL, SYS_LSTUPD_DT DATE) ; | ||
ALTER TABLE SYS_VARS ADD CONSTRAINT SYS_VARS_PK PRIMARY KEY(VAR_GROUP, VAR_CODE) USING INDEX; | ||
INSERT INTO SYS_VARS (VAR_GROUP,VAR_CODE,VAR_VALUE) VALUES ('VERSION','SCHEMA','4.0'); | ||
CREATE TABLE SYS_STATUS (SYSTEM_CODE VARCHAR2(50) NOT NULL, LAST_TOUCH_DT DATE) ; | ||
ALTER TABLE SYS_STATUS ADD CONSTRAINT SYS_STATUS_PK PRIMARY KEY(SYSTEM_CODE) USING INDEX; | ||
CREATE TABLE SYS_EVAL_QUEUE (MSG_ID NUMBER NOT NULL, DSRC_CODE VARCHAR2(25) NOT NULL, ENT_SRC_KEY VARCHAR2(40) NOT NULL, MSG CLOB) ; | ||
ALTER TABLE SYS_EVAL_QUEUE ADD CONSTRAINT SYS_EVAL_QUEUE_PK PRIMARY KEY(MSG_ID) USING INDEX; | ||
CREATE UNIQUE INDEX IX_EVAL_QUEUE ON SYS_EVAL_QUEUE(ENT_SRC_KEY, DSRC_CODE) ; | ||
CREATE TABLE LIB_FEAT (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, VERSION NUMBER(5) NOT NULL, FEAT_HASH VARCHAR2(40) NOT NULL, FEAT_DESC VARCHAR2(150), FELEM_VALUES CLOB NOT NULL, ANONYMIZED CHAR(1) NOT NULL) | ||
ALTER TABLE LIB_FEAT ADD CONSTRAINT LIB_FEAT_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX | ||
CREATE UNIQUE INDEX LIB_FEAT_SK ON LIB_FEAT(FEAT_HASH, FTYPE_ID, ANONYMIZED) | ||
CREATE TABLE SYS_HW_CHECK (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, VERSION NUMBER(5) NOT NULL, FEAT_HASH VARCHAR2(40) NOT NULL, FEAT_DESC VARCHAR2(150), FELEM_VALUES CLOB NOT NULL, ANONYMIZED CHAR(1) NOT NULL) | ||
ALTER TABLE SYS_HW_CHECK ADD CONSTRAINT SYS_HW_CHECK_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX | ||
CREATE UNIQUE INDEX SYS_HW_CHECK_SK ON SYS_HW_CHECK(FEAT_HASH, FTYPE_ID, ANONYMIZED) | ||
CREATE TABLE DSRC_RECORD (CONFIG_ID NUMBER, FIRST_SEEN_DT DATE, LAST_SEEN_DT DATE, RECORD_ID VARCHAR2(250) NOT NULL, ENT_SRC_KEY VARCHAR2(40) NOT NULL, DSRC_ID NUMBER(5) NOT NULL, JSON_DATA CLOB) | ||
ALTER TABLE DSRC_RECORD ADD CONSTRAINT DSRC_RECORD_PK PRIMARY KEY(RECORD_ID, DSRC_ID) USING INDEX | ||
CREATE INDEX DSRC_RECORD_SK ON DSRC_RECORD(ENT_SRC_KEY, DSRC_ID) | ||
CREATE TABLE OBS_ENT (OBS_ENT_ID NUMBER NOT NULL, LOCKING_ID NUMBER NOT NULL, LAST_TOUCH_DT NUMBER, DSRC_ID NUMBER(5) NOT NULL, LOCK_DSRC_ACTION CHAR(1), ENT_SRC_KEY VARCHAR2(40) NOT NULL, FEATURES CLOB) | ||
ALTER TABLE OBS_ENT ADD CONSTRAINT OBS_ENT_PK PRIMARY KEY(OBS_ENT_ID) USING INDEX | ||
CREATE UNIQUE INDEX OBS_ENT_SK ON OBS_ENT(ENT_SRC_KEY, DSRC_ID) | ||
CREATE TABLE RES_ENT (RES_ENT_ID NUMBER NOT NULL, LOCKING_ID NUMBER NOT NULL, LAST_TOUCH_DT NUMBER, ENT_STATE NUMBER, LOCK_DSRC_ACTION CHAR(1)) | ||
ALTER TABLE RES_ENT ADD CONSTRAINT RES_ENT_PK PRIMARY KEY(RES_ENT_ID) USING INDEX | ||
CREATE TABLE RES_ENT_OKEY (OBS_ENT_ID NUMBER NOT NULL, RES_ENT_ID NUMBER NOT NULL, MATCH_KEY CLOB, ERRULE_ID NUMBER(5) NOT NULL) | ||
ALTER TABLE RES_ENT_OKEY ADD CONSTRAINT RES_ENT_OKEY_PK PRIMARY KEY(OBS_ENT_ID) USING INDEX | ||
CREATE INDEX RES_ENT_OKEY_SK ON RES_ENT_OKEY(RES_ENT_ID, OBS_ENT_ID) | ||
CREATE TABLE RES_FEAT_EKEY (RES_ENT_ID NUMBER NOT NULL, LIB_FEAT_ID NUMBER NOT NULL, OBS_ENT_CNT NUMBER, USED_FROM_DT DATE, USED_THRU_DT DATE, FTYPE_ID NUMBER(5) NOT NULL, SUPPRESSED CHAR(1), UTYPE_CODE VARCHAR2(255)) | ||
CREATE UNIQUE INDEX RES_FEAT_EKEY_PK ON RES_FEAT_EKEY(LIB_FEAT_ID, RES_ENT_ID, UTYPE_CODE) | ||
CREATE INDEX RES_FEAT_EKEY_SK ON RES_FEAT_EKEY(RES_ENT_ID) | ||
CREATE TABLE RES_FEAT_STAT (LIB_FEAT_ID NUMBER NOT NULL, FTYPE_ID NUMBER(5) NOT NULL, NUM_RES_ENT NUMBER(7) NOT NULL, NUM_RES_ENT_OOM NUMBER(7) NOT NULL, CANDIDATE_CAP_REACHED CHAR(1) DEFAULT 'N' NOT NULL, SCORING_CAP_REACHED CHAR(1) DEFAULT 'N' NOT NULL) | ||
ALTER TABLE RES_FEAT_STAT ADD CONSTRAINT RES_FEAT_STAT_PK PRIMARY KEY(LIB_FEAT_ID) USING INDEX | ||
CREATE TABLE RES_RELATE (RES_REL_ID NUMBER NOT NULL, MIN_RES_ENT_ID NUMBER NOT NULL, MAX_RES_ENT_ID NUMBER NOT NULL, LAST_ERRULE_ID NUMBER(5), IS_DISCLOSED NUMBER(1), IS_AMBIGUOUS NUMBER(1), MATCH_KEY CLOB, MATCH_KEY_DETAILS CLOB, MATCH_LEVELS VARCHAR2(50)) | ||
ALTER TABLE RES_RELATE ADD CONSTRAINT RES_RELATE_PK PRIMARY KEY(RES_REL_ID) USING INDEX | ||
CREATE TABLE RES_REL_EKEY (RES_ENT_ID NUMBER NOT NULL, REL_ENT_ID NUMBER NOT NULL, RES_REL_ID NUMBER NOT NULL) | ||
ALTER TABLE RES_REL_EKEY ADD CONSTRAINT RES_REL_EKEY_PK PRIMARY KEY(RES_ENT_ID, REL_ENT_ID) USING INDEX | ||
CREATE TABLE SYS_SEQUENCE (SEQUENCE_NAME VARCHAR2(50) NOT NULL, NEXT_SEQUENCE NUMBER NOT NULL, CACHE_SIZE NUMBER NOT NULL) | ||
ALTER TABLE SYS_SEQUENCE ADD CONSTRAINT SYS_SEQUENCE_PK PRIMARY KEY(SEQUENCE_NAME) USING INDEX | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('ER_ID',1,100000) | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('LIB_FEAT_ID',1,100000) | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('OBS_ENT_ID',1,100000) | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('OBS_ID',1,100000) | ||
INSERT INTO SYS_SEQUENCE (SEQUENCE_NAME,NEXT_SEQUENCE,CACHE_SIZE) VALUES ('RES_REL_ID',1,100000) | ||
CREATE TABLE SYS_CFG (CONFIG_DATA_ID NUMBER NOT NULL, CONFIG_DATA CLOB NOT NULL, CONFIG_COMMENTS VARCHAR2(200) NOT NULL, SYS_CREATE_DT DATE NOT NULL) | ||
ALTER TABLE SYS_CFG ADD CONSTRAINT SYS_CFG_PK PRIMARY KEY(CONFIG_DATA_ID) USING INDEX | ||
CREATE TABLE SYS_CODES_USED (CODE_TYPE VARCHAR2(25) NOT NULL, CODE VARCHAR2(25) NOT NULL, CODE_ID NUMBER NOT NULL) | ||
ALTER TABLE SYS_CODES_USED ADD CONSTRAINT SYS_CODES_USED_PK PRIMARY KEY(CODE_TYPE, CODE) USING INDEX | ||
CREATE UNIQUE INDEX SYS_CODES_USED_SK ON SYS_CODES_USED(CODE_TYPE, CODE_ID) | ||
CREATE TABLE SYS_VARS (VAR_GROUP VARCHAR2(25) NOT NULL, VAR_CODE VARCHAR2(25) NOT NULL, VAR_VALUE VARCHAR2(25) NOT NULL, SYS_LSTUPD_DT DATE) | ||
ALTER TABLE SYS_VARS ADD CONSTRAINT SYS_VARS_PK PRIMARY KEY(VAR_GROUP, VAR_CODE) USING INDEX | ||
INSERT INTO SYS_VARS (VAR_GROUP,VAR_CODE,VAR_VALUE) VALUES ('VERSION','SCHEMA','4.0') | ||
CREATE TABLE SYS_STATUS (SYSTEM_CODE VARCHAR2(50) NOT NULL, LAST_TOUCH_DT DATE) | ||
ALTER TABLE SYS_STATUS ADD CONSTRAINT SYS_STATUS_PK PRIMARY KEY(SYSTEM_CODE) USING INDEX | ||
CREATE TABLE SYS_EVAL_QUEUE (MSG_ID NUMBER NOT NULL, DSRC_CODE VARCHAR2(25) NOT NULL, ENT_SRC_KEY VARCHAR2(40) NOT NULL, MSG CLOB) | ||
ALTER TABLE SYS_EVAL_QUEUE ADD CONSTRAINT SYS_EVAL_QUEUE_PK PRIMARY KEY(MSG_ID) USING INDEX | ||
CREATE UNIQUE INDEX IX_EVAL_QUEUE ON SYS_EVAL_QUEUE(ENT_SRC_KEY, DSRC_CODE) |