Book a Demo

Author Topic: Copy attributes from 1 table to another  (Read 3044 times)

Sophia

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Copy attributes from 1 table to another
« on: July 28, 2010, 08:15:01 pm »
I am a brand new user of EA and hope somebody could tell me how I can copy selected columns/attributes from 1 table to another.  These attributes will need to be added to all tables throughout the system.  Is there a way that I can define them once and then have them added to each table when DDL is created.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy attributes from 1 table to another
« Reply #1 on: July 28, 2010, 08:55:04 pm »
Sophia,

There are a number of options, depending on what you are actually modelling.
What I would do is create a superclass that contains those attributes, and have all other classes (tables) inherit from that class.
I'm not sure if that will translate directly into those attributes being added to each table, but if not, there must be some MDA transformation you can use to create the tables based on the classes.

Another option is to copy them manually to each class/table. You can do that by selecting the attributes in the project browser and dragging them onto the classes/tables in a diagram.

If either of these options require too much manual work you can think about writing a little script or addin to automate things.

Geert