Iteration workflow "how to" question

Hi,
I would like to get an expert opinion on how to work with TDM in the following workflow.
Let’s say I start with a complete physical model of the DB (reverse engineered). At one point, I change the model (this is common during development). So, I want to create a SQL script to migrate/alter the DB for that change.
At the time of releasing, I want to generate a script to migrate my production databases to the new model.
I have a general idea of how I could proceed, but I really would like to know what is the best way to achieve this.
Thanks,

gabriel

Hello Gabriel,

Let me reply to your question.

Let's say I start with a complete physical model of the DB (reverse engineered). At one point, I change the model (this is common during development). So, I want to create a SQL script to migrate/alter the DB for that change.

After RE a new model is created. After you make changes in the model, you will generate alter script via the Sync & Convert Wizard.
Flash movie:
http://modeling.inside.quest.com/entry.jspa?externalID=3029&categoryID=158

Then use a third party software to run the script (for Oracle databse e.g. Toad for Oracle).

Unfortunately, I'm not quite sure about this (I apologize for my English):

At the time of releasing, I want to generate a script to migrate my production databases to the new model.

Do you want to generate the script in TDM? What kind of script? Do you mean standard RE and SQL/DDL script generation for the reversed model?

I can imagine the following scenario: You updated your database (ran the alter script generated by TDM). So, now the database and model in TDM are identical. Then you make some modifications in the database and need to update the existing model in TDM. In this case, you can:
a) use the Model Update feature (Model | Model Update)
b) do the RE again - a new model will be created - and then compare and merge the models. This allows you to merge either to the existing model or to a new model. For the model, you can generate SQL/DDL script. -> Is this what you want?
Flash movie on model merge:
http://modeling.inside.quest.com/entry.jspa?externalID=3028&categoryID=158
http://modeling.inside.quest.com/entry.jspa?externalID=3055&categoryID=158

If not, please write me more details. Thanks a lot.

Regards,

Vladka

Thanks for your reply. I’ll try to explain my scenario a bit better.

1- Use TDM to reverse engineer the database.
2- From now on, I require my team to do all modifications to the model using TDM.
3- When the model (in TDM) meets the requirements, we need to create the alter script that will be run on the DBMS to update it.

I mainly want to work one-way: TDM to DBMS (except for the original TDM model creation which is done with reverse engineering). I want to avoid my team to do modifications on the DBMS directly. The TDM project should be the master, like the source code of an application. And the alter script like an “incremental build”.

Does that make more sense? How can we do this efficiently with TDM?
I am also trying DeZing For DB. The application automatically saves a “version” when a “alter database” is done, and an “alter” can be generated for any 2 “version”.
Thanks

gabriel

Hello Gabriel,

Thanks for your reply. Now it is clear.

What we suggest:

  1. Perform reverse engineering - the model is created in Toad Data Modeler.
  2. Back up this model version (Original Model) - either to Version Manager or simply to disc.
  3. Make modifications in the model.
  4. Compare the actual version with Original Model and generate alter script.
  5. Run the alter script via a third party software.
  6. Back up the actual version as Original Model now and continue with step 3.

Version Manager in TDM allows you to keep list of versions of the model. You can compare any versions of the model and generate alter script for them. Just one thing: As we’ve just found out, the new Sync & Convert Wizard doesn’t display the version number when you select the Left and Right Model in the wizard, which needs to be fixed. We will work on this. CR # 67 031.

Movie on Version Manager:
http://modeling.inside.quest.com/entry.jspa?externalID=1697&categoryID=281
Also, please have a look at Help file and User Guide for more information.

If you have more questions, please write me back. Thanks.

Regards,

Vladka + TDM Team

Thanks a lot. That is mostly what I figured out, but I wanted the advice of an expert.

That being said, I would like to clarify the bug you entered in your internal database.
If I understand it well, in the “Sync & Convert Wizard” -> “Generate Alter Script”, the available model combo boxes for the “Model 1” et “Model 2” should show the versions saved to the “Version Manager”?

If that is the case, it would be awesome.

gabriel

Hi,

If I understand it well, in the "Sync & Convert Wizard" -> "Generate Alter Script", the available model combo boxes for the "Model 1" et "Model 2" should show the versions saved to the "Version Manager"?

Yes, that's it. Let's say the versions are checked out. You open the wizard and need to select one version as Model 1 and another version as Model 2. The version number should be there (e.g. Videorental 1.0, Videorental 1.1 etc.). Now it shows only model name (Videorental, Videorental). So, it's unclear.
Previous Convertor dialog had this feature. We simply forgot to implement the same thing to the new Sync & Convert Wizard. Anyway, we will fix it.

Thanks.

Regards,

Vladka