Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Data Modeler - Naming Conventions

ManfredQueryFeb 1 2010 — edited Feb 1 2010
I was using Oracle Designer for several year.
This product could drive you crazy because sometimes, but the strength was in my opinion the datamodelling part.
It saved you a lot of time because you kept stuck to the logical model generated your relational model and had all scripts satisfying all naming conventions you needed.
In Data Modeler i really miss the naming conventions and can't understand some parts, sometimes somebody here can help me if i have overseen something or it is just not implemented.

Naming conventions as example:

We work with surrogate keys.
Two well known tables - Employees (abbreviation EMP), Departments (abbreviation DEP)
They have one relation 1:N one department has many employees

In Designer i would define the EMPLOYEE entity, would set the table-abbreviation, the attributes and the primary key.
The same with DEPARTMENT. I would design it WITHOUT any column for the foreign key constraint.
Then i would create a relation between this two tables.
Last step is to generate the relational model.

a) Designer automatically adds ID as surrogate key on every table (you could configure that, it was dependent on a domain)
b) it automatically adds the table abbreviation as prefix on every column (even here it's configurable)
c) it automatically adds the a foreign key column in the child table with the prefix of the master table (f.e. EMP_DEP_ID or DEP_ID if you prefer not to prefix every column... what i do)

It was really easy to get your scripts.

Things i don't understand in Data Modeler:

In a logical model you should design entities, attributes and relations and don't mess around with FK-columns.
Is there any support for surrogate keys? I don't wanna add an ID manually with every table.
In Data Modeler an additional COLUMN(!) is added with every Foreign key relation, i could live with that, but there is no way to tell
Data Modeler to prefix it automatically. The name can just be changed in the Relational View afterward.

P.S.
Surrogate Keys.... There are some pros and cons for/against this out there. I have seen a lot of Oracle Projects and in all except one i always had a surrogate key column. It really makes life
easier. In the one no-surrogate-key-project we began to add surrogate keys after a while...
This post has been answered by Philip Stoyanov-Oracle on Feb 1 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2010
Added on Feb 1 2010
4 comments
3,812 views