Indexes
Toad Data Modeler allows you to design Entity Relationship Diagrams of specific database platforms, convert physical model from one database platform to another, create an ER Diagram directly from your database (Reverse Engineering feature), update physical models, generate DDL/SQL scripts and Change Scripts, create Dictionary Types, Views, Triggers, Functions, generate detailed documentation to your model (in HTML, RTF, PDF, XSLT formats) and much more.
This chapter describes features and functions related to Physical Data Modeling. Look around each section to get the information you need.
|
Note: See the sample physical model Videorental (Oracle 10g db) that is included in the installation package of Toad Data Modeler. Default location is: C:\Program Files (x86)\Quest Software\Toad Data Modeler7.2\Samples. |
Benefits of Physical Data Model
- Detailed definition of database structure, including database specific items, for example:
- Stored procedures
- Functions
- Triggers
- Views
- Materialized views
- Sequences (auto increments) etc.
- Possibility to synchronize local model with existing database.
- Possibility to specify logical names for objects (captions for tables, attributes and other objects).
- Detailed database specific information can be exported to HTML/RTF/PDF or XML/XHTML/CSV reports.
- Automatic generation of SQL code for selected objects (SQL code generation is not available in Logical and Universal Model)
- Automatic migration of PK attributes to child entities (Attributes don't migrate to child entities in Logical Model)
Indexes
To create an index
- Right-click an entity on Workspace and choose Add | Index. The Index Properties dialog opens.
or
- In the Entity Properties form, select the Indexes tab and click Add.
To edit indexes
- In the Entity Properties dialog | Indexes tab, double-click the index or Edit.
|
Above the Object Navigator Dropdown Menu, you can see name of entity that the index belongs to. Click the button on top right-hand corner to open the parent form (Entity Properties form). |
Object Navigator Dropdown Menu |
All indexes of selected entity are listed here. The box allows you to edit indexes quickly and comfortably from one place.
Use buttons to change order of indexes. Use Ctrl + Up to move index upwards or Ctrl + Down to move it downwards. |
General Tab |
Description |
Caption |
Logical attribute name. |
Name |
Physical attribute name. |
Schema |
Schema selection. |
Unique |
Select this option to set the index as unique. Via unique indexes, you can link entities together. See Select Parent Key for Relationship for more information on available linking methods. |
Bitmap Index |
Database dependent item (Oracle). Select this checkbox to define the index as bitmap index. |
Generate |
Select it to generate the index in final SQL (DDL) script. (It is selected by default.) |
|
Note: Other options on the General tab vary according to the database platform you're using. Options specific to your database can be found in the "Databases" chapter. | |
Items Tab |
Option |
Available |
A list of all attributes of the entity. |
Selected |
Attribute(s) that have been assigned to the index. |
Notes Tab |
Tab for notes on the index. |
Index Properties Tab |
Description |
Tablespace |
Select a tablespace or click the button on the right to define a new tablespace. |
Indextype |
Index type definition |
ODCI Parameters |
ODCI parameters definition |
To display indexes on the Workspace
Right-click the WS, select Workspace Format | Entity tab and select the Display Indexes checkbox.
See how indexes are displayed:
|
Note:Even when the indexes are not displayed, you can see which attribute belongs to which index (e.g. attribute Name is assigned to indexes i_name and i_name_address - (IX1,IX2) |
To delete an index
In the Entity Properties dialog select the Indexes tab, choose the index and click Delete.
Check Constraints
Toad Data Modeler allows you to design Entity Relationship Diagrams of specific database platforms, convert physical model from one database platform to another, create an ER Diagram directly from your database (Reverse Engineering feature), update physical models, generate DDL/SQL scripts and Change Scripts, create Dictionary Types, Views, Triggers, Functions, generate detailed documentation to your model (in HTML, RTF, PDF, XSLT formats) and much more.
This chapter describes features and functions related to Physical Data Modeling. Look around each section to get the information you need.
|
Note: See the sample physical model Videorental (Oracle 10g db) that is included in the installation package of Toad Data Modeler. Default location is: C:\Program Files (x86)\Quest Software\Toad Data Modeler7.2\Samples. |
Benefits of Physical Data Model
- Detailed definition of database structure, including database specific items, for example:
- Stored procedures
- Functions
- Triggers
- Views
- Materialized views
- Sequences (auto increments) etc.
- Possibility to synchronize local model with existing database.
- Possibility to specify logical names for objects (captions for tables, attributes and other objects).
- Detailed database specific information can be exported to HTML/RTF/PDF or XML/XHTML/CSV reports.
- Automatic generation of SQL code for selected objects (SQL code generation is not available in Logical and Universal Model)
- Automatic migration of PK attributes to child entities (Attributes don't migrate to child entities in Logical Model)
Check Constraints
Check constraints can be created in the Check Constraints tab in Entity Properties form (for multiple column check constraints) or in the Attribute Properties dialog (for single column check constraint).
To add a check constraint
In Entity Properties form, select the Check Constraints tab and click Add.
To edit a check constraint
In Entity Properties form | Check Constraints tab, double-click the selected check constraint or press Edit .
General Tab |
Description |
Caption |
Logical check constraint name |
Name |
Physical check constraint name |
Check Constraint Rule |
Select rule or click the button on the right to define a new rule. |
Generate |
Select it to generate the check constraint in final SQL (DDL) script (selected by default). |
SQL Tab |
Write SQL script for the check constraint here.
See About Templates for more information. |
Notes Tab |
Space for your notes on the check constraint. |
|
Note:
- To copy a check constraint, press CTRL and drag the constraint over the Check Constraints folder of a target entity in Model Explorer.
- To move a check constraint, drag it over the Check Constraints folder of a target entity in Model Explorer.
- To delete a check constraint, select it and click Delete in the Check Constraints tab of the Entity Properties form.
|