Book a Demo

Author Topic: Representing lookup tables (domain) with values?  (Read 4735 times)

dana n

  • EA User
  • **
  • Posts: 54
  • Karma: +0/-0
    • View Profile
Representing lookup tables (domain) with values?
« on: August 06, 2009, 08:17:24 pm »
Is it possible to represent lookup tables (aka domain tables / domain constants) in EA including values?

Most of our domain tables have the following 3 column structure:

FOO_CD <<PK>> ("code")
FOO_NM <<UQ>> ("name")
FOO_DES              ("description")

The goal is to be able to develop and maintain domain tables, including their values, all within EA; so that forward engineering can be performed where INSERT statements (DML) are generated along with DDL.

Is this possible? Easy? Difficult? How have you done this if you have? How would you do it if you haven't, but wanted to? If I could get EA to do this, I'd be doing the Happy Dance--figuratively of course.

Thanks very much.

Dana

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Representing lookup tables (domain) with value
« Reply #1 on: August 06, 2009, 08:48:54 pm »
No.

See my answer to your related post here.
No, you can't have it!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Representing lookup tables (domain) with value
« Reply #2 on: August 06, 2009, 09:31:44 pm »
What you could do is create and object (instance of your domain table) for each row of data and set the runstate of your attributes to define the values.
You will then have to craft your own transformation to create the insert query.
I don't know if something like this is possible with the transformation templates, but it is certainly fairly easy using the API in a little add-in.

Geert

dana n

  • EA User
  • **
  • Posts: 54
  • Karma: +0/-0
    • View Profile
Re: Representing lookup tables (domain) with value
« Reply #3 on: August 07, 2009, 08:13:04 pm »
Quote
What you could do is create and object (instance of your domain table) for each row of data and set the runstate of your attributes to define the values.
You will then have to craft your own transformation to create the insert query.
I don't know if something like this is possible with the transformation templates, but it is certainly fairly easy using the API in a little add-in.

Geert

Midnight. Thanks. I submitted a Feature Request as you suggested in the other thread. How responsive is Sparx, generally speaking, with Feature Requests? And is there a repository of user-submitted "plug-ins" / transformations that I can search for a possible pre-existing solution? If those are the correct terms--I am still very new to using EA.

Geert, thanks for your reply. I will have to investigate setting the run state. Not quite sure how to do so, but will check the help files. Does anyone have a working example of this, or something like it? Also, I've never created a transform before, but know it's something I'll have to start learning. Can anyone recommend a good article or tutorial on the subjet, or is EA's help sufficient for a novice like me?

dana n

  • EA User
  • **
  • Posts: 54
  • Karma: +0/-0
    • View Profile
Re: Representing lookup tables (domain) with value
« Reply #4 on: August 11, 2009, 01:26:18 am »
What about using Enumerations to model domains and domain values? Would that work?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Representing lookup tables (domain) with value
« Reply #5 on: August 11, 2009, 04:09:52 pm »
I think you'll find enumerations to be too limited for that purpose.
The problem is that with enumerations is that you only get to define one value, and not a set of values. (enumerations are one-dimensional)
In database terms that means a table with only one field.
Usually these domain values things have more then one field (such as code, name, description,...)
Another problem with enumerations is that they are already used to represent, well enumeration ;). So how will you differentiate the regular enumerations (fixed one dimensional set of values) from your domain values things?

Geert

salayande

  • EA User
  • **
  • Posts: 224
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Representing lookup tables (domain) with value
« Reply #6 on: August 12, 2009, 05:03:02 am »
Dear all,

My current challenge appears to be similar to that of Dana. Many supplier databases utilise abbreviations in their physical database design and implementation.

In my day job, I am responsible for the developing of information standards. What I wanted to do is to reverse engineer the database schema of these applications in the enterprise, and transform these into a common logical data model.

I have a list of abbreviations and their names. I need to match these abbreviations against database table names and have the transformation routine replace the abbreviations with the full word.

If I were using a complete programming language, I'd declare a 2-dimensional array and use this, but unfortunately, I am not a competent programmer, I model data.

I am sure other people have been writing transformation routines, but can anyone provide a concrete help here.

Thank you in anticipation.

Segun