Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-54

Add referential integrity support to the OJB-to-DDL generator so that constraints can be added

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: Not version specific
    • Component/s: None
    • Labels:
      None
    • Rice Module:
      Rice Core

      Description

      Allow for constraints (unique, foreign key, etc) to be generated with the DDL.

        Attachments

          Activity

          Hide
          bmcgough Brian McGough (Inactive) added a comment -

          Also allow for indexes DDL to be generated from this. I think you can specify on field in the ojb definitiions something like index=true

          And so we shoudl take that information and create index DDL from it. If multiple index=true columns exist then we should generate indexes for all indiviually, but also perhaps the permutations that exist as well, this gets into index overhead etc, but it would be good to have this support as well.

          Show
          bmcgough Brian McGough (Inactive) added a comment - Also allow for indexes DDL to be generated from this. I think you can specify on field in the ojb definitiions something like index=true And so we shoudl take that information and create index DDL from it. If multiple index=true columns exist then we should generate indexes for all indiviually, but also perhaps the permutations that exist as well, this gets into index overhead etc, but it would be good to have this support as well.
          Hide
          natjohns Nate Johnson (Inactive) added a comment -

          It can do the index='true' now... here is an example (See the constraints). This should work with Oracle, but I haven't tested it nor do I know if it would work in mysql. Needs testing.

          CREATE TABLE FS_ADHOC_RTE_ACTN_RECP_T (

          ACTN_RQST_RECP_TYP_CD NUMERIC(8) NOT NULL,
          ACTN_RQST_CD VARCHAR2(1) NOT NULL,
          ACTN_RQST_RECP_ID VARCHAR2(4000) NOT NULL,
          OBJ_ID VARCHAR2(4000) NULL,
          VER_NBR NUMERIC(18,0) NULL,
          FDOC_NBR VARCHAR2(4000) NULL,

          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_PK PRIMARY KEY (
          ACTN_RQST_RECP_TYP_CD, ACTN_RQST_CD, ACTN_RQST_RECP_ID
          ) USING INDEX TABLESPACE MY_IDX01,
          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX1 UNIQUE (ACTN_RQST_RECP_TYP_CD) USING INDEX TABLESPACE MY_IDX01,
          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX2 UNIQUE (ACTN_RQST_CD) USING INDEX TABLESPACE MY_IDX01,
          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX3 UNIQUE (ACTN_RQST_RECP_ID) USING INDEX TABLESPACE MY_IDX01,
          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX4 UNIQUE (OBJ_ID) USING INDEX TABLESPACE MY_IDX01,
          CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX5 UNIQUE (FDOC_NBR) USING INDEX TABLESPACE MY_IDX01

          ) TABLESPACE MY01
          /
          CREATE PUBLIC SYNONYM FS_ADHOC_RTE_ACTN_RECP_T FOR MY.FS_ADHOC_RTE_ACTN_RECP_T
          /
          GRANT SELECT, UPDATE, INSERT, DELETE ON MY.FS_ADHOC_RTE_ACTN_RECP_T TO MY_USER
          /

          Show
          natjohns Nate Johnson (Inactive) added a comment - It can do the index='true' now... here is an example (See the constraints). This should work with Oracle, but I haven't tested it nor do I know if it would work in mysql. Needs testing. CREATE TABLE FS_ADHOC_RTE_ACTN_RECP_T ( ACTN_RQST_RECP_TYP_CD NUMERIC(8) NOT NULL, ACTN_RQST_CD VARCHAR2(1) NOT NULL, ACTN_RQST_RECP_ID VARCHAR2(4000) NOT NULL, OBJ_ID VARCHAR2(4000) NULL, VER_NBR NUMERIC(18,0) NULL, FDOC_NBR VARCHAR2(4000) NULL, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_PK PRIMARY KEY ( ACTN_RQST_RECP_TYP_CD, ACTN_RQST_CD, ACTN_RQST_RECP_ID ) USING INDEX TABLESPACE MY_IDX01, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX1 UNIQUE (ACTN_RQST_RECP_TYP_CD) USING INDEX TABLESPACE MY_IDX01, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX2 UNIQUE (ACTN_RQST_CD) USING INDEX TABLESPACE MY_IDX01, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX3 UNIQUE (ACTN_RQST_RECP_ID) USING INDEX TABLESPACE MY_IDX01, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX4 UNIQUE (OBJ_ID) USING INDEX TABLESPACE MY_IDX01, CONSTRAINT FS_ADHOC_RTE_ACTN_RECP_T_IDX5 UNIQUE (FDOC_NBR) USING INDEX TABLESPACE MY_IDX01 ) TABLESPACE MY01 / CREATE PUBLIC SYNONYM FS_ADHOC_RTE_ACTN_RECP_T FOR MY.FS_ADHOC_RTE_ACTN_RECP_T / GRANT SELECT, UPDATE, INSERT, DELETE ON MY.FS_ADHOC_RTE_ACTN_RECP_T TO MY_USER /
          Hide
          natjohns Nate Johnson (Inactive) added a comment -

          This is in the rice-db project. Needs testing as none of the projects I maintain use this feature.

          Show
          natjohns Nate Johnson (Inactive) added a comment - This is in the rice-db project. Needs testing as none of the projects I maintain use this feature.

            People

            • Assignee:
              natjohns Nate Johnson (Inactive)
              Reporter:
              agodert Aaron Godert (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: