|
|
|
Archive for the ‘Tips & Tricks’ Category
Wednesday, January 13th, 2010
In Toad Data Modeler you can create a logical model (database independent) and physical models specific for every target database platform, for example for Oracle 10g, MS SQL 2008, MySQL 5 etc.
Of course, there are differences between logical and physical models. Logical model is a general model where you can design just a basic structure without regard to database specific items. On the contrary, physical models contain specific items and detailed settings for the selected target database.
Key differences also include the following:
• Inheritance can be modeled only in logical model
• FK attributes don’t migrate to child entities in logical model
Before you start your database development, it is critical to make the right decision and consider if you do want to start with logical model or physical model.
Recommendations:
1. If you do not plan to use inheritance, start with physical model.
2. If you need to define database specific items, like Autoincrement property etc., start with physical model.
3. If you need to create a model for multiple target database platforms, for example one for Oracle and one for MS SQL – you can consider both of the options 1 and 2. You can convert a logical model to two models, one for Oracle and second for MS SQL Server (and others, of course. LER to PER conversion). However, if you start with physical model for Oracle, you can also easily convert the model to MS SQL Server model (PER to PER conversion).
Note: If you are used to defining descriptive names for some objects - physical and logical names for tables, views and other objects, you can also choose physical model. Example: physical name of table is CST. More descriptive name for the same table CST is Customer. Both names can be defined in a physical model in Toad Data Modeler (while in some other database modeling tools it is possible to specify only certain logical information in logical model).
Inheritance in Logical Model
In logical models you can model inheritances. Toad Data Modeler allows you to define three methods of the inheritance conversion. Each of the three options significantly affects the converted physical model. See the examples below
Logical Model:

Inheritance Settings:

Possible Outputs:
A] Single Table

B] N-1 Tables

C] N Tables

As you can see in the example, converted physical models can have one table, two tables or three tables and one ID attribute, two ID attributes or three ID attributes. Inheritance settings affect the final physical model and that’s why FK attributes don’t migrate to child entities in logical model. It doesn’t seem to have a sense to display three ID attributes in logical model when there finally will be only one or two attributes as shown in output B] and C].
Conversion from logical to physical model is not only about conversion of data types and adding logical names to tables and columns. It is a more complicated task. Some other products show FK attributes in child tables in logical models, but such products probably don’t support three methods of conversion from logical to physical models.
New TDM Versions – Logical or Physical?
In the latest BETA version and in future versions of Toad Data Modeler, the following dialog will be shown every time you create a new logical model. We believe it will help you to decide which model to select to start your modeling work.

If you have any questions, please do not hesitate to ask us via the Modeling community forum.
Thank you.
Vaclav + Vladka
Posted in General, Tips & Tricks | No Comments »
Thursday, October 1st, 2009
Hello all,
I’m sure you already know that Toad Data Modeler v. 3.4.x has brought a new feature called Naming Conventions. If you haven’t discovered it yet, I’m sure you at least noticed that Caption and Name boxes have been replaced. This change relates to the naming conventions.
What are the naming conventions in TDM about?
Very briefly, naming conventions allow you to:
- Define your own rules for physical names of objects – e.g. add prefix or suffix to the names, use only lower case etc.
- Synchronize caption (logical name) and name (physical name) of objects of your model.
- Verify whether the physical names of objects match the naming convention rules. If they don’t, you can decide whether to apply them or not.
Note: Naming conventions always influence physical names, NOT captions. Captions (logical names) can be in various forms as they provide logical information only.
If you want to know more, get some examples, see screenshots etc., please read PDF document that is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=3040&categoryID=159
In this article, I want to focus on the following situation:
You reversed your, let’s say, Oracle 10g model to Toad Data Modeler. Now you want to modify logical names of objects (Caption) and leave physical names (Name) unchanged.
How to do it?
Solution: Create a new naming convention and disable the Automatic Synchronization option. Feel free to modify captions then.
Well, this is a solution said in a few words. Now, let me describe what is necessary to do – step by step.
1. Click on any Workspace of the reversed model to activate it.
Just to check out, edit e.g. the T_CUSTOMER entity. Logical name is T_CUSTOMER and physical name is also T_CUSTOMER. As soon as you start editing the caption, you lose the physical name, which is definitely what you don’t want.


Click Cancel in the Entity Properties form.
Now do the following:
2. Click the Set Up Naming Conventions to Model icon on the toolbar.
3. Create a new naming convention (provided that none exists) or click Add New Naming Convention in the Link Naming Convention Definition to Model dialog.
4. Define a name of the new naming convention (Automatic Synchronization OFF) and click OK.
5. Select the new naming convention and press OK+Edit.

