Can Visio generate a Valid Oracle DDL Statement ?

T

tristant

Hi all,

I am designing DB model for Oracle 9i using Visio for enterprise architect ,
when I generate the script, I get this script :

create table ISTRI_P (
SI_PNSNIP CHAR(9) not null,
SI_POSISI CHAR(1) not null,
SI_TGLNIK DATE null, constraint ISTRI_P_PK primary key (SI_PNSNIP,
SI_POSISI) )
;

I have to add manually this additional clause : TABLESPACE APP01;

When I create Index I need to add this code :
LOGGING TABLESPACE IDX01;

When I create Primary key I need to add this clause :
USING INDEX
TABLESPACE IDX01;

How can I make visio automatically generate this additional clause for the
DDL ?

Thank you for your help,
xtanto
 
C

Chang Oh

Visio for Enterprise Architect supports up to Oracle 8.x. It is possible
that Visio may generate incorrect syntax for Oracle 9.x.

~~~~~~~~~~~
The information provided is AS-IS with no express warranty.

Chang Oh
Dev Lead
Enterprise Frameworks & Tools
 
K

Kevin Nechodom

Actually, this is not an 8.X vs 9.X feature, but a vendor-specific option. So far,
I have not seen it addressed in Visio.

In my situation, the price difference between VEA and other tools (DB/Artisan)
is such that I live with it. You may be able to use regex's in the VS editor to
do what you want.

Kevin

Visio for Enterprise Architect supports up to Oracle 8.x. It is possible
that Visio may generate incorrect syntax for Oracle 9.x.

~~~~~~~~~~~
The information provided is AS-IS with no express warranty.

Chang Oh
Dev Lead
Enterprise Frameworks & Tools
 
C

Chang Oh

I will look into this in more detail and get back to you.

Chnag
Chang Oh
Visual Studio Enterprise Frameworks and Tools

Actually, this is not an 8.X vs 9.X feature, but a vendor-specific option. So far,
I have not seen it addressed in Visio.

In my situation, the price difference between VEA and other tools (DB/Artisan)
is such that I live with it. You may be able to use regex's in the VS editor to
do what you want.

Kevin

Visio for Enterprise Architect supports up to Oracle 8.x. It is possible
that Visio may generate incorrect syntax for Oracle 9.x.

~~~~~~~~~~~
The information provided is AS-IS with no express warranty.

Chang Oh
Dev Lead
Enterprise Frameworks & Tools
 
C

Chang Oh

You can use extended property of the table and indexes to generate many other attributes of the table and index. I have not found a way to generate the desired code that you are looking for. However, the caveat is that you will also get many other attributes by default. Here is an example of the code generated after I set the tablespace information:

-- Create new table TABLE1.
-- TABLE1 : Table of Entity1
-- TABLE1COL1 : Entity1Attr1 identifies Entity1
-- TABLE1COL2 : Entity1Attr2 is of Entity1
-- TABLE1COL3 : Entity1Attr3 is of Entity1
create table TABLE1 (
TABLE1COL1 CHAR(9) not null,
TABLE1COL2 CHAR(1) not null,
TABLE1COL3 CHAR(10) null, constraint TABLE1_PK primary key (TABLE1COL1) )
ORGANIZATION INDEX PCTFREE 10 INITRANS 2 STORAGE ( INITIAL 5 NEXT 5 MINEXTENTS 1 PCTINCREASE 50 FREELISTS 1 BUFFER_POOL DEFAULT ) TABLESPACE IDX01 LOGGING OVERFLOW PCTFREE 10 INITRANS 2 STORAGE ( INITIAL 5 NEXT 5 MINEXTENTS 1 PCTINCREASE 50 FREELISTS 1 BUFFER_POOL DEFAULT ) TABLESPACE IDX01 LOGGING
NOPARALLEL NOCACHE;

-- Add the remaining keys, constraints and indexes for the table TABLE1.
create index TABLE1_IDX1 on TABLE1 (
TABLE1COL2 ASC)
NOPARALLEL PCTFREE 10 INITRANS 2 STORAGE ( INITIAL 5 NEXT 5 MINEXTENTS 1 PCTINCREASE 50 FREELISTS 1 BUFFER_POOL DEFAULT ) TABLESPACE IDX01 LOGGING;

In this code, you will notice that there's a lot of other stuff such as NOPARALLEL PCTFREE...

As long as you make sure that these are set to default values, you can probably ignore these.

To set the tablespace info on an index, go to Index category of the table's property, and then press Options button followed by Edit when you get Index Attributes dialog.

To set the tablespace for a table, go to Extended category of the table's prioerty, and Press Edit button. When you get Extended Table Attributes dialog, select ORGANIZATION HEAP radio button (default), and then Seg Attr button to set the tablespace name.

Chang Oh
Visual Studio Enterprise Frameworks and Tools


I will look into this in more detail and get back to you.

Chnag
Chang Oh
Visual Studio Enterprise Frameworks and Tools

Actually, this is not an 8.X vs 9.X feature, but a vendor-specific option. So far,
I have not seen it addressed in Visio.

In my situation, the price difference between VEA and other tools (DB/Artisan)
is such that I live with it. You may be able to use regex's in the VS editor to
do what you want.

Kevin

Visio for Enterprise Architect supports up to Oracle 8.x. It is possible
that Visio may generate incorrect syntax for Oracle 9.x.

~~~~~~~~~~~
The information provided is AS-IS with no express warranty.

Chang Oh
Dev Lead
Enterprise Frameworks & Tools
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top