Book a Demo

Author Topic: A quick data modelling question...  (Read 3084 times)

ngchol

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
A quick data modelling question...
« on: August 16, 2010, 09:40:53 pm »
Hi all, this is my first post so sorry if I've missed the answer elsewhere...

I've created about 50 tables in a data model - they currently have no columns. Each table will contain a column called "<tablename> ID". Is there a macro I could easily create/run which could do this, or do I need to add each column manually?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: A quick data modelling question...
« Reply #1 on: August 16, 2010, 10:14:57 pm »
Have you tried creating a superclass that contains this one column, and having all other tables specialize this one?

This might just give you the desired results.

Geert


sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: A quick data modelling question...
« Reply #2 on: August 16, 2010, 10:47:28 pm »
Alternatively,

Since they are empty, why not delete the model, create a pseudo-table and then "Duplicate" it 50 times (its somewhere in the context menus).

Alternatively, as Geert suggests, use a more advanced rdms that supports inheritance.... (blatant plug for postgresql... (followed by blatant request that EA implement DDL generation that supports it!)).

<evil>hehehehehee</evil>
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: A quick data modelling question...
« Reply #3 on: August 17, 2010, 09:09:25 am »
Just as another suggestion - Running the built-in DDL transformation should automatically generate a default Primary Key "ID" column for each table.  The default format used for the column name is like "<TableName>ID".  You could customize the name format if needed by editing the DDL Transformation templates (specifically, look at the Class template).  Note: this process effectively creates an entire second copy of all your tables.  The original elements will not be modified.