Book a Demo

Author Topic: Generate DDL (Oracle).  (Read 4992 times)

Victor Conovalov

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Generate DDL (Oracle).
« on: September 18, 2009, 05:00:10 pm »
Hello All,
In fact, when you specify the length for Oracle varchar2 data type column, by default it is length in bytes.
But, you have option to add keyword “char” after the length, and Oracle interpreters it as a char and allocate the size according NLS parameters.
For example take a look on http://www.oracle-base.com/articles/9i/CharacterSemanticsAndGlobalization9i.php
I have use EA for designing my Physical model (tables) and after any changes generate DDL for all tables from EA. Un-fortunally, I did not find the way how to specify the CHAR keyword for varchar2 column and do not want to manually edit the output sql files from EA.
Is exist any way how to add CHAR keyword after the length of varchar2 column when EA generating the sql file?

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Generate DDL (Oracle).
« Reply #1 on: September 21, 2009, 08:25:43 am »
See...
http://www.sparxsystems.com/uml_tool_guide/data_modeling/createcolumns.html

Create the column and save. Select the column and click Column Properties... to set LengthType.

Victor Conovalov

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Generate DDL (Oracle).
« Reply #2 on: September 21, 2009, 05:02:09 pm »
My EAP version is: 7.1.832 (Build: 832) - Unicode
I have add LengthType tag = CHAR to my table tags.
I have choose Oracle on Table Properties->Database
When click on Column Properties see jut three fields:
Check Box: Auto Number
Text edit: Start Value
Text Edit: Increment.
When generate the DDL, varchar2 columns appear without the CHAR keyword.

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Generate DDL (Oracle).
« Reply #3 on: September 22, 2009, 08:06:41 am »
If you are unable to upgrade to the latest build, the link in my previous post provides a work around in the Notes of Item 5...

Quote
Oracle VARCHAR2(15 CHAR) and VARCHAR2(50 BYTE) datatypes can be created by adding the tag LengthType with the value CHAR or BYTE.