6. In the Naming Convention Properties dialog | General tab, clear the Automatic Synchronization checkbox to turn off the automatic synchronization.

7. Confirm OK.
8. Try to edit the entity again. Change its caption now.
You can write a new logical name, the physical name will stay preserved.

And that’s all. It can’t be easier.
Finally, let me draw your attention to:
• The PDF document again:
http://modeling.inside.quest.com/entry.jspa?externalID=3040&categoryID=159
• and also to flash movies on naming conventions:
http://modeling.inside.quest.com/kbcategory.jspa?categoryID=158
Sort the movies by: Title-Descending Order and see movies 35, 36, 37, 38 and 39.
It’s much quicker to watch the movie than read the long document.
If you have any questions on naming conventions, please do ask us via the Modeling community forum.
Have a successful day.
Regards,
Vladka + TDM Team
Posted in General, Tips & Tricks | No Comments »
Thursday, September 3rd, 2009
Hello,
Today we are going to publish the last part of the series comparing the Convertor dialog and new Sync & Convert Wizard. We will write about the alter script generation and model compare + alter report generation, and also mention the Model Update feature.
Generation of Alter Scripts
Generation of alter scripts belongs among the most valuable features for you, Toad Data Modeler users. Our aim was to make it more user-friendly and stable. What improvements can you find?
Look at the two following screenshots. The first one shows the old Convertor dialog, the second one the new Sync & Convert Wizard.
Try to reply to the following questions:
What objects are different, new, missing?
For which objects will the alter script be generated?
How to run the verification process?
Where and how is the information about possible risky operations displayed?


We are sure you can answer the questions with the new Sync & Convert Wizard much more easily.
And another question…
How to generate the CREATE, ALTER and DROP statements in one alter script?
This was a little breakneck thing in the Convertor, wasn’t it… Now it is much clearer in the new wizard.

Flash movie on alter script generation in the new Sync & Convert Wizard is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=3029&categoryID=158
Compare Models and Generate Alter Report
In Convertor it was possible to generate HTML alter report directly. It is the same now. However, in the new Sync & Convert Wizard you can have a clearer overview of the differences. Moreover, for physical models, Toad Data Modeler 3.4 allows you to generate alter reports in the following formats: HTML,RTF and PDF.

Well, these have been all the actions you can perform in the new Sync & Convert Wizard.
There is another feature available in Toad Data Modeler (not in the new wizard) – model update.
Model Update
Model Update (accessible via Model | Model Update) is a feature that allows you to synchronize your existing model with the database. It allows you to connect to a physically existing database and compare your model with the database. During Model Update, after connecting to the database, NO model is loaded and so you are not able to make any modifications before you compare the models. So, use the Model Update feature when you want to update the existing model directly.
Another situation is the following: Let’s say that you want to update your existing model, but you prefer to connect to the database, load the model and make some changes (e.g. remove schema) prior to the comparison.
In this case, firstly you should do reverse engineering – a new model is loaded to Toad Data Modeler. Secondly, do the model merge in the Sync & Convert Wizard.
Convertor versus Sync & Convert Wizard - SUMMARY
The new Sync & Convert Wizard is now more user-friendly, stable, clearer, faster and easier to use and understand.
Unfortunately, the simplification of the GUI has brought some limitations.
1. If you want to perform two actions, e.g. update a model and also generate alter script, you have to use the wizard twice.
2. If you want to compare two models of a different database platform, you have to do model conversion first and then you can compare the two models, now of the same database platform.
3. If you want to compare a logical model with physical model, you have to convert the model to physical (or logical) and then compare two logical or two physical models.
In any case, we prefer a stable and clear wizard with less functions to unstable and complicated Convertor with many functions.
We do hope the new Sync & Convert Wizard helps you to make things faster and easier. Of course, any questions, suggestions and ideas are welcome. Please feel free to write us via our Modeling community forum at http://modeling.inside.quest.com/forumindex.jspa?categoryID=64.
Additional information:
PDF doc on the new Sync & Convert Wizard:
http://modeling.inside.quest.com/entry.jspa?externalID=3039&categoryID=159
Flash movies:
http://modeling.inside.quest.com/kbcategory.jspa?categoryID=158
Have a nice day!
Regards,
Vladka + Vaclav
Posted in General, Tips & Tricks | No Comments »
Wednesday, September 2nd, 2009
Merge Models
Hello,
Today we will compare the model merge functionality.
Convertor
One of the strengths of the old Convertor was the possibility to compare models of two different database platforms. That seemed to be a powerful feature, however, it also brought some confusion.
Questions you probably asked:
How to get changes from a model created for Oracle db and put them to a model for MS SQL Server?
What happens if I define different settings on tabs Settings for Model1 (settings for Oracle in this case) and Settings for Model2 (settings for MS SQL Server) ?
What happens with objects that I did not select on tabs Settings when the objects depend on other objects I selected on tab Models? (E.g. Turn-off domains and try to apply a change in attribute where the domain is used.)

