Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customizing Datatype Merging 1

Status
Not open for further replies.

dianab

IS-IT--Management
Aug 27, 2001
1
0
0
US
I would like to know if the following can be done with PowerDesigner. I have a
Oracle database and a DB2 UDB database. I would like to have two physical
databases (one for each RDBMS) and one logical database. I would make
changes in the Oracle physical model, merge those into the logical model and then
merge that into the DB2 physical model.

My problem is this. I have defined that a NUMBER with a precision less than 4
is to be considered a SMALLINT in DB2, 4-9 is considered a INT and 10-19 is
considered a BIGINT.

Knowing that PowerDesigner has open source for how data types map, I would
like to map the datatypes as above. When I try this it does not seem to take the
precision into account when the merge occurs. Can anyone confirm this? Can
what I'm trying to do be done? We are in the evaluation stages right now so I
have no support yet from Sybase.
 
Hello Dianab.


One method to acheive the result you desire is through Domains. These can be thought of as global 'types'. If you want to repeatedly use the same type throught e.g you have a firstname column that is char(30) and you have the same column type repeated on several tables. Instead of giving each instance of firstname its own type. Simply define a domain by going to Model -> Domain -> Add a row. Then add the name of the row you want , click apply and go into the properties for the domain you want.

I would create my own datatype 'smallint' by going to other in list of standard data types. You can then add your own precision and length. Then for the columns using this datatype go in to the properties screen and change the domain to 'smallint' or whatever it is. The re-use the domain through the DB2 physical model. Do the same for the oracle PDM and preserve changes when merging. This should let you customize your own datatypes and preserve the differences between databases.

One massive benefit from this approach, If you need to change the type mereley change the domain type and all the columns using this domain will have there type changed to the new one.

This is very useful for preserving type integrity in large models.

HTH

Justin

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top