Attributes
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.
Create Attributes
To create an attribute in LER model
- Double-click an entity on the Workspace to open the Entity Properties form | Attributes tab | Add.
or
- Model Explorer | Entities folder | Unfold the selected entity. | Right-click the Attributes item. | Add Attribute.
Entity Properties attribute columns:
Ident. |
Graphical representation of unique identifier of particular attributes |
Caption |
Logical attribute name |
Name |
Physical attribute name |
Data Type |
Data Type of an attribute |
Mandatory |
The Mandatory selection box |
Status |
Status of Items in Grids |
Buttons:
- opens the Application Variables form
Add - adds an attribute
Edit - opens the Attribute Properties dialog
Delete - deletes selected attribute
- changes position of selected attribute - up and down
Edit Attributes
- In the Entity Properties dialog | Attributes tab, double-click the selected attribute.
or
- Find the attribute in Model Explorer | EntityName folder | Attributes | Double-click the selected attribute.
|
Above the Object Navigator Dropdown Menu, you can see name of entity that the attribute belongs to. Click the button on top right-hand corner to open the parent form (Entity Properties form). |
Object Navigator Dropdown Menu |
All attributes of selected entity are listed here. The box allows you to edit attributes quickly and comfortably from one place. |
General Tab |
Description |
Caption |
Logical attribute name. |
Name |
Physical attribute name. |
Data Type |
Data Type selection box. |
Domain |
Domain selection box.
|
Note: It's not possible to assign a data type and a domain to an attribute at the same time. If you select a domain, appropriate data type will be set automatically from the domain. | |
Default Rule |
Default selection box. Defaults are converted to physical model also. |
Logical Only |
Select this checkbox to not convert the attribute to physical model during LER to PER conversion. |
Mandatory |
Mandatory items will be converted to Not Null items in physical model. |
Rules Tab |
A tab where you assign rules to the attribute. Rules are used for the generation of Rules in physical model and later for Check Constraints in the generated SQL code (generated from physical model). In Rules, check constraints for multiple columns can be defined, for example. |
Valid Values Tab |
Valid values can be defined for the following data types:
- Bigint
- Float
- Integer
- Char
- VarChar
Valid values are used for generation of simple check constraints.
Valid values can be defined as Enumeration (for VarChar data type, for Example) or as a Range (for Integer data type.)
As soon as you add a new Enumeration, the in-place editor in the Enumeration box will activate automatically.
|
Note: In Toad Data Modeler, valid values in LER model = check constraints in PER model (feel free to check out the conversion).
If the Valid Values tab is not available (depends on the selected data type), you can use rules (see the Rules tab). | |
Description Tab |
You can enter the object description here. |
To Do Tab |
You can enter To Do tasks related to the object here.
|
Note: To display all To Do tasks, select To Do from Model menu. | |
Unique Identifiers
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.