Book a Demo

Author Topic: User defined types (obtained e.g. from Rose)  (Read 3407 times)

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
User defined types (obtained e.g. from Rose)
« on: June 26, 2007, 02:52:26 am »
Hi,

in Rational Rose I had the option to create a class and use it as a type of a table column. (I had a class called "Debit Amount" having type Double and I could use "Debit Amount" as a type in my tables for example)

Can I achieve the same (i.e. to use a class as a table column type) in EA somehow?

In EA I can create a new database datatype (via Settings/Database_Datatypes) but I can only set name, default value and max length (or precision).
In Rose I could have set check constraints for the class I used as a table column type. However, I can't achieve the same functionality (check constraints etc...) in EA using DB datatypes...

I'd appreciate any hint.

Radek
« Last Edit: June 26, 2007, 02:54:33 am by chrvi »
Radek

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: User defined types (obtained e.g. from Rose)
« Reply #1 on: June 26, 2007, 03:19:41 am »
Hey Radek,


I take it you want to create a user-defined data type. This would be in the context of a "domain" as often referred to in SQL Server, Oracle, etc. terms.

Sadly this is not supported in EA. At least not yet, as of version 7.0 beta 3 (build 812). This is a hotly anticipated feature, and I still don't know if it will surface in 7.0 production. [Any Sparxians please note this...]

Don't give up hope just yet. There is a half-way measure that just might work for you. You can always create a customized data type for your chosen DBMS. This will at least allow you to enter the type into diagrams. On output to DDL you will be somewhat limited, but perhaps you can get enough information into the output stream that you can tweak the result with a 'search and replace' in you DBMS tool before execution (or run it through an XSLT tool or something).

You'll find the necessary dialog from the EA main menu via Settings | Database Datatypes. [This works in both EA 6.5 and 7.0.] From here you can also create a map from one DBMS to another via a child dialog. This may help you in getting EA to translate your custom datatype more gracefully.

David
No, you can't have it!