Toad World® Forums

Autoincremente and Secuences - Mysql and Oracle


#1

I usually use Mysql and Oracle. I would like to make a logical model and export to mysql physical and oracle physical model. The thing is that I dont know how to define an autoincrement field in mysql and oracle (sequence)

Do you know how can I do this?


#2

Hi,

please read the following blog post.

http://blogs.inside.quest.com/modeling/2010/01/13/model-type-selection-and-why-fks-don%e2%80%99t-migrate-to-child-entities-in-logical-model/

It explains when it’s good to start with physical model and when it’s better to start with logical model. If you wish to work with autoincrements/sequences (and have no interest in inheritances), maybe it would be better to start with physical model and then convert model for Oracle to model for MySQL.

Automatic conversion between autoincrements and sequences is not available.

Regards,

Vaclav

Message was edited by: modelingadmin


#3

Well the thing is that i dont know if i am going to use inheritance in the future. So I like to be ready for the future. On other hand, I have been working directly in a physical model for mysql, but when I have tried to convert it to a Oragle 10g, it doesnt work well at all. In some cases the migration of FK sometimes migrate as a PFK when they shouldnt.

If I create the logical model and after that I generate the physical model for Mysql and Oracle, it generate the physical in the right way, but the thing is that I need to define autoincrement or secuence in Logicalmodel in the same way that this is possible with other tools like PowerDesigner.


#4

Hi,

I have been working directly in a physical model for mysql, but when I have tried to convert it to a Oragle 10g, it doesnt work well at all. In some cases the migration of FK sometimes migrate as a PFK when they shouldnt.

Please write us more details - in which cases it occurs, pls send us an example, screenshot etc. The conversion should work fine. Thanks.

…but the thing is that I need to define autoincrement or secuence in Logicalmodel…

We’re sorry, these are physical properties that shouldn’t appear in logical model.

In any case, please write us details about the problem during PER to PER conversion. We will verify it.
Thanks a lot.

Regards,

Vladka + TDM Team