Skip to Main Content

SQL Developer Data Modeler

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!

Reverse engineer to generate ERD and display arrows for non-existing foreign key relationship

orawin2Jan 8 2019 — edited Jan 29 2019

Hi All

I am trying to create data model diagram(s) for several data marts that are already existing in Data Warehouse database. My goal is to eventually publish the diagrams for our users in the intranet.

  • Oracle 12c database
  • All tables are either Facts or Dimensions following the Star Schema design
  • Tables have primary keys
  • Foreign keys are not enforced at the database level. There are not foreign keys.
  • We do not currently use any Data modeling tool to generate a DDL. And it is not my goal at this point to use a data modeling tool for generating DDL. We create DDLs manually.

What I have done so far..

I imported a fact and couple of dimension tables from the Oracle data warehouse into Datamodeler. WC_OCCUPANCY_F is fact table. W_DAY_D and WC_UNIT_D are dimension tables. The red arrows are what I want to generate. Below is the screenshot of this.

My Question:

Is there a way setup a script or template with "rules" for foreign key so the Datamodeler can draw the relationships in the diagram?

My rules would look like:

Table name ending with _F is a Referred Table

- Foreign Key rule would use a combination of Referrencing table Name and naming convention we are following on the FKs. I can write a generic rule that catches most of them. And, create any exceptions manually.

- Table name ending with \_D is a Referrencing Table

- column called ROW\_WID is the PK

pastedImage_12.png

Thank you

Neil

Message was edited by: orawin2. I removed the reference to mit website to avoid confusion.

This post has been answered by Philip Stoyanov-Oracle on Jan 10 2019
Jump to Answer
Comments
Post Details
Added on Jan 8 2019
10 comments
1,568 views