Toad World® Forums

Comparison Merge Documentation


#1

Is there any documentation on how not only to compare two data models, but to compare a data model with an actual database, and then either update the database to match the model or update the model to match the database?

I figured out how to reverse engineer an actual database and compare it to a model, but I want to apply the differences to the actual database.

I tried to do this with Postgres 8.1 but while it looks like it is doing something, I can’t get it to generate any code… even though a window opens up at the end.

And I can’t find any documentation to tell me if I am doing it right.


#2

Hi Bill,

For the time being, there isn’t any documentation on this. However, we’re working on it.

I figured out how to reverse engineer an actual database and compare it to a model, but I want to apply the differences to the actual database.

I’m not quite sure if you mean model update or forward engineering. Anyway, concerning the synchronization available in TDM 3, see the info below:

  • Model Update:
    Description: You have reverse engineered a db (model in TDM 3 has been created). Then you’ve made changes in your database. Now you need to update the TDM 3 model. -> See Model menu | Model Update. In fact, this function consists of reverse engineering process and model merge (Convertor dialog will open).

  • Alter scripts generation:
    Description: You have made some changes in TDM 3 model and need to generate the ‘change’ script. -> See Model menu | Alter Scripting, Merge Models…
    Now you need to apply the changes in your database (forward engineering). - Toad Data Modeler has no feature for this. You need to use a third party software to run the script in the db. (Oracle users can use e.g. Toad for Oracle, which will be integrated with TDM 3 in future.)

  • other (that are or will be available): PER models merge and conversion, LER models merge, LER model update (PER to LER conversion), LER to PER conversion.

All this is executable in the Convertor dialog.

If you need more details (e.g. how to generate alter script in Convertor), please feel free to write me back. Thanks.

Regards,

Vladka


#3

Ok Vladka,
I attached pictures to help clarify my question. The are in open office ‘draw’ format.

I have a database/model called Portal Database. It has 50 tables and other objects in the specific schema for this model. (In the picture it is the model on the left… .even though I didn’t expand the tree, it does have tables.) I created a new schema and populated it with a couple of tables etc. I reverse engineered the new schema… the model is called Postgres8.1 in the picture. Now I want to generate the scripts that can update the new model’s physical implementation (I want to update the new database). So what buttons do I push etc.?

If button one is NOT selected (see diagram) and button two IS selected and I press execute it works a while then opens up a text window with no code. If I do the opposite, button 1 IS selected, button 2 is NOT selected, I get the same behaviour. See ‘nothing happens doc’. Also, never mind the state of the buttons in the diagram first diagram… I used the dialogue just to point out the buttons. :slight_smile:

What am I doing wrong?
nothing happens.odg (85.9 KB)


#4

Ok Vladka,
I attached pictures to help clarify my question. The are in open office ‘draw’ format.

I have a database/model called Portal Database. It has 50 tables and other objects in the specific schema for this model. (In the picture it is the model on the left… .even though I didn’t expand the tree, it does have tables.) I created a new schema and populated it with a couple of tables etc. I reverse engineered the new schema… the model is called Postgres8.1 in the picture. Now I want to generate the scripts that can update the new model’s physical implementation (I want to update the new database). So what buttons do I push etc.?

If button one is NOT selected (see diagram) and button two IS selected and I press execute it works a while then opens up a text window with no code. If I do the opposite, button 1 IS selected, button 2 is NOT selected, I get the same behaviour. See ‘nothing happens doc’. Also, never mind the state of the buttons in the diagram first diagram… I used the dialogue just to point out the buttons. :slight_smile:

What am I doing wrong?
how_do_i_update_model_question_example.odg (95.5 KB)


#5

Oops! Bill, I’m very sorry. I’ve forgotten to tell you information - the most important for you now. - Alter scripts generation is supported only for Oracle models. For other databases, it will be supported gradually.

In any case, it’s confusing that the option is available for all dbs… We will see if it’s possible to disable the button for other db systems or at least display a message in the Convertor to inform users.

Let me apologize.

Regards,

Vladka


#6

okie doke… thanks for the info… talk to you in another 1.5 months. this was the only really important feature for me for version 3. I do understand the Oracle is the most important database to support for Quest since this is where they made all their money.

Thanks again, that really was helpful info. :-/