Book a Demo

Author Topic: Seed defined datatypes for new Database Product  (Read 4312 times)

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Seed defined datatypes for new Database Product
« on: January 14, 2005, 04:14:04 pm »
Hi,

Our deployment database is going to be Oracle version 10g, Spatial Option.   On the menu, I go to Configuration -> Database Datatypes, where I see various pre-built products and their pre-defined datatypes.

I'd like to 'Add Product' on this dialog box (i.e. "Oracle10g SDO", but initially copy the currently defined datatypes for the built-in Oracle product (e.g. DATE, NUMBER, VARCHAR2, etc.).

Is there any automated way to do this?  I'd hate to do this 'under the covers' in Access, but that's an option too.

TIA,
gary

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Seed defined datatypes for new Database Produc
« Reply #1 on: January 14, 2005, 10:43:48 pm »
Hi Gary,

try menu Tools > Export Reference Data (the item you are looking for is called "Model Data Types - Code and DDL). Export the data types to an XML file, edit the file (simple replacing "Oracle" with "Oracle10g SDO") and import back.
I haven't tried this myself, but I suspect it should work :-)

Hope this helps!

Bruno

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: Seed defined datatypes for new Database Produc
« Reply #2 on: January 16, 2005, 12:19:55 pm »
Bruno,

Thanks!! As far as 'seeding' the list, it works great!  I assume you meant for me to delete the extraneous data types (e.g. SQLServer, Access) as these will still exist in my EA when I import the modified xml file?

I notice however, that now the generated DDL lacks the 'COMMENT ON COLUMN'  statements.

I guess that EA knows to generate these for the 'Oracle' product, but not for the new 'Oracle10g SDO' product?

If there's no straightforward way to do this (maintaining the intelligence in EA for related DDL statements), then I can just enter generate as 'Oracle' and do post-generation changes.  

Thanks anyway,
gary

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Seed defined datatypes for new Database Produc
« Reply #3 on: January 16, 2005, 08:58:15 pm »
Hi Gary,

glad this helped a little bit. I guess the way DDL is generated is hardcoded in EA - funny, I would have thought the code generation templates would have been used.
I see two ways of handling this - you could either define Oracle 10g as a new language, and create the code generation templates for it.
Or you could just export the datatypes definition for Oracle the way you have already tried, edit it for Oracle 10g, but leave the language id as "Oracle". Then you could import to your project either the original datatypes definition or the edited one, dependent on which version of Oracle is your project working with.

Does that help?

Bruno