Hi,
I have a few questions concerning the "Automatic Index Generation" DDL options (RDBMS is Oracle 12c).
I have activated automatic index generation for primary and foreign keys in the design properties.
1. Is this only a DDL generation option? I.e. these indexes don't show up in the Indexes section of the Table Properties dialog, but only in the DDL?
2. In the "DDL Preview" (context menu of the table in the Relational Model), I can see CREATE INDEX statements for those indexes, but there seems to be an error in the DDL generation template: the final semicolon and newline is missing. Can I edit the DDL generation template? What other settings could disturb DDL generation in this case?
The following is an example of generated DDL with one primary key index and one foreign key index. Between "TABLESPACE USER_INDEX" and "CREATE INDEX XFKT21", there should be a semicolon and a newline.
CREATE TABLE T2
(
T2_ID INTEGER NOT NULL ,
T1_ID INTEGER NOT NULL
)
LOGGING
;
CREATE UNIQUE INDEX XPKT2 ON T2
(
T2_ID ASC
)
TABLESPACE USER_INDEX CREATE INDEX XFKT21 ON T2
(
T1_ID ASC
)
TABLESPACE USER_INDEX
ALTER TABLE T2
ADD CONSTRAINT PKT2 PRIMARY KEY ( T2_ID ) ;
ALTER TABLE T2
ADD CONSTRAINT FKT21 FOREIGN KEY
(
T1_ID
)
REFERENCES T1
(
T1_ID
)
NOT DEFERRABLE
;
3. When I use "Synchronize Data Dictionary" (also in the context menu of the table in the Relational Model) and generate DDL by comparing with my Oracle 12c DB where the table does not exist yet, I get no CREATE INDEX statements. What DDL generation options apply in "Synchronize Data Dictionary", are they different from "DDL Preview"?
Example:
-- Generated by Oracle SQL Developer Data Modeler 4.2.0.932
-- at: 2017-06-28 11:35:28 CEST
-- site: Oracle Database 12c
-- type: Oracle Database 12c
CREATE TABLE T2
(
T2_ID INTEGER NOT NULL ,
T1_ID INTEGER NOT NULL
)
LOGGING
;
ALTER TABLE T2
ADD CONSTRAINT PKT2 PRIMARY KEY ( T2_ID ) ;
ALTER TABLE T2
ADD CONSTRAINT FKT21 FOREIGN KEY
(
T1_ID
)
REFERENCES T1
(
T1_ID
)
NOT DEFERRABLE
;
Thanks for any help.