Materialized Views
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.3\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)
Materialized Views
Materialized Views are supported in the following databases: Oracle, DB 2, DB2 zOS, , Sybase SQL Anywhere 11, Teradata 13.
Toad Data Modeler allows you to display materialized views graphically in your ER diagram.
To add a materialized view
Click
on the toolbar and then click anywhere on the work area.
or
Model Explorer | Right-click the Materialized Views folder | Add Materialized View.
To edit a materialized view
Double-click the materialized view on the Workspace.
or
Edit the materialized view in Model Explorer | Materialized Views folder | double-click the selected materialized view (or right-click | Edit).
Object Navigator Box |
All materialized views of your model are listed here. The combo-box allows you to edit them, one by one from one place. Use Apply to confirm all the changes you make. |
General Tab |
Description |
Caption |
Logical materialized view name |
Name |
Physical materialized view name |
Schema |
Schema selection box |
Categories |
Category selection box |
Generate |
Select it to generate the materialized view in final SQL (DDL) script. |
Generate SQL only |
Select it to generate only the SQL code written on tab SQL. The rest of items will be ignored. |
SQL Tab |
Write SQL code of materialized view subquery on this tab.
About Templates |
Permissions Tab |
Here you can assign Users or User Groups permissions to the materialized view. |
To Do Tab |
On this tab, you can write some tasks on the selected materialized view.
![](/es-es/technical-documents/image/b355bc67-8747-41c3-ad58-a7728359e0dd)
|
Note: To see all To Do tasks, select Model | To Do. | |
Before Script Tab |
Whatever you write here, it will be generated before the materialized view definition. |
After Script Tab |
Whatever you write here, it will be generated after the materialized view definition. |
Notes Tab |
Tab for notes on particular materialized view. The text written here will display in a pop up dialog when you point your mouse cursor at the materialized view shortcut in your ER diagram. |
SQL Preview Tab |
Click at the bottom of this tab to see the part of SQL code for the materialized view. |
Refresh Tab |
Use this tab to specify the default methods, modes and times for the database to refresh the materialized view. |
Physical Properties Tab |
Define storage characteristics of materialized view on this tab. |
Materialized Views Properties Tab |
Define other materialized view characteristics on this tab. |
Create Index Tab |
Create index sentences are written on this tab. |
Procedures
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.3\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)
Procedures
To add a procedure
Right-click the Procedures item in Model Explorer | Add Procedure.
To edit a procedure
Double-click the selected procedure in Model Explorer | Procedures (or right-click Edit).
Example: The Procedure Properties dialog (Oracle 10g)
General Tab |
Description |
Caption |
Logical procedure name |
Name |
Physical procedure name |
Schema |
Schema selection box |
Procedure Arguments |
Define procedure arguments here. |
Invoker Rights |
Database dependent option. See particular database reference for more information. |
Definition is Wrapped |
Database dependent option. See particular database reference for more information. |
Generate |
Select it to generate the procedure in final SQL (DDL) script. |
Generate SQL only |
Select it to generate only the SQL code written on tab SQL. The rest of items will be ignored. |
SQL Tab |
SQL code. (See the example in the following screenshot.)
About Templates |
Permissions Tab |
On this tab, you can manage permissions to particular procedure. |
To Do Tab |
Here you can write some tasks on the selected procedure.
Note: To see all To Do tasks, select Model | To Do. |
Before Script Tab |
Whatever you write here, it will be generated before the Store Procedure definition. |
After Script Tab |
Whatever you write here, it will be generated after the Store Procedure definition. |
Notes Tab |
Tab for notes on particular procedure. |
Example: The Procedure Properties dialog | SQL tab (Oracle 10g)
![](/es-es/technical-documents/image/cddfea85-65e8-4bdd-968b-f28e79cc8d48)
Compare Procedures in Sync & Convert Wizard
When the Sync & Convert Wizard shows differences between procedures (on page Select Items), you can double-click the SQL item of procedures to display details about differences between them.