Author Topic: Database Model for ORACLE  (Read 3110 times)

ulb

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Database Model for ORACLE
« on: October 20, 2003, 01:31:56 am »
Hi everybody

I'm working with EA for modelling DB schemas in ORACLE does anybody know how to add schema names in DDL code?

Where do I use it.
When referencing tables in other schemas there should be an prefix with the schema name.

By the way.
How do you think about DDL generation in EA?

Kind regards
Ulrich

cpsparrow

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Database Model for ORACLE
« Reply #1 on: October 24, 2003, 10:19:56 pm »
What I do is put each schema in a package within the Data Model package to document that fact that the tables are in different schemas.  I then generate the ddl for the package in one file.  I run that ddl connected as the schema's user.  Not perfect but it works.

Regarding my opinion of the Oracle ddl, its ok.  The drop table statements need CASCADE CONSTRAINTS added to them.  The ddl generation process creates seqence names and trigger names for autoincrement attributes that are longer than 31 characters.  It allows you to create constraints that have names longer then 31 characters.  I am careful when I create them not to do that.

All that said, it beats typing the ddl from scratch.  I usually can generate the ddl, change the drops with a macro in my favorite editor, run it, find the names that are too long, fix it and run it again to get the schema created.