Enhancement Request : TableWindow - Keys - Foreign Keys + Indexecreation

orca777

Member³
Hello
Devteam;

Always when a foreign key is defined i support this key with an index with the same name. This prevents
from table locking if the primary key is updated/deleted.

Would you add an option to create the ddl for Index too on FK Generation.

With kind regards
carl

Code:
-- Foreign Keys
alter table ISRE_ORM_RELATIONS
  add constraint ISRE_ORM_RELATIONS_FK01 foreign key (PARENT_TABLENAME)
  references ISRE_TABLES (TABLE_NAME);
alter table ISRE_ORM_RELATIONS
  add constraint ISRE_ORM_RELATIONS_FK02 foreign key (CHILD_TABLENAME)
  references ISRE_TABLES (TABLE_NAME);
alter table ISRE_ORM_RELATIONS
  add constraint ISRE_ORM_RELATIONS_FK03 foreign key (LINK_TABLENAME)
  references ISRE_TABLES (TABLE_NAME);
alter table ISRE_ORM_RELATIONS
  add constraint ISRE_ORM_RELATIONS_FK04 foreign key (ORM_RELATION)
  references ISRE_ORM_LINK_TYPES (LINK_TYPE);
alter table ISRE_ORM_RELATIONS
  add constraint ISRE_ORM_RELATIONS_FK05 foreign key (APPLICATION)
  references ISRE_APPLICATIONS (APPLICATION);

-- Support Foreign Keys with indexes
CREATE INDEX ISRE_ORM_RELATIONS_FK01 ON ISRE_ORM_RELATIONS(PARENT_TABLENAME)
  TABLESPACE ISISIXS;

CREATE INDEX ISRE_ORM_RELATIONS_FK02 ON ISRE_ORM_RELATIONS(CHILD_TABLENAME)
  TABLESPACE ISISIXS;

CREATE INDEX ISRE_ORM_RELATIONS_FK03 ON ISRE_ORM_RELATIONS(LINK_TABLENAME)
  TABLESPACE ISISIXS;

CREATE INDEX ISRE_ORM_RELATIONS_FK04 ON ISRE_ORM_RELATIONS(ORM_RELATION)
  TABLESPACE ISISIXS;

CREATE INDEX ISRE_ORM_RELATIONS_FK05 ON ISRE_ORM_RELATIONS(APPLICATION)
  TABLESPACE ISISIXS;
 
Back
Top