Book a Demo

Author Topic: Problems generating DDL for Oracle 8i  (Read 4831 times)

fra3k

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Problems generating DDL for Oracle 8i
« on: July 31, 2003, 09:10:57 am »
Hya,

We are developing a database model with Enterprise Architect 3.51.618 for Oracle.  When we generate a DDL from that model we have multiple problems.

- A table has a field which is stated primary key, not null and unique. The SQL that is generated can't be loaded with Toad. It says: ORA-02261: such unique or primary key already exists in the table.
When we unmark the unique field in EA and generate the DDL again, the problem does not occur anymore. The constraint is removed from the field.
How can this be solved? Is it possible to have multiple constraints on a single field?

- When a field is not stated as being unique (whether it is a primary key or not does not matter) and the autonumber field is marked, The Generated DDL does not contain the script for a sequence. Only setting the field to unique guarantees a sequence is created when autonumber is marked. Is this a bug?

- The script that is generated by EA, also contains a trigger. The trigger seems to be the problem when we want to run the complete script. At the end of the script for the trigger, there are 2 lines which seem to be the problem:

CREATE OR REPLACE TRIGGER SET_name_id
BEFORE INSERT
ON tableName
FOR EACH ROW
BEGIN
 SELECT name_id_SEQ.NEXTVAL
 INTO :NEW.ID
 FROM DUAL;
END;
/
;
Do the slash(/) and the last ; need to be there? Why is this generated?

I hope you people could help us with these problems?
Are they known issues and if so, will they be solved in EA3.6 or earlier (later?)

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Problems generating DDL for Oracle 8i
« Reply #1 on: July 31, 2003, 09:47:59 pm »
The data modelling feature of EA is undergoing continuous development. Triggers and sequence/identity columns are on the list of issues that will be addressed in future releases.