Rules
Toad Data Modeler allows you to design and maintain a logical model giving a complete picture of the business area. Logical model is independent of the database platform and is much simpler than physical model. It uses objects such as inheritance, valid values or M:N relationships. From the Logical ER (LER) diagram, you can build a Physical ER (PER) diagram of the selected database platform (LER to PER conversion).
|
Note:
- This topic contains information on objects and functions that are specific for logical modeling. General information and other features applicable in Logical model as well as in Physical model are contained and described in other sections of this Help file. See e.g. the "Model Objects" chapter, "Model Explorer" topic etc.
- See the sample logical model Employee that is included in the installation package for Toad Data Modeler. Default location is: C:\Program Files\Quest Software\Toad Data Modeler\Samples.
|
To create a logical model
Select File | New | Model |Logical Data Model tab.
Benefits of Logical Data Model
Logical Data Model allows you to model inheritances in entity relationship diagrams. Universal Data Model and Physical Data Model do not support this feature.
Specifics of Logical Data Model
- There are three methods how inheritance can be resolved when converting to physical model.
- Attributes do not migrate to child entities.
- It is not possible to define database specific items in Logical Model, for example sequences/autoincrements etc.
- You can define Valid Values in logical model (will be converted to physical model).
Benefits of Super and Sub Types
In Logical Model you can define database structure in various ways. See the pictures below. Both of them show a structure modeled in Logical Model and both the models will result in the identical output when converted to Physical Model. The difference is that Model A uses Super and Sub Types while Model B doesn't use inheritance at all.
Model A - Utilizing Super and Sub Types
Model B - Lacking Super and Sub Types
This example shows:
- That you can create logical models in different ways and achieve the same result after conversion to physical model.
- That you can be more productive when using inheritance. For example, you only need to change the Last Name attribute once in the first model. Without using inheritance in model B, you have to change it four times.
- How much “readable” the first model is compared to the second one.
- How important is to select appropriate inheritance resolution when converting your logical model to physical.
- That creating logical models without inheritance has minimal benefits compared to using inheritance.
Disadvantage
The main disadvantage of logical modeling is that direct synchronization with existing database is not possible. Only physical models of specific database platforms and versions may be synchronized with an existing database. Therefore, if you want to synchronize your logical model, you need to convert it to the physical model first.
Rules
To add a rule
Select Model | Model Items |Rules and click Add in the Rules dialog.
To edit a rule
Select Model |Model Items | Rules and double-click the selected rule or click Edit.
|
Note: You can also edit/rename/delete rules in Model Explorer | Rules folder | Right-click the selected rule.
|
To select a rule for attributes
- Open the Attribute Properties dialog of the selected attribute | Rules tab.
- Select a rule and click the Add arrow button.
|
Note: You can define rules for domains too. |
Working with Model Objects
There are three types of models in Toad Data Modeler:
Model Properties
Select Model | Properties.
General |
General information on the model (project, model, author, company, version etc.) |
Before Script |
Whatever you write on the Before Script tab, it will be generated before the generated SQL code. |
After Script |
Whatever you write on the After Script tab, it will be generated after the generated SQL code. |
Description |
Notes on the model |
Naming Convention |
Here you can select a naming convention for the model. |
Database Parameters |
The value in the Length Semantics box shows which default length semantics (BYTE or CHAR) was set in the database for reverse engineering of Oracle database.
|
Note: This tab is available only in Oracle models. | |
Naming Convention |
Here you can link or unlink a naming convention to/from your model.
Manage Naming Conventions - Opens the Naming Convention dialog (available also from the Tools menu)
Edit Naming Convention - Opens the Naming Convention Properties dialog. |
Model Statistics
To display details on your model, its Workspaces, objects etc.
Select Model | Statistic....
To change some of the General Information (e.g. model name, author or company)
Select Model | Properties....
|
TIP: You can also change it via the shortcut of Stamp on the Workspace - just double-click the Stamp. |
Add Objects
Toad Data Modeler allows you to add objects from multiple places. See the following options:
To add an object on Workspace
- Click the object icon on the toolbar, e.g. for entity
- Click anywhere on the workspace to add the object.
or
- In Objects Menu | Add New select the object you want to add to Workspace
- Click anywhere on the workspace to add the object
|
TIP: You can also use hot keys to add some objects, e.g. CTRL+E for entity, CTRL+I for inheritance. See Hot Keys for more information. |
To add multiple objects to Workspace
- Press SHIFT and click the object icon on toolbar.
- Click on workspace as many times as many objects you need to add.
- Right-click the work area (or click the object icon again) to turn this function off.
To add objects to Model Explorer
- Find the object group in Model Explorer (e.g. Entities) | right-click and select Add (e.g. Add Entity).
To add objects from Model menu
- Select Model | Model Items | and the object type (e.g. Entities).
- In following dialog click the Add button.