On the screenshot below there are settings for Oracle. The second tab Settings for Model2 contains settings for MS SQL. What happens if I clear checkbox Functions here and leave the checkbox selected on tab Settings for Model2?
Sync & Convert Wizard
The new Sync & Convert Wizard allows you to compare and merge only models of the same database. If you want to compare models Videorental Oracle with Videorental MS SQL Server, you have to convert the Oracle model to MS SQL and then compare two MS SQL Server models. It may seem to be an extra step, however, on the other hand the possibility that you make a mistake during the direct comparison is very low. The direct comparison is surely safer and returns better results, which are of benefit to you all, Toad Data Modeler users.Look at the new GUI. The following screenshot shows the Select Items page of the wizard.
No blue or grey arrows
Clear overview of items that have different properties or exist in the Source Model and are missing in Destination model or vice versa ( see the blue color for the difference, green ‘plus’ icons, or red ‘minus’ icon).
Standard checkboxes for making selection of objects
Details at the bottom of the form

Note: I recommend to watch the following movie explaining the objects and shapes issue during the model merge:
http://modeling.inside.quest.com/entry.jspa?externalID=3055&categoryID=158
In last step you can define if you want to update the Destination Model or if you want to save the changes to a new model.

Summary: Easy to understand GUI with clear overview of items that are different, new or missing.
Tomorrow we will continue, this time comparing the alter script generation functionality.
Regards,
Vladka + Vaclav
Posted in General, Tips & Tricks | No Comments »
Tuesday, September 1st, 2009
Hello,
Today I will show you differences relating to the selection of actions you can perform, and model conversion.
Select Action to Perform
Convertor
Look at the old Convertor dialog. There are icons next to each model – Model 1 and Model 2. Using the icons you define your desired actions. Generation of alter script, model merge, model merge to a new model.

Sync & Convert Wizard
It allows you to select the desired action in first step on page Action.

Model Conversion
Convertor
In the Model 2 combo-box, you could see besides a list of all databases also a list of all currently open models (- what for when you want to convert your model to another database…)
On the right side of the grid – items of Model 2, there were all objects listed with status ‘Not Exists’, which was confusing.
Questions you probably asked:
• What icon should I enable to make model conversion? The Save Merged Model 2 to New Model icon?
• Why do I see all opened models in combo-box next to the Model 2 box. All I need to do is just to convert a model from one db to another and I don’t care about other open models.
• Why are all the objects on right side with status ‘Not Exists’?
• Where do I define name for the final model?

Sync & Convert Wizard
The new Sync & Convert Wizard answers all the questions easily.
In first step you simply select Convert Model to Another Target Database System.
On page Select Left Side you select the model that you want to convert.
On page Select Right Side, you select the target database platform for the model conversion.

On page Settings, you can even select whether database specific items should or should not be commented out. In the past, all objects were commented out automatically, even when doing conversion from Oracle 10g to Oracle 11g. Now the choice is up to you.

When you finally reach the Select Items page, an overview of available objects will be displayed. You will see no blue or grey arrows, no objects on right side with the Not Exists status. Use checkboxes on the left to select individual objects for the conversion. (At the bottom of the wizard, you can see additional information about the highlighted item, incl. Name, Caption and Fullname).

In last step, you can define a new model name.

Summary: Clear and easy to understand GUI without redundant options.
Well, next time we will compare the model merge function.
Regards,
Vladka + Vaclav
Posted in General, Tips & Tricks | No Comments »
Thursday, August 27th, 2009
Hello all Toad Data Modeler users,
As you may have noticed, the new version 3.4.14 has brought a perfectly new wizard – the Sync & Convert Wizard.
This wizard has replaced the Convertor dialog that allowed you to compare and merge models, generate alter scripts and generate alter reports. All these operations are now available in the wizard too, so, this hasn’t changed. However, there are many other significant changes that you have definitely noticed and which, we hope, you like.
In this series, I’d like to compare the new Sync & Convert Wizard with the old Convertor, show you the differences and emphasize the advantages of the changes we made.
Let’s start with two most discussed functionalities that were available in Convertor but are not available in the new wizard.
Convertor
1. It was one dialog (one form) for all the actions.
It might have appeared as advantage but in reality it was a bit different as we learned from your feedback with which we had to agree finally. The Convertor form was not intuitive, but complicated and confusing. Your feedback was clear: You prefer a better GUI to a powerful but hard to understand functionality.
2. Model comparison and merge of different database platform was possible.
Again, it may have sounded like a great thing. The reality was different. There are many differences between databases - different types of objects, constructions that are possible in one database are not possible in another database etc. Unfortunately, via the Convertor form we were not able to care for all the exceptions, which sometimes resulted in inconsistent final model (after model merge).
Your feedback was clear: You prefer a stable and clear solution with less functions to unstable Convertor with many functions.
So, as we always listen to advice and requirements of our users, we have come up with the new Sync & Convert Wizard.
We changed the GUI, partially re-wrote the code that handles generation of alter scripts in order to make this feature more stable, and improved the performance.
The new Sync & Convert wizard is now more user-friendly, clearer, faster and easier to use and understand. However, simplification of the GUI has brought some limitations.
Limitations of the new Sync & Convert Wizard
• If you want to perform two actions, e.g. update a model and also generate alter script, you have to use the wizard twice.
• If you want to compare two models of a different database platform, you have to do model conversion first and then you can compare the two models, now of the same database platform.
• If you want to compare a logical model with physical model, you have to convert the model to physical (or logical) and then compare two logical or two physical models.
We believe that in these cases, it is not a problem to use the available solutions (or workarounds if you want).
At the moment we do not plan to implement the functionality of model comparison of different db platforms back. We definitely agree with you – we’d rather work with a stable and clear wizard with less functions than with unstable and complicated Convertor with many functions.
Next time we will go through standard scenarios and compare the old Convertor dialog with the new Sync & Convert Wizard.
If you have any comments or questions, please do not hesitate to write us – here or post a new thread to the Modeling community forum.
Regards,
Vladka + Vaclav
Posted in General, Tips & Tricks | No Comments »
Thursday, August 14th, 2008
Hello,
Let me close our series on Convertor in Toad Data Modeler with the last part about model conversion - LER to PER and PER to PER model conversion.
The .pdf is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=2152&categoryID=159
Well, I do hope now you can better understand how the Convertor works. If there is anything unclear or if you miss any information, please do not hesitate to write me - post a comment here or write to our Modeling community forum.
Thanks very much.
I look forward to hearing from you.
Regards,
Vladka
Posted in General, Tips & Tricks | No Comments »
Thursday, August 14th, 2008
Hello TDM users,
Today, I’m bringing another part of the series about Convertor. This time, you will see how to update your model (Model 2 ) in Convertor and at the same time generate alter script (for Model 1).
The .pdf document is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=2151&categoryID=159
Any feedback will be greatly appreciated. Thanks in advance.
Regards,
Vladka
Posted in General, Tips & Tricks | No Comments »
Tuesday, August 12th, 2008
Hello,
Our series about Convertor continues. Today, you can learn about how to merge models - Model 1 and Model 2, how to rewrite the existing model or how to merge the two models to a new model.
Same example as in parts on alter script generation has been used.
Please feel free to download the .pdf document from:
http://modeling.inside.quest.com/entry.jspa?externalID=2143&categoryID=159
Next time, you will see how to update your model (Model 2) and generate alter script (for Model 1) at the same time.
Regards,
Vladka
Posted in General, Tips & Tricks | No Comments »
Thursday, August 7th, 2008
Hello,
Today I’ve published the last part about alter script generation in Convertor. In this part, you will see that it is possible to generate alter script for Model 1 and Model 2 at the same time. The PDF document is available at:
http://modeling.inside.quest.com/entry.jspa?externalID=2131&categoryID=159
Just a note: In Toad Data Modeler full v., you can generate alter scripts for Oracle db only. In latest Beta 3.3.1.1, you can also generate alter script for MS SQL 2005 database.
————
In any case, our series about Convertor doesn’t finish. - As you already know, in Convertor you can also perform model merge and model conversion. So, we will continue next week.
If you have any questions, please feel free to write me. Thanks in advance for your feedback.
Regards,
Vladka
Posted in General, Tips & Tricks | No Comments »
|