Documente Academic
Documente Profesional
Documente Cultură
0
User Guide
Copyright
2013 Quest Software, Inc.
ALL RIGHTS RESERVED.
This guide contains proprietary information protected by copyright. The software described in
this guide is furnished under a software license or nondisclosure agreement. This software may be
used or copied only in accordance with the terms of the applicable agreement. No part of this
guide may be reproduced or transmitted in any form or by any means, electronic or mechanical,
including photocopying and recording for any purpose other than the purchasers personal use
without the written permission of Quest Software, Inc.
The information in this document is provided in connection with Quest products. No license,
express or implied, by estoppel or otherwise, to any intellectual property right is granted by this
document or in connection with the sale of Quest products. EXCEPT AS SET FORTH IN
QUEST'S TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE AGREEMENT FOR
THIS PRODUCT, QUEST ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS
ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL QUEST BE LIABLE FOR ANY DIRECT,
INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS
INTERRUPTION OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR
INABILITY TO USE THIS DOCUMENT, EVEN IF QUEST HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. Quest makes no representations or warranties with respect
to the accuracy or completeness of the contents of this document and reserves the right to make
changes to specifications and product descriptions at any time without notice. Quest does not
make any commitment to update the information contained in this document.
If you have any questions regarding your potential use of this material, contact:
Quest Software World Headquarters
LEGAL Dept
5 Polaris Way
Aliso Viejo, CA 92656
email: legal@quest.com
Refer to our Web site (www.quest.com) for regional and international office information.
Trademarks
Quest, Quest Software, the Quest Software logo, Toad, T.O.A.D., Toad World are trademarks and
registered trademarks of Quest Software, Inc in the United States of America and other countries.
For a complete list of Quest Softwares trademarks, please see
http://www.quest.com/legal/trademark-information.aspx. Other trademarks and registered
trademarks are property of their respective owners.
Table of Contents
Copyright
Introduction to Toad Data Modeler
About Toad Data Modeler
2
17
17
17
Benefits
17
Key Features
18
Technical Requirements
18
19
General
19
23
Connections
26
Reverse Engineering
26
Workspace
27
Database Specific
27
28
28
Additional Resources
28
Supported Databases
29
User Interface
Interface Layout
32
32
32
Application View
33
Application Window
38
39
Docking
42
Hot Keys
43
Table of Contents
Inplace Editor
46
47
Menus
48
File Menu
48
Edit Menu
49
View Menu
50
Objects Menu
51
Layout Menu
51
Model Menu
52
Tools Menu
53
Macros Menu
53
55
Settings Menu
55
Window Menu
56
Help Menu
56
Models
57
57
57
60
Model Objects
60
79
Note Shortcuts
80
82
82
83
83
84
Entity List
88
Table of Contents
Buttons:
93
94
94
94
95
Other Notes
96
Buttons:
105
Manual Order
111
Automatic Order
112
112
113
C. In Model Explorer
114
Other Notes
114
114
115
C. In Model Explorer
115
118
118
Linking Method
121
127
127
128
Automatic FK Mapping
Add Permissions
130
138
Domains
154
154
Table of Contents
Dictionary Types
154
154
IE Notation
155
Cardinality
155
IDF1X Notation
157
Cardinality
157
Relationship Types
158
Identifying Relationship
158
Non-identifying Relationship
159
Non-identifying Self-relationship
159
M:N Relationship
160
Identifying Relationship
160
Non-Identifying Relationship
161
161
162
M:N Relationship
162
Buttons:
168
Straight Mode
171
173
173
173
174
174
190
196
200
201
Table of Contents
213
PFK
219
FK
219
Automatic FK Mapping
220
288
288
Buttons:
298
313
314
314
Reports
319
Report Generation
319
329
Graphics
333
Autolayout
333
Align Objects
335
335
336
337
Categories
339
Change Notation
342
343
Display Modes
346
348
349
350
351
351
Table of Contents
Tools
352
Refactoring Utility
352
Schema/Owner/Database Assignment
353
Naming Conventions
354
Infer Relationships
371
373
Features
374
Application Variables
374
379
Categories
381
Find
384
Gallery
386
Message Explorer
389
Model Explorer
391
Model Properties
397
Model Statistics
399
Modeless Dialogs/Forms
399
402
Object Viewer
404
406
Quick Search
410
Find
414
Search Items
416
To Do List
418
420
421
Conversion
Data Type Conversion Settings
422
422
Table of Contents
425
428
Convert Model
431
434
Synchronization
435
Synchronization
435
438
Alter Scripts
443
Model Update
451
Model Compare
455
Model Merge
457
464
Options
464
Default Values
470
Templates
473
Dictionaries
483
File Extensions
483
Version Control
488
Subversion
488
Version Manager
502
514
514
Rename
515
515
516
520
522
522
10
Table of Contents
Package Explorer
527
Script Explorer
531
Script Editor
535
537
Internal Scripting
539
Scripting Window
541
543
Customization - Sample
551
586
Macros
593
Metamodel
621
Script Samples
631
Automation
639
650
650
652
653
653
656
656
Databases
658
Supported Databases
658
661
661
667
667
DB2 v. 9 (LUW)
Specifics - DB2 v. 9 (LUW)
668
668
11
Table of Contents
678
679
681
681
685
685
686
686
692
693
694
694
694
DB2 z/OS v. 9
697
697
699
712
DB2z-OS v.10
713
713
713
714
Greenplum 4.1
728
728
734
735
Greenplum 4.2
739
739
739
12
Table of Contents
Ingres
740
740
741
745
746
746
747
747
747
751
757
Specifics - MicrosoftSQLAzure
757
774
775
775
776
777
779
779
798
799
801
801
806
818
819
821
821
13
Table of Contents
821
824
MySQL 5.0
831
831
832
837
MySQL 5.1
838
838
839
842
MySQL 5.5
843
843
843
848
848
Oracle 9i
848
848
Specifics - Oracle 9i
849
849
Oracle 10g
850
850
853
861
863
883
883
884
885
14
Table of Contents
889
889
891
894
PostgreSQL 8.1
898
898
898
899
PostgreSQL 8.2
899
899
903
914
PostgreSQL 8.3
915
915
917
921
PostgreSQL 8.4
922
922
922
929
929
929
Entity
930
Key Properties
931
Trigger
932
932
933
934
15
Table of Contents
PostgreSQL 9.1
937
937
940
941
PostgreSQL 9.2
951
951
951
956
956
SQLite 3.7
959
959
961
964
975
975
976
976
Sybase ASE 15
977
977
990
990
990
990
991
992
998
998
999
16
Table of Contents
Sybase IQ 15.2
1000
1004
1004
1007
1009
1020
1020
1022
1029
1042
Teradata 13
1044
1044
1045
Specifics - Teradata 13
1049
1059
1060
1060
1060
1060
1061
Index
1061
1062
1
Introduction to Toad Data Modeler
About Toad Data Modeler
Toad Data Modeler helps organizations create, maintain and document their database systems
with an easy-to-use graphical interface into new or existing database structures.
Create database structures visually (Logical, Universal and Physical Entity Relationship
Diagrams - ERD).
Create ERD for various target database systems (Oracle Database, Microsoft SQL Server,
DB2, MySQL, PostgreSQL etc., see Supported Databases (page 658)).
Reverse engineer already existing database structures and see the existing database
structure in a form of a diagram.
Add logical data to your diagrams and describe existing database structures better.
Verify model, get a list of Errors, Warnings and Hints and use Quick Fixes to
correct issues.
Synchronize a model with physically existing database (using Alter Script Generation and
Model Merge features) and much more.
Benefits
Toad Data Modeler allows you to:
l
Visualize your database structures and get better understanding of your existing databases
18
Key Features
l
Physical Model, Universal Model (Generic Relational Model) and Logical Model
Reverse Engineering
Version Control System (support for Apache Subversion) and Internal Version Manager
Model Verification
Autolayout
Refactoring Utility
Automation
Undo/Redo
To-Do List
Technical Requirements
Minimal
Optimal
Platform
Pentium
Memory
512 MB
4 GB
200 MB
400 MB
Operating System
19
General improvements
o
User Interface
Performance
PostgreSQL 9.2
Connections
Reverse Engineering
Workspace
Database Specific
Oracle 11g R2
General
User Interface Improvements
Main Menu
Main Menu has been considerably reviewed in order to provide users with the most logical and
comfortable management and workflow.
Toolbars
All Toolbars have been reviewed and new items have been added.
Layout Menu:
Hide Captions
Designer
20
New pop-up menu Add - allows adding attributes, keys, indexes, unique identifiers (options
available are based on model type - LER/PER)
On a selected attribute
l
Click - nothing
21
Using keypads
l
Foreign Keys
Foreign Keys can be deleted directly in the Attributes pane of the Entity Properties form.
New function Infer Relationships available in Tools menu.
22
23
Performance
Improvements made in performance of Toad Data Modeler. This is connected with several
other new implementations and fixes mentioned further bellow (e.g. several improvements were
implemented in convertor).
Further, performance when starting Toad Data Modeler and when opening/processing data
models has been improved. Option to save models in binary file format TBP was added
recommended for larger models (several hundreds or thousands of attributes, entities...).
24
reverse engineering
reports
Functions
l
Indexes
l
reverse engineering
reports
Aggregate
Sequences
Rewrite Rules
Resource Queue
(Trusted) Protocol
Filespace
Dictionary Type/Domain
Entity
o
Attribute
External Table
Function
Entities
o
Attributes
o
Functions - Secured checkbox on Function Parameters pane added for function types
External Scalar, External Table, OLE DB, SQL
25
26
Trigger - Trigger event allows OR option, set for generating SQL script in Extended
Value, option Create or Replace
Connections
Connections dialog was considerably redesigned to provide easy way to manage your database
connections.
Reverse Engineering
Changes were made in RE Wizard to simplify workflow (Stored Connections pane, Select Data
Migrator pane removed, Options pane).
Option Infer Relationships added.
27
Workspace
New Workspace Properties dialog - Workspace Properties Edit dialog merged with Members
dialog (Add Selected Objects to Workspace) to provide easier, logical management of objects
in the workspace. Both the already added objects (selected checkbox in the left-most column) as
well as the other model objects are displayed on the Members pane of the dialog. Objects can be
easily filtered using advanced filtering/search methods.
Database Specific
Oracle 11g R2
View Trigger in Oracle 11g R2 has been updated with missing features.
l
Column List
When Condition
The new options are enabled based on the type of the trigger (Trigger Fire option selected).
Microsoft SQL Server
Support for Windows Authentication added for Native database connection.
Related topics:
Options
Supported Databases
Script Generation
Additional Resources
For additional resources about Toad Data Modeler, click the following links to view the:
28
29
Sample models
Sample scripts
User packages
XSL templates
Supported Databases
Supported Database
System
DB2 z/OS v. 10
DB2 z/OS v. 9
DB2 v. 10.1 (LUW)
DB2 v. 9.7 (LUW)
DB2 v. 9.5 (LUW)
DB2 v. 9 (LUW)
DB2 UDB v. 8
(LUW)
Greenplum 4.1
Greenplum 4.2
Ingres 10.0
Ingres 9.3
Microsoft Access
2007/2010
Microsoft Access
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
30
Supported Database
System
2000-2003
MicrosoftSQLAzure
Microsoft SQL
Server 2012
Microsoft SQL
Server 2008
Microsoft SQL
Server 2005
Microsoft SQL
Server 2000
MySQL 5.5
MySQL 5.1
MySQL 5.0
Oracle 11g R2
Oracle 11g R1
Oracle 10g
Oracle 9i
PostgreSQL 9.2
PostgreSQL 9.1
PostgreSQL 9.0
PostgreSQL 8.4
PostgreSQL 8.3
PostgreSQL 8.2
PostgreSQL 8.1
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
31
Supported Database
System
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
SQLite 3.7
Sybase ASE 15.7
Sybase ASE 15.5
Sybase ASE 15
Sybase ASE 12.5
Sybase IQ 15.2
Sybase SQL
Anywhere 11
Teradata 13
Other databases
(Universal Model)
Learn details (reverse engineering, specifics, script generation etc.) about your particular database
version in chapter "Databases".
Support for latest versions of other database systems will be added to the product gradually.
Note: Toad Data Modeler includes also support of Universal DB/ANSI Models. See "Universal
DB/ANSI Model" (page 262) for more information.
32
User Interface
User Interface
Interface Layout
Toad Data Modeler Application Layout
Simple and Minimalist Layout
Layout of Toad Data Modelercan be both simple and complex. Various panes can be docked on
left side, right side or at bottom of the application and some of the areas can be collapsed using
tiny buttons in the middle of window splitters. The default layout for basic operations and tasks
can be similar to this:
33
User Interface
Expanded Area
Application View
All currently opened models and their Workspaces are listed in the Application View (AV). In
the AV you can:
l
Application View is by default docked on the bottom left side, next to the Message Explorer.
You can close it at any time (x) and open later.
To open the Application View
Click
34
User Interface
Tips:
l
You can open several instances of the Application View, e.g. for each model and see their
Workspaces clearly.
To hide/show the Application View, click the splitter in the middle of the pane.
When you need to find a particular model or Workspace in the Application View, simply
expand the tree items and start typing the model/Workspace name. It will be found at
once. - This function works for expanded folders (search will not go through folders that
are collapsed).
Note: In the Application View, also versions and revisions checked out from Version Manager
are listed.
Description
Activate
Model
Add
Workspace
Option
Description
you can define the name of the WS and description. To
disable this function, select Settings | Options | General
and clear the Open Workspace Properties Dialog after
Add Workspace checkbox.
Model
Properties
Save
Save as
Object
Viewer
Sync &
Convert
Wizard
Rename
Close
Model
Test Model
Repair
Model
35
Option
Description
point of view. If your model is correct, and regardless
some problems occur, Test Model can be run. Returned
messages will be displayed in the Message Explorer
where you can save them to LocalLog.txt file and send to
us. They will help our developers to determine where
particular problem is.
If any problem is found during Test Model, you can also
run Repair Model. 60 % of problems can be solved this
way.
See "VerificationModel VerificationToad Data Modeler
allows you to verify your models. You can select what
items of your model you want to check, find out what
errors and flaws your model contains etc. To verify your
modelSelect Model | Verify Model... (also CTRL+F9).On
tab Model Objects, select Object Types and instances of
objects that you want to verify. On tab Verification
Settings, select options for verification. To save the
settings, click Save & Verify. To see the process of
verification and final result, activate the Verification Log
The log should be activated automatically. To activate
the log manually, click Tools | Verification Log.Model
Verification FormOn tab Model Objects, you can see
object types as well as instances of objects that exist in
your model.On tab Verification Settings, you can enable
or disable errors, warning and hints. Additional
information is available on right side.Rules are database
dependent, the following screenshot shows rules for
Microsoft SQL Server 2012.Verification Log & Model
ExplorerResults are displayed in Verification Log at
bottom. Errors, warnings and hints are displayed in
Physical Model Explorer in form of small graphics placed
to right top corner of each object icon.Verification Log
ToolbarVerification toolbar icons:Tree or Grid
layoutShow ErrorsShow WarningsShow HintsShow
Model Verification Form (Allows you to specify settings)
Quick Model Verification (Executes model verification)
Quick FixesToad Data Modeleroffers Quick Fixes,
recommended solutions for selected problems or issues.
Quick Fixes are accessible in both Verification Log
andPhysical Model Explorer.In Verification Log you can
switch between Tree and Grid layouts, using the first icon
on Verification Log toolbar.Tree layout shows Quick
Fixes as hyperlinks, Grid layout allows you to apply
36
Option
Description
Quick Fixes via popup menu.Right click an item in Grid
layout to see available Quick Fixes.On Form
VerificationErrors, warning and hints can be displayed
directly on object form, at bottom. Quick Fixes are not
available in this mode.SettingsVerification rules can be
specified as Errors, Warnings and Hints and you can
modify the categorization in Settings. Navigate to
selected target database and define settings for Model
Verification. " (page 1) for more information..
Description
Add
Workspace
Open All
Designers
Description
Activate
Designer
Open Designer
Edit
Workspace
Format
Add Selected
Objects to
Workspace
Rename
37
38
User Interface
Option
Description
Delete
Workspace
Note: All these right-click options are identical with those for model and Workspaces in
Model Explorer.
Application Window
Application Window (AW) represents a work area where you design your models, work with
scripts etc.
Toad Data Modeler 3.x allows you to work with several models of the same or different
databases simultaneously. The models and their Workspaces and Designers are organized in the
Application Window on tabs by models. Also, the Script Editor and Scripting Window open on
appropriate tabs in the Application Window. It is possible to dock Model Explorer of a
particular model on the Application Window too.
Rename
Model Properties
Workspace Properties
39
User Interface
Close
Select a Workspace in the Application View or Model Explorer |right-click and select
Activate Designer.
Right-click the selected WS in Model Explorer (or Application View) and select
Open Designer.
Tips:
l
If you create a new Workspace, its Designer will open automatically in the
Application Window.
You can move tabs on the Application Window easily: Press CTRL, select a tab
and drag it.
Related Topics
Designer and Workspace (page 39)
A model can have several Workspaces. Workspaces are similar to submodels. They allow
you to display different/same objects of your model. The first WS is called All Items and
is meant as main model.
For one WS, you can open several Designers. Designers opened for the same Workspace
display the same objects. This allows you to view different/same parts of the same WS,
and e.g. in a different zoom.
You can undock designers or dock them to a particular model in the Application
Window. See "Docking" (page 42) for more information
Press CTRL+W.
40
User Interface
The Workspace Properties dialog opens automatically. In this dialog, you can define the name
of the WS and description.
Tip: To disable this function, select Settings | Options | General and clear the Open Workspace
Properties Dialog after Add Workspace checkbox.
To open another Designer for particular Workspace
Right-click the selected WS in Model Explorer (or Application View) and select
Open Designer.
Confirmation dialog opens. This message should draw your attention to the fact that although
you closed last Designer of your model from the Application Window, model itself is still open
in Toad Data Modeler (the model is listed in the Application View). This message should
prevent you from the situation when you open the same model again and rewrite the changes
made in first instance of the model.
Select Yes to close your model. If you have made any changes in your model, you will be asked
to save them before the model is closed.
Navigation on Workspace
l
Click
Tips:
l
Description
Edit
Workspace
Format
Add Selected
Objects to
Workspace
Change Lines to
Right Angled
Select Objects
41
42
User Interface
Docking
Docking means tacking a form/pane on another form/pane. This feature allows you to customize
the Toad Data Modeler interface to meet your needs and requirements.
The following types of dockable forms are available in Toad Data Modeler:
l
One on another (You can dock only small forms on big ones or big forms on big ones.)
One by another
On tabs
Model Explorer refers to a particular model, therefore it can be docked only to the model in
the Application Window. It cannot be docked e.g. next to the Message Explorer.
43
User Interface
To dock a form/pane
1. Drag, move and drop pane where necessary.
Hot Keys
Shortcut
Description
CTRL+N
CTRL+O
CTRL+S
Saves a model.
CTRL+W
CTRL+F9
44
User Interface
Shortcut
Description
CTRL+E
CTRL+R
CTRL+C
CTRL+X
CTRL+V
CTRL+Z
Undo step.
SHIFT+CTRL+Z
Redo step.
CTRL+A
Selects all.
CTRL+F
CTRL+ALT+F
CTRL+M
Del
SHIFT+Del
ALT+O
ALT+C
CTRL+M
Minimizes Forms.
CTRL+ALT+S
Synchronizes metamodel.
CTRL+I
F1
F2
Renames model/object.
F9
F11
CTRL+Up
45
User Interface
Shortcut
Description
Generated Objects)
CTRL+Down
Keyboard arrows
SHIFT+keyboard arrows
CTRL+scroll mouse
Zooms in/out.
CTRL+, CTRL+Page Up
Zooms in.
CTRL-, CTRL+Page
Down
Zooms out.
SHIFT+scroll mouse
Scroll mouse
CTRL + left
CTRL + right
SHIFT
Drag&Drop
techniques+CTRL+SHIFT
Drag&Drop techniques
from Model Explorer
46
User Interface
Shortcut
Description
Drag&drop
techniques+CTRL
CTRL+Drag&Drop
techniques
CTRL+click an attribute
CTRL+click attributes
CTRL+double-click an
object name
CTRL+click a
relationship line
CTRL+click a handle
point
ALT+click a relationship
line
Inplace Editor
Toad Data Modeler allows you to edit items directly in appropriate place (Workspace, frame).
See the following examples.
To change an entity name on the Workspace
1. Click an entity on the Workspace.
2. Press CTRL and double-click the entity name.
47
User Interface
Related Topics
Modeless Dialogs
3. A new attribute has just been added, the change has not been confirmed yet.
(After the change is confirmed, the status will change and set to Normal. Until
creation of the new item is confirmed, it's not possible to edit it.)
48
User Interface
4. The attribute has been modified in the grid directly (see the changed name). The
change has not been confirmed yet.
5. Item NewAttribute has just been deleted, the change has not been confirmed yet.
6. Deletion of item NewAttribute has been confirmed by clicking the Apply button.
The item is marked as deleted and will not be displayed when you open the
Entity Properties form/Attributes tab next time.
7. You've opened two instances of the same Entity Properties form. You're editing content
in one of them. One Entity Form is disabled and has status n/a. The other, which is being
edited, is active and marked by E.
Note: By default, you can open only one instance of form. To open more instances, select
Settings | Options | General | clear the Allow One Instance of Form checkbox.
Menus
File Menu
The following options are displayed provided that Designer is active in the Application
Window.
49
User Interface
Reverse Engineering | Connections opens Connection form where you can manage connections
to your existing databases.
Synchronization | Sync & Convert Wizard... item opens wizard for Model Conversion
and Synchronization tasks.
Related Topics
File Extensions (page 483)
Edit Menu
50
User Interface
The Edit menu contains basic actions. Undo and Redo functionality can be accessed from this
menu. In physical model selection of Parent or Child objects can be done by clicking particular
item in the menu.
For object search the standard and well known shortcut CTRL+F can be used. The same feature
can be accessed from the Edit menu as well.
View Menu
51
User Interface
Objects Menu
The Objects menu is model dependent. Different items appear in Physical Model or
Logical Model.
Layout Menu
Automatic rearrangement of objects in your diagram can be executed from the Layout menu. If
captions of relationships should be hidden, click Layout | Relationship Captions | Hide.
Model Menu
The options in the Model menu are model dependent.
52
53
User Interface
From the Model menu key features can be accessed. Verify model, generate SQL script, generate
Report, Synchronize model etc.
Related Topics
About Physical Data Modeling
About Logical Data Modeling
Tools Menu
The Tools menu contains items for Physical Model only.
Refactoring Utility - if you rename object in your model, the Refactoring Utility can be used for
changing the old object name in SQLproperties in other objects. Example: rename attribute and
use the Refactoring Utility to replace the old name with new name in SQLof database views,
triggers, stored procedures etc.
Schema/Owner Assignment... - allows you to assign schema to multiple objects at once.
Naming Conventions - allows you to manage rules and naming standards for objects in
your model.
Infer Relationships - tries to guess and add "missing" relationships to your model.
Macros Menu
The Macros menu contains items that can be customized by users or new features
developed by users.
Option
Description
All
Selected
Objects
Productivity
54
55
User Interface
Option
Description
and easy way to add new attributes to entities
To see a How to video for this macro, visit our
Community website.
Rename
Related Topics
Macros
Settings Menu
Via Settings menu the general options can be open.
56
User Interface
Window Menu
Window Menu contains basic access point for opening dockable windows or panes and toolbars.
Help Menu
Through the Help menu you can access web site, documentation, community page on
ToadWorld.com and manage Licenses for Toad Data Modeler
57
58
Specify name for your project and define the path to the folder where your models and other files
will be stored.
Click Create and see the new item in your Application View pane.
Projects with Version Control System
If you wish to keep track of your models and other files in Subversion and use this Version
Control System in Toad Data Modeler, create new project with Version Control System support
(first or second item).
59
Click Create to finish the creation of your new project with Version Control System support.
Now you can see your project in Application View and the first operation you should do it to
right click the item and choose Subversion | Check Out (considering project structure was
configured in Subversion first).
More information about Subversion can be found in section Version Control | Subversion.
60
Related topics:
Getting Started with Subversion
Models
Model Objects
Add Objects
Toad Data Modeler allows you to add objects from multiple places. See the following options.
To add an object on Workspace
1. Click an object icon on the toolbar, e.g.
for entity.
).
2. Click the work area as many times as many objects you need to add.
3. Right-click the work area (or click the object icon again) to turn this function off.
Tip: Use this function to add any object on the toolbar (view, note etc.).
To add objects in Model Explorer
Find the object type name in the tree (e.g. Entities) | right-click and select Add (Add
Entity).
61
Related Topics
Hot Keys (page 43)
Model Explorer (page 391)
Edit Objects
Toad Data Modeler allows you to edit objects from multiple places. See the following options.
To edit objects on the Workspace
Note: Right-click the object | Edit is also possible. Double-click in Model Explorer does not
highlight the object on the Workspace (WS)but opens the Object Properties dialog. To highlight
the object on WS, you need to expand the Shortcuts folder and double-click the object shortcut.
To edit objects from Objects menu
1. Select object on workspace or in Model Explorer.
2. Select Objects | Edit...
To edit objects from Model menu
1. Select Model | Model Items | the object type (e.g. Entities).
2. In the dialog (Entities), select the object and click Edit.
62
Note: Objects of your model that have the Generate checkbox disabled in their Properties
dialogs are displayed in Model Explorer this way:
Related Topics
Model Explorer (page 391)
Shortcuts of Objects (page 72)
Features (page 374)
Default Values (page 470)
Format Objects
l
To set up format for new models (models that you will create)
1. Select Settings | Options | Model section | Physical/Logical Model.
2. Define options on tabs Workspace, Shape and Entity.
3. Press CTRL+N to create a new model.
The format will be used for new models/new workspaces. Via this option, you can not
change format of objects in already existing models.
To change format of objects in existing models
The format will be applied for all objects that have the same format as the format of
Workspace, and objects that you will create on the Workspace. Example: Your Workspace
(WS) has two entities - Entity1 (red brush color) and Entity 2 (white brush color). Brush
color set up for your Workspace is white. If you change it to blue, brush color of Entity2
will also change. Entity1 will remain red. If you create Entity3, it will be blue.
General Tab
Description
Auto
Complete
Display Line
Names
Right Angled
Lines
Font Settings
Line Tab
Description
Lock Points in
Right Angled
Mode
Shape Tab
Description
Recalculate
Size
Shadow Effect
Use Brush
Color for Full
Shape
Note Line
Tab
Description
63
End Type 1, 2
Entity Tab
Description
Display
options
Related Topics
Format Physical Objects (page 86)
Format Logical Objects (page 292)
Designer and Workspace (page 39)
Select Objects
Physical Model Pointer and Objects Selection tool options
64
65
Select Links Automaticallyalso available from Objects menu. By default enabled. When
enabled, lines/relationships between selected objects are selected automatically. During one
selecting process you can enable and disable this option several times to select only certain
lines/relationships.
To select multiple objects on Workspace, you have the following options:
l
Press SHIFT and click the particular objects on WS. This option works regardless settings
in Pointer and Objects Selection tool on the toolbar.
Drag your mouse over the objects on WS. (Works only for adjoining objects.)
Note: If you drag your mouse from the left side, only the objects that are entire in
the frame will be selected. If you drag your mouse from the right side, even objects
that are partly in the frame will be selected. - See the following example.
Example:
You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also
selected), Select Entities or Select All Shapes. Drag your mouse from the left side
as long as both entities are completely in the frame (see the following image).
66
The result would be the same if you dragged your mouse from the right side and included
even a small part of the two entities in the frame.
67
To select child and parent objects of the selected entity on the Workspace
Right-click the selected entity and select Select Parent Objects or Select Child Objects or
Select Parent and Child Objects.
To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Related Topics
Object Viewer
Search Objects
Align Objects
1. In the workspace, select objects you want to align. (Decide what object will be the first
you select as the objects are aligned by the first selected object.)
2. Click
Note: You can also select Objects menu and one of the options under
Arrange, Align, Match Size or Space sub-menus.
68
Related Topics
Select Objects
Rename Objects
To rename objects on the Workspace
1. Select the object (entity, view etc.), press F2 or CTRL+double-click the object name.
2. Write a new name.
3. Click the Workspace then.
To rename object in Model Explorer
Related Topics
Inplace Editor (page 46)
Copy Objects
To copy objects on the Workspace and between Workspaces, you can select from the
following option:
l
To copy objects in a dialog of particular object (Model menu, Model Items | Entities,
Views etc.)
You can copy objects between models of the same or different database system.
Combinations of these copy methods are possible - e.g. copy from Model Explorer to Workspace.
See "A. Drag&Drop techniques + CTRL on the Workspace" (page 94) for more information
Tips:
l
To copy more objects at one jump, make multiple selection and select one of the copy
techniques.
69
accomplish the operation much faster. (The larger your model is, the more significant
difference in speed you will notice.)
Move Objects
To move objects on the Workspace, you can select from the following option:
l
Drag&Drop techniques
Keyboard arrows
Tip: To set up a size of a step for moving shapes on Workspace, select Settings |
Options | Application | Graphics | Move Objects by (mm/10) (in tenths of
millimeters).
To move objects in a dialog of particular object (Model menu, Model Items | Entities,
Views etc.)
You can move objects between models of the same or different database system.
Combinations of these methods are possible - e.g.between Model Explorer of two models.
See "Move EntitiesIn Toad Data Modeler there are several methods how to move entities. You
can select from the following options.To move entities within a Workspace, useDrag&Drop
techniquesorKeyboard arrowsTips:Select Settings | Options | Graphics | Move Objects by
(mm/10) to set up the size of a step to move (in tenths of millimeters).Select an entity, press
SHIFT, hold it down and use the keyboard arrows to change size of the entity box.To move
more entities on the WS at one jumpMake multiple selection of entities. See Select Objects for
more information.Point your mouse cursor at any selected object, click and hold the mouse
button down. Drag the objects to the required position. A whole bloc of all selected entities will
move, including their relationships.Tips:In the Objects menu, see the following two
options:Select Links Automatically - Enable this option if you want to select the relationships of
related entities automatically while making the multiple selection via SHIFT key in WS.
Recalculate on Move - Enable this option if you want to recalculate and see position of
relationships while moving the bloc of objects.To move an entity in a straight line, drag it and
then press and hold SHIFT key.To move an entity with its relationship, including handle points,
select the entity and the appropriate relationship (use SHIFT) and drag the entity. -> Selected
entity, relationship and its handle points will move too. To move entities to another Workspace
or another model, select from the following options:Cut&Paste functions: Edit | Cut/Paste, or via
shortcuts CTRL+X, CTRL+VDrag&Drop techniques between the Entities dialogs of two
different modelsDrag&Drop techniques between the Entities dialog and Model
ExplorerDrag&Drop techniques in or from Model ExplorerDrag&Drop techniques between
70
Entities dialog/Model Explorer and WorkspaceExample: Moving an entity between two models
via Model Explorer. An entity will be moved from Model A to Model B.Version A: Moving an
entity between Model Explorers of the two models.Open Model Explorers for both models. You
can leave them undocked, or at least one of them to be able to drag the entity between
them.Select an entity in Model Explorer A | Entities folder, and hold the mouse button
down.Drag the entity to the Entities folder of the Model Explorer B.Version B: Moving an
entity from Model Explorer A directly to a Workspace of Model B.Undock the Model Explorer
A if it's docked, and click the Workspace tab of Model B in the Application Window.Select an
entity in Model Explorer A and hold the mouse button down.Drag the entity to a Workspace of
Model B.Related TopicsModel Explorer" (page 1) for more information and examples.
Tips:
1. To move more objects at one jump, make multiple selection and select one of the
move methods.
2. To see position of relationships when moving entity or entities on the Workspace, select
Objects | Recalculate on Move.
3. To move an entity in a straight line, drag it and then press and hold SHIFT key.
4. To move an entity with its relationship, including all handle points, select the entity
and the appropriate relationship (use SHIFT) and drag and drop the entity. -> Selected
entity, relationship and its handle points will move too. Position of handle points will
be preserved.
Delete Objects
In Toad Data Modeler, there are two deletion options (see the Objects menu):
l
Delete Object - Deletes an object with all its shortcuts from model.
Example:
Your model has two Workspaces - WS1 and WS2. You add a new entity to your model. -> The
entity (its shortcuts) is contained on both Workspaces (- Auto Complete option is enabled).
However, you need to have the new entity on WS1 only.
Solution: You select the entity on the WS2 and simply press Delete.
Result: The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The entity still
exists in your model.
If you wanted to delete the entity from your model completely (including all its shortcuts from
all Workspaces), you would select the Delete Object option (or press SHIFT+Delete). For the
deletion, you could select any entity shortcut on any WS - either WS1 or WS2. The entity would
be deleted from your model.
71
When you press Delete or SHIFT+ Delete in your ER diagram, the following message
will display:
Option
Description
Display Dialog
Remove
72
Option
Description
Graphical
Representative
of Object
Delete Object
Related Topics
Shortcuts of Objects (page 72)
Select Objects Physical Model Pointer and Objects Selection tool optionsLogical Model Pointer
and Objects Selection tool optionsMetamodel Pointer and Objects Selection tool optionsSelect
Links Automaticallyalso available from Objects menu. By default enabled. When enabled,
lines/relationships between selected objects are selected automatically. During one selecting
process you can enable and disable this option several times to select only certain
lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1)
Shortcuts of Objects
About Shortcuts of Objects
In Toad Data Modeler, you can create multiple representatives of an object in one Workspace or
more Workspaces.
73
A shortcut has neither higher, nor lower priority than its object and vice versa.
A shortcut has the same name as its object. Shortcuts are just numbered.
A shortcut has the same properties as its object. You can edit any shortcut - all changes
will be applied to all other shortcuts of this object automatically.
An object can have none or many shortcuts. Their number is not limited. Also, you don't
have to have a shortcut of an object displayed on any WS.
You can set individual format for each single shortcut of the same object.
Entity
Relationship
Inheritance
Note
Stamp
Image
Examples:
1. Entity1 is related with Entity30 that is placed in the other end of your large model.
Solution: You can create shortcuts for both entities and place them closer to each other.
(This example is shown in User Guide, "Shortcuts of Objects" topic.)
2. You have divided your large model into several Workspaces. You need to have Entity1
on more Workspaces (WS). Solution: You can create shortcuts of this entity on each WS.
Graphical Example:
A shortcut of the Student entity has been created and used in another part of the model.
This way, the model has been logically divided into two blocs and become much clearer
and well arranged.
74
Related Topics
Create ShortcutsToad Data Modeler allows you to create shortcuts of objects on Workspaces in
many ways and also from Model Explorer to a particular Workspace. See the following
options.To add a shortcut within a WorkspaceDrag&Drop techniques and CTRL+SHIFTThis
cannot be used for creating shortcuts of relationships and inheritance.Example:Create a shortcut
of the Customer entity on one WS - Borrowing WS:Click the Customer entity on the Borrowing
WS and hold the mouse key down.Press CTRL+SHIFT keys and hold them down.Drag the
Customer entity to any place on the work area (the mouse cursor will change its
appearance).Release the mouse button and then the keys.To add a shortcut from Model Explorer
to WorkspaceDrag&Drop techniques from Model Explorer to particular WSExample:Activate the
Workspace where you want to add a shortcut of the Customer entity.In Model Explorer, find the
Customer entity.Click the Customer entity and hold the mouse key down.Drag the Customer
entity to the WS (the mouse cursor will change its appearance).Release the mouse button and
then the keys.Tip: Have a look at the Shortcuts folder of the Customer entity in Model Explorer.
A new shortcut has been created.To add a shortcut of the selected object(s) from one
Workspace to another WorkspaceRight-click the selected object(s) (e.g. entity) on the WS and
select: Add into Workspace to select the particular WS.orAdd into New Workspace to create a
new WS and add the shortcut there. The layout and format of the shortcuts remain preserved
when you use this option.To add a shortcut of related objects to particular entity on the
Workspace (including relationships)Right-click the entity and select from the following
options:Fill Parent Objects to add shortcuts of parent objects of the selected entity to the WS.Fill
Child Objects to add shortcuts of child objects of the selected entity to the WS.Fill Parent and
Child Objects to add shortcuts of parent and child objects of the selected entity to the WS.To
add a shortcut of object(s) to the selected WorkspaceRight-click the selected Workspace and
select:Add All Model Objects to Workspace to add shortcuts of all objects that exist in your
model.orAdd Selected Objects to Workspace to select shortcuts of those entities that are not
contained on the WS, and of those relationships/inheritances that are possible to create on this
WS.Related TopicsEdit ShortcutsRemove Shortcuts (page 1)
Create Shortcuts
Toad Data Modeler allows you to create shortcuts of objects on Workspaces in many ways and
also from Model Explorer to a particular Workspace. See the following options.
75
Example:
1. Activate the Workspace where you want to add a shortcut of the Customer entity.
2. In Model Explorer, find the Customer entity.
3. Click the Customer entity and hold the mouse key down.
4. Drag the Customer entity to the WS (the mouse cursor will change its appearance).
5. Release the mouse button and then the keys.
Tip: Have a look at the Shortcuts folder of the Customer entity in Model Explorer. A new
shortcut has been created.
To add a shortcut of the selected object(s) from one Workspace to another Workspace
Add into New Workspace to create a new WS and add the shortcut
there. The layout and format of the shortcuts remain preserved when you
use this option.
76
Fill Parent and Child Objects to add shortcuts of parent and child objects
of the selected entity to the WS.
Add All Model Objects to Workspace to add shortcuts of all objects that
exist in your model.
or
Related Topics
Edit Shortcuts (page 76)
Shortcut Right-Click Options in Model Explorer (page 79)
Edit Shortcuts
To edit object property
You can edit any shortcut you want. The changed properties will be automatically applied in
all shortcuts of the object. In fact, you edit properties of the object and can do it via any
graphical representative of the object.
To change format of a shortcut
The changed format will be applied only for the selected shortcut. Toad Data Modeler allows
you to define a different format settings for shortcuts of the same object.
Related Topics
77
Edit ObjectsToad Data Modeler allows you to edit objects from multiple places. See the
following options.To edit objects on the WorkspaceDouble-click or Enter the selected
object.Note: Right-click the selected object(s) to display a pop-up menu.To edit objects from
Model ExplorerFind the object in the tree and double-click it (or right-click).Note: Right-click
the object | Edit is also possible. Double-click in Model Explorer does not highlight the object
on the Workspace (WS)but opens the Object Properties dialog. To highlight the object on WS,
you need to expand the Shortcuts folder and double-click the object shortcut.To edit objects
from Objects menuSelect object on workspace or in Model Explorer.Select Objects | Edit... To
edit objects from Model menuSelect Model | Model Items | the object type (e.g. Entities). In the
dialog (Entities), select the object and click Edit. Buttons in Object Properties dialogs: - opens
the Application Variables formOK - confirms changes, the form/dialog will closeCancel - cancels
changes Apply- confirms changes (The changes will be saved and the form/dialog remains
opened for other edit.)Help - Help navigationNote: Objects of your model that have the Generate
checkbox disabled in their Properties dialogs are displayed in Model Explorer this way:Related
TopicsModel Explorer (page 1)Shortcuts of Objects (page 1)Features (page 1)Default Values
(page 1) (page 1)
Format Objects (page 62)
Entity Right-Click Options (page 99)
Remove and List Shortcuts
To remove a shortcut of object on the Workspace
Only the selected shortcut will be removed from the Workspace. The object itself still exists
in the model.
Tips:
1. Right-click the shortcut in Model Explorer and select Delete Item.
2. To remove more shortcuts on WS at one jump, make multiple selection and then
press Delete.
See "Delete ObjectsIn Toad Data Modeler, there are two deletion options (see the Objects menu):
Remove from Workspace (Delete) - Removes an object shortcut from a Workspace. Delete
Object - Deletes an object with all its shortcuts from model.Example:Your model has two
Workspaces - WS1 and WS2. You add a new entity to your model. -> The entity (its shortcuts)
is contained on both Workspaces (- Auto Complete option is enabled). However, you need to
have the new entity on WS1 only.Solution: You select the entity on the WS2 and simply press
Delete. Result: The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The
entity still exists in your model. If you wanted to delete the entity from your model completely
(including all its shortcuts from all Workspaces), you would select the Delete Object option (or
press SHIFT+Delete). For the deletion, you could select any entity shortcut on any WS - either
WS1 or WS2. The entity would be deleted from your model. To remove shortcut of object from
WorkspaceSelect an object (shortcut of object) on the WS and press Delete.Tip: You can delete
shortcuts in Model Explorer too - select particular shortcut of an object in the Shortcuts folder |
78
right-click | Delete Item.To delete objects from model (including all its shortcuts) Select the
shortcut of objecton Workspace and press SHIFT+Delete.Tip: You can also delete the objects:In
Model Explorer - select an object | right-click | Delete Item.In the Object dialog (Model menu |
Model Items | Entities, Relationships etc.) - select the object and click Delete.When you press
Delete or SHIFT+Delete in your ER diagram, the following message will display:Select the
action you want to perform.Note: Key shortcuts: ALT+O for OK and ALT+C for Cancel. To set
the default Delete options in Toad Data Modeler:Select Settings | Options | Dialog Boxes | Other
tab.OptionDescriptionDisplay DialogWhenever you press Delete or SHIFT+Delete in your ER
diagram, the Delete Confirmation Dialog will pop up and you will be able to select what action
you want to perform in particular case.Remove Graphical Representative of ObjectIf this option
is selected, the Delete will always remove selected shortcut (s) of object from particular
Workspace. SHIFT+Delete will have to be used to completely delete an object from your model.
Delete ObjectIf this option is selected, the Delete will completely delete selected object(s) from
your model, including all the object shortcuts. There is no option to only remove selected
shortcut (s) of object. (The Delete will replace SHIFT+Delete.) Related TopicsShortcuts of
Objects (page 1) Select Objects Physical Model Pointer and Objects Selection tool
optionsLogical Model Pointer and Objects Selection tool optionsMetamodel Pointer and Objects
Selection tool optionsSelect Links Automaticallyalso available from Objects menu. By default
enabled. When enabled, lines/relationships between selected objects are selected automatically.
During one selecting process you can enable and disable this option several times to select only
certain lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1)" (page 1) for
more information about deletion options in Toad Data Modeler.
List Shortcuts
To list all shortcuts that exist in your model see Model Explorer and the following folders.
79
Select the particular object folder (e.g. Entities) | Shortcuts folder. Here, you can also see
names of the Workspaces where the particular shortcut occurs.
Click the Workspaces folder | particular workspace folder (e.g. Ordering) | Entity
Shortcuts, Relationship Shortcuts, View Shortcuts.
Description
Find Object
Edit
Delete Item
Description
Fill Parent
Objects
Fill Child
Objects
80
Note
Line
Image
Rectangle
Ellipse
Text
Label Quadrangle
Label Ellipse
The objects are available on the toolbar and in the Objects| Add New menu for both physical
and logical model.
To change format of these objects
Related Topics
Designer and Workspace (page 39)
Format Objects (page 62)
Note and Line
A note can refer to a model, Workspace, particular entity, attribute, relationship etc.
To add a note to your model
1. Click
or select Objects | Add New | Note and click the work area.
Note Shortcuts
You can create shortcuts of Notes.
Example: You have a Note to the Customer entity. This entity occurs in WS1 and WS3.
You want to have the Note to this entity in both Workspaces. Solution: Create another
shortcut of this Note.
81
To make a connection between a Note and an object that the note relates to, you can use a Line.
Lines
To add a Line
1. Click
Related Topics
Shortcuts of Objects (page 72)
Image
Logos and other images can be added to your ER diagrams. Lines can be used to make a relation
between image and another shape, for example entity, view, note etc.
To insert an image
1. Click
Note: Images that you insert to your ER diagrams aren't saved together with your model.
82
To edit an image
Related Topics
Shortcuts of Objects (page 72)
Stamp
Add a Stamp to the Workspace to display information about your model, e.g. Author, Company,
Date of Creation etc.
To add a stamp
Click
on the toolbar (or select Objects | Add New | Stamp), and click the work area.
83
Tip: You can edit content of the Stamp also via Model | Model Properties.
Related Topics
Model Statistics (page 399)
Shortcuts of Objects (page 72)
Caption of Categories
Caption of Categories displays a list of all categories of your model and their colors. From here,
you can also add, edit and delete categories.
See "Categories" (page 381) for more information
To add a Caption of Categories
1. Click Category
Related Topics
84
Related Topics
Basic Database Design (page 205)
About Reverse Engineering
Load Models from DDL/SQL Script
Import Toad Data Modeler 2.x Model
Import Toad for Oracle ER Diagrams (page 653)
Benefits of Physical Data Model
l
Detailed definition of database structure, including database specific items, for example:
l
stored procedures
functions
triggers
views
materialized views
Possibility to specify logical names for objects (captions for tables, attributes and
other objects).
85
Automatic generation of SQL code for selected objects (SQL code generation is not
available in Logical or Universal Model)
Entity (Table)
View
Image
Stamp
All these objects are available in the Objects menu or via icons on the Designer toolbar.
You can manage these objects:
l
In Model Explorer
Tips:
1. Besides these objects you can add also other graphical shapes to your ER diagram. See
"Model Independent Graphics" (page 79) for more information.
2. See "Arrange Objects in Layers" (page 336) for more information.
Related Topics
Model Menu (page 52)
Model Explorer (page 391)
86
Description
Align
Display Data
Types
Display Keys
Graphically
Display Level
Gradient Effect
Display
Dictionary Types
as Data Types
Display Indexes
Select Settings | Options | Model section | Physical Model | Entity tab | Attribute
Colors area.
87
Related Topics
Designer and Workspace (page 39)
Entities
Create Entities
To create an entity in your model
Click
on the toolbar and then click anywhere on the work area (also CTRL+E).
2. Click the work area as many times as many entities you need to add.
88
3. Right-click the work area (or click the Entity icon again) to turn this
function off.
or
Model Explorer | Right-click the Entities folder | Add Entity.
Note: Are entities added to other Workspaces automatically? - See "Format Objects" (page 62)
for more information.
Entity List
To see all entities of your model, you can select from the following options:
l
Select Model | Model Items | Entities to open the Entities dialog. Here, you can add, edit
entities, edit their names (F2) and delete them.
In Model Explorer, unfold the Entities folder. From here, you can also manage entities of
your model.
Related Topics
Create Entity with Attributes
Add Entities and Attributes Fast
Features (page 374)
Default Values (page 470)
Edit Entities
Example: The Entity Properties form (Oracle 10g db). Object navigator collapsed.
89
Option
Description
Object Navigator
Box
General Tab
Caption
Name
90
Option
Description
Modeler allows you to:Automatically create
physical names based on logical names and
naming conventions rules. (Example: Customer
ID => T_ CUSTOMER_ ID). This feature makes
you more productive as you need significantly
less time to define both logical and physical
names.Define valid characters for physical names
and set how invalid characters should be
replaced.Use glossaries for automatic word
replacement during new objects creation.
Glossaries can be made of multiple CSV files and
you can easily turn on or turn off the selected
glossaries.Verify naming conventions and rewrite
physical names in a batch mode. Check your
model and replace physical names of objects that
dont
match
naming
conventions
rules.Synchronize captions and names (without
specific
naming
convention
definitions).Import/export of glossaries (*.CSV
files) also from/to other tools.See the Naming
Convention Properties dialog | Glossary tab |
Import button.You can find some CSV files with
diacritical marks at: C:\Program Files\Quest
Software\Toad
Data
Modeler
3\Naming
Conventions\CSV.Related
Topics
Basic
Operations" (page 1) for more information.
Tip: On the toolbar, feel free to select whether
you want to display physical names, logical
names or full names of your entities.
Schema
Category
Generate
91
Option
Description
Generate checkbox disabled in their Properties
dialogs are displayed in Model Explorer this way:
To Do Tab
Notes Tab
92
Option
Description
Double-click the selected object to open the
Properties dialog.
Physical
Properties Tab
Table Properties
Tab
Comment Tab
Buttons:
- opens the Application Variables form
OK - confirms all changes and closes the form
Cancel - cancels the changes you have made and closes the form
Apply - confirms the changes (the form will remain opened for further edit)
Help - opens Help file
Related Topics
Inplace Editor (page 46)
Object Navigator Box (page 402)
Autolayout (page 333)
Arrange Objects in Layers (page 336)
Resize Objects
Format Objects (page 62)
Features (page 374)
Copy Entities
In Toad Data Modeler there are several methods and places where to copy entities. You can
select from the following options.
93
94
Within a Workspace
Between Workspaces
Between Models
95
Example: Making a copy of an entity between the Entities dialog of Model A to Model
Explorer of Model B:
1. Open the Entities dialog in Model A: Model | Entities.
2. Open the Model Explorer for Model B.
3. Select an entity in the Entities dialog, press CTRL and hold it down.
4. Drag the entity to the Entities folder in Model Explorer.
Between Model Explorer and the Entities dialog (also of a different model), and
vice versa
96
Example 3: Making a copy of an entity between Model Explorers of two models. An entity will
be copied from Model A to Model B:
1. Open Model Explorers for both models. You can leave them undocked, or at least one of
them, so as to be able to drag the copied entity between them.
2. Click an entity in Model Explorer A and hold the mouse button down.
3. Press CTRL.
4. Drag the entity to the Entities folder of the Model Explorer B.
Other Notes
l
It's possible to copy objects between models of a different database. However, some
specific object properties cannot be copied - properties that are in the source model but
do not exist in target model. E.g. Copy of entity from MS SQL 2005 to MySQL 5.1. Entity A has Partition Schema, Entity B has Fulltext Catalog. In these cases, the entities
will not be copied to MySQL model.
Related Topics
Model Explorer (page 391)
Move Entities
In Toad Data Modeler there are several methods how to move entities. You can select from the
following options.
To move entities within a Workspace, use
Drag&Drop techniques
or
Keyboard arrows
Tips:
1. Select Settings | Options | Graphics | Move Objects by (mm/10) to set up the size of a
step to move (in tenths of millimeters).
2. Select an entity, press SHIFT, hold it down and use the keyboard arrows to change size of
the entity box.
97
Select Links Automatically - Enable this option if you want to select the
relationships of related entities automatically while making the multiple
selection via SHIFT key in WS.
2. To move an entity in a straight line, drag it and then press and hold SHIFT key.
3. To move an entity with its relationship, including handle points, select the entity and the
appropriate relationship (use SHIFT) and drag the entity. -> Selected entity, relationship
and its handle points will move too.
98
To move entities to another Workspace or another model, select from the following options:
l
Example: Moving an entity between two models via Model Explorer. An entity will be moved
from Model A to Model B.
Version A: Moving an entity between Model Explorers of the two models.
1. Open Model Explorers for both models. You can leave them undocked, or at least one of
them to be able to drag the entity between them.
2. Select an entity in Model Explorer A | Entities folder, and hold the mouse button down.
3. Drag the entity to the Entities folder of the Model Explorer B.
Version B: Moving an entity from Model Explorer A directly to a Workspace of Model B.
1. Undock the Model Explorer A if it's docked, and click the Workspace tab of Model B in
the Application Window.
2. Select an entity in Model Explorer A and hold the mouse button down.
3. Drag the entity to a Workspace of Model B.
Related Topics
Model Explorer (page 391)
Option
Description
Format
99
Option
Description
Delete Object
Arrange
Recalculate Size
Edit
Add
Edit Attribute...
Select
Select Parent Objects
Fill
Fill Parent Objects
100
Option
Description
Workspace.
Add to Category
Macros
Attributes
Create Attributes
You can create attributes in:
l
Model Explorer
101
102
2. In the Entity Properties form, select the Attributes tab and click Add.
To quickly create an attribute with default settings and the name you define, write the
attribute name to the text box placed at the bottom left-hand corner of the Entity
Properties form and click the smaller Add button.
In Entity Properties form | Attributes tab | click the last attribute and press the down
arrow key on your keyboard.
Click OK+Add.
103
Note: This is recommended when you are editing an attribute and need to create
another attribute for the entity.
To create an attribute in Model Explorer
Click the Entities folder | Unfold the selected entity. | Right-click the Attributes item. |
Add Attribute.
Column/Option
Description
Key
Caption
Name
Data Type
p1
104
105
Column/Option
Description
Number(x,y), then P1 displays Precision value and
P2 Scale value. If Varchar2(x) is defined as data type,
P1 displays Length etc.
p2
Not Null
Comments
Status
Buttons:
- opens the Application Variables form
small Add - adds new attributes quickly, just write an attribute name to the box next to this
button and then click Add.
Add - adds an attribute
Edit - opens the Attribute Properties dialog
Delete - deletes the selected attribute
- changes order of attribute
Related Topics
Create Entity with Attributes
Add Entities and Attributes Fast
Features (page 374)
Default Values (page 470)
Edit Attributes
In the Entity Properties dialog | Attributes tab, double-click the selected attribute.
or
Find the attribute in Model Explorer | EntityName folder | Attributes | Doubleclick the selected attribute.
Example: The Attribute Properties dialog (Oracle 10g db):
Tab/Option
Description
Object
Navigator
Box
106
Tab/Option
Description
Tips:
l
General
Tab
Caption
Name
107
Tab/Option
Description
(Example: Customer ID => T_ CUSTOMER_ ID). This
feature makes you more productive as you need
significantly less time to define both logical and
physical names.Define valid characters for physical
names and set how invalid characters should be
replaced.Use glossaries for automatic word replacement
during new objects creation. Glossaries can be made of
multiple CSV files and you can easily turn on or turn off
the selected glossaries.Verify naming conventions and
rewrite physical names in a batch mode. Check your
model and replace physical names of objects that dont
match naming conventions rules.Synchronize captions
and names (without specific naming convention
definitions).Import/export of glossaries (*.CSV files) also
from/to other tools.See the Naming Convention
Properties dialog | Glossary tab | Import button.You can
find some CSV files with diacritical marks at:
C:\Program Files\Quest Software\Toad Data Modeler
3\Naming Conventions\CSV.Related Topics Basic
Operations" (page 1) for more information.
Primary Key
Not Null
Unique
Data Type
108
Tab/Option
Description
Types and Domains.)
l
Domains
Default
Default
Rule
Foreign
Keys Tab
Entity
Relationship
Attribute
Name of attribute
Permissions
Tab
Notes Tab
Not Null
Constraint
Tab
109
110
Tab/Option
Description
Above the Object Navigator Box, 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).
Related Topics
Inplace Editor (page 46)
Object Navigator Box (page 402)
Features (page 374)
Assign a Key to Attribute (page 118)
Display Attributes in Model
To display attributes in your ER diagram
Right-click the work area | Workspace Format... | Entities tab | Display Level | select
Attributes.
Note: To set a display level for particular entity, right-click the entity and select
Format (follow the same steps as above).
To set the default Display Level properties for all models that you will create
Select Settings | Options | Model section | Physical Model | Entity tab | Attribute
Colors area.
111
Order Attributes
In the Entity Properties form | Attributes tab, you can order attributes:
l
Manual Order
The order you will set via the green arrows will be applied in particular entity box in
the Designer.
Example: Attributes in the Film Entity Properties form have been ordered manually using the
green arrows and finally confirmed Apply. Now see the Film entity in Designer and compare its
order of attributes with the order set in the Film Entity Properties form. The order is identical.
Tip: Hold down the green arrow button to move the selected attribute(s) to a more
distant position.
112
Automatic Order
Click the appropriate column name - e.g. click the Name column to sort attributes alphabetically.
This function offers you just a different view on the attributes in the Entity Properties form.
It does not influence order of attributes in entity box in the Designer.
If you sort attributes this way, you cannot manually change order of attributes via the green
arrows. If you click a green arrow, this message will display:
Click OK to activate the green arrows and order the attributes manually.
Notes:
1. No green arrow is enabled when there is no attribute or when there are attributes but none
is selected.
2. If any sorting function is turned on (e.g. sorting by name), green arrows are both active, so
you can click any of them to turn off the sorting and set the ordinal order.
Copy Attributes
In Toad Data Modeler there are several methods and places where to copy attributes. You can
select from the following options.
113
3. Press CTRL and hold the key down. Click the attributes that you want to copy.
4. Release CTRL key.
5. Now click the selected objects, hold the mouse button down. Press CTRL again and hold
the key down.
6. Drag the selected attributes to a target entity. (If you want to copy the attributes within
the entity, drag it a little in the entity box itself.)
7. Release your mouse button and CTRL.
In the Entity Properties form, you can copy attributes within an entity and between
entities of the same model or a different model.
From the Entity Properties form and Workspace, and vice versa
Example:
1. Open the Customer Properties form of the Customer entity and the Employee Properties
form of the Employee entity.
2. Click the Attributes tabs in both forms.
3. Press CTRL and hold the key down.
4. Click the Name attribute in the Customer Properties form and drag it to the Employee
Properties form | Attributes tab.
5. Release your mouse button and CTRL.
114
C. In Model Explorer
Use: You can make copies of attributes:
l
Between Model Explorer and the Entity Properties form | Attributes tab
Between two Model Explorers of two different models (see the following examples)
Other Notes
l
It's possible to copy objects between models of a different database. However, some
specific object properties cannot be copied - properties that are in the source model but
do not exist in target model. E.g. Copy of entity from MS SQL 2005 to MySQL 5.1. Entity A has Partition Schema, Entity B has Fulltext Catalog. In these cases, the entities
will not be copied to MySQL model.
Related Topics
Buttons: (page 93)
Model Explorer (page 391)
Move Attributes
In Toad Data Modeler there are several methods how to move attributes. You can select from the
following options.
115
Example:
1. Display attributes in your model.
2. Select an entity of which attribute/attributes you want to move.
3. Press CTRL and hold the key down. Click the attributes that you want to move.
4. Release CTRL.
5. Drag the selected attributes to a target entity.
In the Entity Properties form, you can move attributes within an entity and between
entities. (To change order of attributes within an entity, use the green arrows.)
Example:
1. Open the Customer Properties form of the Customer entity and the Employee Properties
form of the Employee entity.
2. Click the Attributes tabs in both forms.
3. Select attributes in the Customer Properties form and drag them to the Employee
Properties form | Attributes tab.
C. In Model Explorer
Use: You can move attributes:
l
Between Model Explorer and the Entity Properties form | Attributes tab
116
Tip: Use CTRL to select attributes of various entities in Model Explorer, and move them at one
jump to another entity (of the same model or even a different model).
Example: Moving an attribute in Model Explorer.
1. Unfold the Entities folder in Model Explorer tree.
2. Select attributes (SHIFT or CTRL) and drag them to the Attributes or 'EntityName' folder
of another entity.
Related Topics
Buttons: (page 93)
Model Explorer (page 391)
Delete Attributes
In the Entity Properties form | Attributes tab, select the attribute and click Delete.
or
Find the attribute in Model Explorer | EntityName folder | Attributes | right-click
and select Delete Item.
Tip: Use SHIFT or CTRL keys for multiple selection of attributes to delete them.
Keys
Display Keys in Model
To display keys in your ER diagram
From the Display Level box on the toolbar, select Primary Keys or PK and FK Keys or
All Keys.
Right-click the work area | Workspace Format | Entity tab | Display Level.
Note: To set a display level for particular entity, right-click the entity and select
Format (follow the same steps as above).
117
Right-click the work area | Workspace Format | Entity tab | select the Display Keys
Graphically checkbox.
Select Settings | Options | Model section | Physical Model | Entity tab | Attribute
Colors area.
Notes:
118
1. There is one primary key created by default in every entity (the key is empty).
2. Primary keys are graphically marked by red key by default.
3. It's not possible to delete a primary key. However, it can remain empty.
4. A primary key can be added to more attributes.
Attributes
or
Keys
Double-click the space in the Key column next to the selected attribute. Take notice of
the order of attributes you select for the primary key.
4. Click
119
If this checkbox is not selected, Toad Data Modeler doesnt allow you to clear the NotNull
checkbox in key attributes.
The availability of this option differs by database:
Database
Allow NULL in PK
Allow NULL in AK
DB2 z/OS v. 9
n/a
n/a
DB2
n/a
n/a
available
available
MS SQL Azure
n/a
available
n/a
n/a
n/a
available
n/a
available
MySQL
n/a
available
Oracle
available
available
PostgreSQL
n/a
available
Sybase ASE
n/a
n/a
n/a
n/a
MS Access
If the Allow Null Attributes in Keys checkbox is selected, it works this way:
l
If you assign an attribute to the key (PK, AK), the Not Null checkbox of the
attribute will be selected. (However, it will not be disabled and you will be able to
change the property.)
During propagation of the key via the identifying relationship, Not Null property is taken
from parent attribute to child attribute. The only exception is the case when the database
doesn't support Null value in primary key and it would be created via the propagation.
During model conversion, the changed settings of the Not Null property are taken into
consideration for particular attribute and particular database (see the table above).
For databases that support Null value in child attribute, the Mandatory Parent checkbox
is selected in the Relationship Properties dialog and should behave coherently to Null
value in child attribute as well as it behaves for non-identifying relationships.
120
For databases that support Null value in child attribute, the settings of the Synchronize
NotNull with Mandatory Parent option work the same way for PFK as for FK.
See "Synchronization of NotNull and Mandatory Parent" (page 127) for more information.
Related Topics
Synchronization of NotNull and Mandatory Parent (page 127)
PER - LER Conversion Information (page 428)
Edit Keys
Option
Description
General Tab
Description
Caption
Name
Attributes
Tab
Description
Available
Selected
Using
Index
Properties
Tab
Delete Keys
In the Entity Properties form | Keys tab, select the key and click Delete.
or
Find the key in Model Explorer | EntityName folder | Keys | right-click the key
and select Delete Item.
It's not possible to delete a primary key. However, it can remain empty. It's not
possible to delete an alternate key of unique attribute either.
Linking Method
In Toad Data Modeler, you can link parent and child entities:
l
121
Related Topics
PER - LER Conversion Information (page 428)
Unique Attributes
Toad Data Modeler creates new alternate keys for unique attributes automatically.
Example: There are two attributes in the T_GENRE entity.
122
123
124
125
126
Foreign Keys
Foreign Keys in Toad Data Modeler
As soon as you create a relationship in Toad Data Modeler, foreign keys are created
automatically in the child entity (automatic key migration).
There are two types of foreign keys:
l
The type of FK depends on what relationship you create. (See "Identifying Relationship" (page
160) for more information.
127
Select Settings | Options | Physical Model | General tab | Synchronize Not Null with
Mandatory Parent.
By default, this checkbox is selected. You can change the settings during your modeling, the
new settings will be used straight away for items that you will create in your model.
l
Synchronization disabled: If you clear the Not Null checkbox of the FK attribute, the
cardinality of Mandatory Parent will remain unchanged.
Name of PK Attribute
128
Related Topics
NotNull Property for PK and AK Attributes (page 118)
Buttons: (page 168)
PER - LER Conversion Information (page 428)
FK Mapping
In Toad Data Modeler, you can control your foreign keys. Foreign keys mapping feature allows
you to create Compound Keys, use existing keys etc.
Example:
In the Genre entity, there is a Genre ID attribute (primary key), and in the Film entity the Genre
ID attribute exists too.
If you create a new relationship between the two entities, a new foreign key will be created
automatically.
129
130
Tip: To restore the original foreign key later, edit the relationship again | Foreign Keys tab and
select the item 'FK attribute (New)'.
Automatic FK Mapping
You can also set Automatic FK Mapping in Settings | Options | Model | Physical Model.
131
EnableToad Data Modeler searches for matching attributes. If a single option is found,
it gets mapped. If multiple options are found, a dialog appears.
Always Show DialogThe dialog opens even if only a single option is found.
Indexes
Indexes
To create an index
In the Entity Properties form, select the Indexes tab and click Add.
Tip: You can also create indexes in Model Explorer | Entities folder | Unfold the
selected entity | Right-click the Indexes item. | Add Index.
To edit indexes
In the Entity Properties dialog | Indexes tab, double-click the index or press Edit.
Tip: You can also edit/rename/delete indexes in Model Explorer | EntityName
folder | Indexes | Right-click it the selected index.
Option
Description
Above the Object Navigator Box, you can see name
of entity that the index belongs to. Click the button
on top right- hand corner to display parent form
Option
Description
(Entity Properties form).
Object
Navigator box
General Tab
Description
Caption
Name
Schema
Unique
Bitmap Index
Generate
Description
Available
Selected
Notes Tab
Index
Properties
Tab
Description
Tablespace
132
133
Indextype
ODCI
Parameters
Right-click the WS, select Workspace Format | Entity tab and select the Display
Indexes checkbox.
Note: No matter if indexes are displayed or not, you can see which attribute belongs to
which index (see e.g. attribute Name belonging to indexes i_name and i_name_address name (IX1,IX2).
To delete an index
In the Entity Properties dialog | select the Indexes tab, select the index and click Delete.
Check Constraints
Check Constraints
Check constraints can be created on tab Check Constraints in the Entity Properties form (for
multiple column check constraints) or Check Constraints on the Attribute Properties dialog
(single column check constraint).
To add a check constraint
In the Entity Properties form, select the Check Constraints tab and click Add.
Tip:You can also add a constraint in the Model Explorer | Entities folder |
Unfold the selected entity. | Right-click the Check Constraints item. | Add Check
Constraint.
In the Entity Properties form | Check Constraints tab, double-click the selected check
constraint or press Edit .
Tip: You can also edit/rename/delete check constraints in Model Explorer |
134
Description
Caption
Name
Check
Constraint
Rule
Generate
Notes Tab
Tips:
l
To move a check constraint, use Drag&Drop techniques on the Check Constraints tab
(folder) of a target entity (in Model Explorer).
To delete a check constraint, select the check constraint and click Delete on the Check
Constraints tab in the Entity Properties form.
135
Triggers
Triggers
To add a trigger
In the Entity Properties form, select the Triggers tab and click Add.
Tip:You can also add a trigger in the Model Explorer | Entities folder | Unfold
the selected entity. | Right-click the Triggers item. | Add Trigger.
To edit a trigger
In the Entity Properties form | Triggers tab, double-click the selected trigger or
press Edit.
Tip: You can also edit/rename/delete triggers in Model Explorer | EntityName
folder | Triggers | Right-click the selected trigger.
Option
Description
Above the Object Navigator Box, you can see name of
entity that the trigger belongs to. If you click the button
on top right-hand corner, parent form will open (Entity
Properties form).
General
Tab
Description
Caption
Name
Schema
Trigger Fire
Trigger
Events
Generate
Generate
SQL Only
Notes Tab
136
137
Tips:
l
To copy a trigger, CTRL + Drag&Drop techniques on the Triggers tab (folder) of a target
entity (in Model Explorer).
To move a trigger, use Drag&Drop techniques on the Triggers tab (folder) of a target
entity (in Model Explorer).
To delete a trigger, select the trigger and click Delete on the Triggers tab in the Entity
Properties form.
Permissions
Permissions
In Toad Data Modeler, you can assign permissions to the following objects: Entity, Attribute,
User Data Type, View, Procedure, Schema, Users and User Groups.
A list of permitted objects varies according to a database type. E.g. in some databases, it's not
possible to assign a permission for Users.
138
For every object, different permissions can be set (SELECT, INSERT, UPDATE etc.), depending
on selected database.
Options for permissions are described in the following example of permissions for entity.
Permissions for attribute, user data type etc. are set in the Properties dialog of particular object |
Permissions tab.
Add Permissions
To be able to add a Permission, it's necessary to define a User or User Group. If you forget to
define them first, never mind. Toad Data Modeler allows you to define them directly on tab
Permissions of the appropriate object - click Users or User Groups.
To add a permission for entity
In the Entity Properties form, select the Permissions tab and click Add.
Tip:You can also add a permission in the Model Explorer | Entities folder |
Unfold the selected entity. | Right-click the Permissions item. | Add Permission
After you add a new permission and confirm Apply, a new item (user or user group) will display
(e.g. Dave).
If you want to add the created permission to another user or user group, press F2 and select
appropriate user or user group from the User (User Group) box.
Define items in other columns in the same way (F2 or via inplace editor) - Grantor,
SELECT etc.
Permissions
Description
139
Tab
User (User
Group)
Grantor
In the Entity Properties form | Permissions tab, double-click the selected permission or
press Edit .
Tip: You can also edit/rename/delete permissions in Model Explorer | EntityName folder |
Permissions | Right-click the selected permission.
General
Tab
Description
Permissions
Status
with Grant
Option
Tip: To delete a permission, in the Entity Properties form | Permissions tab, select the
permission and click Delete.
Related Topics
Method A - via the Users dialog (page 200)
User Groups (page 202)
PER - PER Conversion Information (page 425)
140
Related Topics
Data Type Conversion Settings (page 422)
PER - PER Conversion Information (page 425)
User Data Types (page 141)
Dictionary TypesIn Toad Data Modeler, you can define dictionary types. Dictionary is an alias
of data type (must be supported by database).Note: In Oracle db, only user data types are used.
Nevertheless, in MS SQL db, user data types and also dictionary types are used.To add a
dictionary typeSelect Model | Dictionary Types and click Add in the Dictionary Types dialog.
Tip:You can also add a dictionary type in the Model Explorer | Right-click the Dictionary
Types folder and select Add Dictionary Type.To edit a dictionary typeSelect Model | Dictionary
Types and double-click the selected dictionary type or click Edit in the Dictionary Types
dialog.Tip: You can also edit/rename/delete dictionary types in Model Explorer |Dictionary
Types folder | Right-click the selected dictionary type.General TabDescriptionCaption Logical
dictionary type nameNamePhysical dictionary type nameData TypeData Type selection
boxNotes: Other options on the General tab vary according to a database type. Options specific
for your database can be found in the "Databases" chapter.All changes you make for selected
dictionary type will be automatically applied in all attributes with this dictionary type.To Do
TabOn this tab, you can write some tasks on the selected dictionary type. Note: To see all To
Do tasks, select Model | To Do. Used In TabAll attributes with this dictionary type are listed on
this tab.In the Name column, there are names of the entity and attribute with this dictionary type.
Double-click it to open the Attribute Properties dialog.Notes TabTab for notes on the dictionary
type.To select a dictionary type for attributesOpen the Attribute Properties dialog of the selected
attribute | General tab.From the Data Type box, select the required dictionary type. Tips:You
can reach the Dictionary Types dialog also from the Attribute Properties dialog - see the small
icons next to the Data Type box.Click OK+Add in the Dictionary Type Properties dialog to
create another dictionary type.To copy dictionary types, use CTRL + Drag&Drop techniques.To
move dictionary types, use Drag&Drop techniques.You can copy and move your dictionary
types within a model and between models of the same and different databases:In Dictionary
Types dialog (Model menu)In Model Explorer | Dictionary Types folderBetween Model Explorer
and Dictionary Types dialogTo delete dictionary types, select:Model | Dictionary Types | Select
a dictionary type and click Delete.Model Explorer | Dictionary Types folder | Right-click and
select Delete Item.Notification! - Deleted dictionary type will be removed from all attributes that
had this dictionary type. In these attributes, first available data type from the Data Type list will
be selected. To find out which attributes they are, you should open the Dictionary Type
Properties dialog | Used in tab before you delete the dictionary type. If you delete the dictionary
141
type by mistake, you can use Undo. Related TopicsUser Data TypesDomainsEdit
AttributesExport/Import Dictionary (page 1)
Domains (page 149)
User Data Types
In Toad Data Modeler, you can define your own data types (only provided that they are
supported in the database you use).
To add a user data type
Select Model | Model Items | User Data Types and click Add in the User Data
Types dialog.
Tip:You can also add a user data type in the Model Explorer | Right-click the
User Data Types folder and select Add User Data Type.
Example: User Data Types listed in User Data Types dialog (Model menu)
Select Model | User Data Types and double-click the selected data type or click Edit in
the User Data Types dialog.
Tip: You can also edit/rename/delete user data types in Model Explorer |User
Data Types folder | Right-click the selected user data type.
General
Tab
Description
Caption
Name
Schema
Type
142
Generate
SQL Only
Note: All changes you make for selected user data type will be
automatically applied in all attributes with this data type.
To Do Tab
Used In
Tab
All attributes with this user data type are listed on this
tab.
In the Name column, there are names of the entity and
attribute with this user data type. Double-click it to open
the Attribute Properties dialog.
Permissions
Tab
Notes Tab
Object
Type Tab
143
144
145
Tips:
1. To copy user data types, use CTRL + Drag&Drop techniques.
2. To move user data types, use Drag&Drop techniques.
You can copy and move your user data types within a model and between models of the
same and different databases:
l
146
Model | User Data Types | Select a user data type and click Delete.
Notification! - Deleted data type will be removed from all attributes that had this data type.
In these attributes, the deleted user data type will be replaced with a type that it has been
originally created from. To find out which attributes they are, you should open the User
Data Type Properties dialog | Used in tab before you delete the user data type. If you delete
the data type by mistake, you can use Undo.
Related Topics
Dictionary TypesIn Toad Data Modeler, you can define dictionary types. Dictionary is an alias
of data type (must be supported by database).Note: In Oracle db, only user data types are used.
Nevertheless, in MS SQL db, user data types and also dictionary types are used.To add a
dictionary typeSelect Model | Dictionary Types and click Add in the Dictionary Types dialog.
Tip:You can also add a dictionary type in the Model Explorer | Right-click the Dictionary
Types folder and select Add Dictionary Type.To edit a dictionary typeSelect Model | Dictionary
Types and double-click the selected dictionary type or click Edit in the Dictionary Types
dialog.Tip: You can also edit/rename/delete dictionary types in Model Explorer |Dictionary
Types folder | Right-click the selected dictionary type.General TabDescriptionCaption Logical
dictionary type nameNamePhysical dictionary type nameData TypeData Type selection
boxNotes: Other options on the General tab vary according to a database type. Options specific
for your database can be found in the "Databases" chapter.All changes you make for selected
dictionary type will be automatically applied in all attributes with this dictionary type.To Do
TabOn this tab, you can write some tasks on the selected dictionary type. Note: To see all To
Do tasks, select Model | To Do. Used In TabAll attributes with this dictionary type are listed on
this tab.In the Name column, there are names of the entity and attribute with this dictionary type.
Double-click it to open the Attribute Properties dialog.Notes TabTab for notes on the dictionary
type.To select a dictionary type for attributesOpen the Attribute Properties dialog of the selected
attribute | General tab.From the Data Type box, select the required dictionary type. Tips:You
can reach the Dictionary Types dialog also from the Attribute Properties dialog - see the small
icons next to the Data Type box.Click OK+Add in the Dictionary Type Properties dialog to
create another dictionary type.To copy dictionary types, use CTRL + Drag&Drop techniques.To
move dictionary types, use Drag&Drop techniques.You can copy and move your dictionary
types within a model and between models of the same and different databases:In Dictionary
Types dialog (Model menu)In Model Explorer | Dictionary Types folderBetween Model Explorer
and Dictionary Types dialogTo delete dictionary types, select:Model | Dictionary Types | Select
a dictionary type and click Delete.Model Explorer | Dictionary Types folder | Right-click and
select Delete Item.Notification! - Deleted dictionary type will be removed from all attributes that
had this dictionary type. In these attributes, first available data type from the Data Type list will
be selected. To find out which attributes they are, you should open the Dictionary Type
Properties dialog | Used in tab before you delete the dictionary type. If you delete the dictionary
type by mistake, you can use Undo. Related TopicsUser Data TypesDomainsEdit
AttributesExport/Import Dictionary (page 1)
Domains (page 149)
147
Select Model | Dictionary Types and click Add in the Dictionary Types dialog.
Tip:You can also add a dictionary type in the Model Explorer | Right-click the
Dictionary Types folder and select Add Dictionary Type.
Select Model | Dictionary Types and double-click the selected dictionary type or click
Edit in the Dictionary Types dialog.
Tip: You can also edit/rename/delete dictionary types in Model Explorer
|Dictionary Types folder | Right-click the selected dictionary type.
General
Tab
Description
Caption
Name
Data Type
Notes:
1. Other options on the General tab vary according to a database
type. Options specific for your database can be found in the
"Databases" chapter.
2. All changes you make for selected dictionary type will be
automatically applied in all attributes with this dictionary type.
To Do Tab
Used In
Tab
148
Notes Tab
Notification! - Deleted dictionary type will be removed from all attributes that had this
dictionary type. In these attributes, first available data type from the Data Type list will be
selected. To find out which attributes they are, you should open the Dictionary Type
Properties dialog | Used in tab before you delete the dictionary type. If you delete the
dictionary type by mistake, you can use Undo.
Related Topics
User Data Types (page 141)
Domains (page 149)
Edit Attributes (page 105)
149
Select Model | Model Items |Domains and click Add in the Domains dialog.
Tip:You can also add a domain in the Model Explorer | Right-click the
Domains folder and select Add Domain.
To edit a domain
Select Model | Model Items | Domains and double-click the selected domain or click
Edit in theDomains dialog.
Tip: You can also edit/rename/delete domains in Model Explorer |Domains
folder | Right-click the selected domain.
General Tab
Description
Caption
Name
Data Type
Notes:
1. Other options on the General tab vary according to a database
type. Options specific for your database can be found in the
"Databases" chapter.
2. All changes you make for the selected domain will be
automatically applied in all attributes with this domain.
Check
150
Constraints
Tab
constraints of a domain.
To Do Tab
Used In Tab
Notes Tab
151
152
Tips:
1. To copy domains, use CTRL + Drag&Drop techniques.
2. To move domains, use Drag&Drop techniques.
You can copy and move your domains within a model and between models of the same
and different databases:
l
153
Notification! - The domain will be deleted from all attributes containing it. To find out,
which attributes they are, you should open the Domain Properties dialog | Used in tab
before you delete the domain. If you delete the domain by mistake, you can use Undo.
Related Topics
User Data Types (page 141)
Dictionary TypesIn Toad Data Modeler, you can define dictionary types. Dictionary is an alias
of data type (must be supported by database).Note: In Oracle db, only user data types are used.
Nevertheless, in MS SQL db, user data types and also dictionary types are used.To add a
dictionary typeSelect Model | Dictionary Types and click Add in the Dictionary Types dialog.
Tip:You can also add a dictionary type in the Model Explorer | Right-click the Dictionary
Types folder and select Add Dictionary Type.To edit a dictionary typeSelect Model | Dictionary
Types and double-click the selected dictionary type or click Edit in the Dictionary Types
dialog.Tip: You can also edit/rename/delete dictionary types in Model Explorer |Dictionary
Types folder | Right-click the selected dictionary type.General TabDescriptionCaption Logical
dictionary type nameNamePhysical dictionary type nameData TypeData Type selection
boxNotes: Other options on the General tab vary according to a database type. Options specific
for your database can be found in the "Databases" chapter.All changes you make for selected
dictionary type will be automatically applied in all attributes with this dictionary type.To Do
TabOn this tab, you can write some tasks on the selected dictionary type. Note: To see all To
Do tasks, select Model | To Do. Used In TabAll attributes with this dictionary type are listed on
this tab.In the Name column, there are names of the entity and attribute with this dictionary type.
Double-click it to open the Attribute Properties dialog.Notes TabTab for notes on the dictionary
type.To select a dictionary type for attributesOpen the Attribute Properties dialog of the selected
attribute | General tab.From the Data Type box, select the required dictionary type. Tips:You
can reach the Dictionary Types dialog also from the Attribute Properties dialog - see the small
icons next to the Data Type box.Click OK+Add in the Dictionary Type Properties dialog to
create another dictionary type.To copy dictionary types, use CTRL + Drag&Drop techniques.To
move dictionary types, use Drag&Drop techniques.You can copy and move your dictionary
types within a model and between models of the same and different databases:In Dictionary
Types dialog (Model menu)In Model Explorer | Dictionary Types folderBetween Model Explorer
and Dictionary Types dialogTo delete dictionary types, select:Model | Dictionary Types | Select
a dictionary type and click Delete.Model Explorer | Dictionary Types folder | Right-click and
select Delete Item.Notification! - Deleted dictionary type will be removed from all attributes that
had this dictionary type. In these attributes, first available data type from the Data Type list will
be selected. To find out which attributes they are, you should open the Dictionary Type
Properties dialog | Used in tab before you delete the dictionary type. If you delete the dictionary
type by mistake, you can use Undo. Related TopicsUser Data Types (page 1)Domains (page 1)
Edit Attributes (page 1)Domains (page 1) (page 1)
Edit Attributes (page 105)
Domains (page 154)
PER - LER Conversion Information (page 428)
154
Export/Import Dictionary
Toad Data Modeler allows you to use dictionary items also in other models. You can simply
export all of them to the .TXI file, and then import them to any model at any time. You can save
the .TXI file where you want, no default path is defined.
Dictionary items are:
l
Dictionary Types
Domains
Domains
They have only a logical meaning. They are not generated in DDL/SQL script. If a domain is
used in attribute, only values of the domain are transferred to the attribute during the DDL script
generation process.
Dictionary Types
They are data types that are derived from other data types. They can be generated in final
DDL script.
155
Relationships
Notation and Cardinality
IE Notation
Cardinality
One-to-many relationship is represented by this symbol:
156
IDF1X Notation
Cardinality
one or more
zero or one
Parent: mandatory Child: mandatory
157
Relationship Types
Identifying Relationship
158
Non-identifying Relationship
Non-identifying Self-relationship
159
M:N Relationship
Related Topics
Identifying Relationship (page 160)
Relationship Types
Toad Data Modeler supports the following relationship types (physical model):
l
Identifying
Non-identifying
M:N relationship
Identifying Relationship
160
161
Primary key migrates from parent entity to child entity and there becomes a part of the primary
key. It is used when the primary key of the child entity is unable to provide definite
identification.
An entity, connected with a parent entity through an identifying relationship, is called
"dependent" entity and is shown in a model with rounded corners.
The Order Record entity cannot exist itself. It is dependent on entities Customer and Film.
Therefore the Identifying relationship is used. The Order Record entity is a dependent entity, and
the Customer ID and Movie ID items are its unique record identifiers.
Non-Identifying Relationship
Primary key migrates from parent entity to child entity and does not become a part of the primary
key. Non-identifying relationships are represented by dashed lines. In the dependent table, the
attribute is referred to as a foreign key.
The Film ID as the unique identifier for Film is sufficient. Therefore the non-identifying
relationship is used. The Genre ID is only a foreign key. The film can exist without being
162
M:N Relationship
-- Table Sup_Price
CREATE TABLE "Sup_Price"(
"Supplier" Char(10 BYTE) NOT NULL,
"ArticleID" Integer NOT NULL
)
/
-- Add keys for table Sup_Price
ALTER TABLE "Sup_Price" ADD CONSTRAINT "PK_Sup_Article" PRIMARY KEY
("Supplier","ArticleID")
163
Related Topics
Create Relationships (page 211)
Change Type of Relationship
Create Relationships
1. Select a relationship type - click the appropriate relationship icon on the toolbar:
Identifying relationship (also CTRL+R)
Non-identifying relationship
M:N relationship
2. Move your mouse cursor over the work area. (The cursor changes its appearance.)
3. Click the first entity (parent) and then the target entity (child).
Tips:
l
Select a mode for creating relationships - Straight Mode or Right Angled mode.See
"Straight Mode" (page 171) for more information.
While creating a relationship, you can add handle points. Click the parent entity and then
click the work area as many times as many handle points you want to create. Finally click
the child entity.
164
1. Press SHIFT and click the Relationship icon. See the blue frame in the icon now.
2. Create as many relationships in you model as you need.
3. Right-click the work area (or click the Relationship icon again) to turn this function off.
Note: This function can be applied for any object on the toolbar.
Related Topics
Buttons: (page 168)
Linking Method (page 121)
Synchronization of NotNull and Mandatory Parent (page 127)
Automatic FK Mapping (page 130)
Features (page 374)
Default Values (page 470)
PER - LER Conversion Information (page 428)
Edit Relationships
165
Tip: When you point your mouse cursor at a relationship line, parent and child attributes are
highlighted on the Workspace. You can set up the color at: Settings | Options | Graphics |
Colors area | Highlight Color.
Option
Description
Caption
Name
Option
Description
are naming conventions? Via naming conventions
you can: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 dont, 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.Naming Conventions in Toad Data
Modeler Basic InformationNaming conventions are
supported for most objects of physical model for
which you can define a name (physical name) and a
caption (logical name).A naming convention can be
used in various models across different database
systems.You can use them for new models, reversed
models or models that already exist in Toad Data
Modeler.Every defined naming convention is stored
in external .TXN file stored by default in your
Documents folder, directory Toad Data Modeler\
Installation name\Naming Conventions.You can
define only one naming convention for one
model.Toad Data Modeler allows you
to:Automatically create physical names based on
logical names and naming conventions rules.
(Example: Customer ID => T_CUSTOMER_ID). This
feature makes you more productive as you need
significantly less time to define both logical and
physical names.Define valid characters for physical
names and set how invalid characters should be
replaced.Use glossaries for automatic word
replacement during new objects creation. Glossaries
can be made of multiple CSV files and you can easily
turn on or turn off the selected glossaries.Verify
naming conventions and rewrite physical names in a
batch mode. Check your model and replace physical
names of objects that dont match naming
conventions rules.Synchronize captions and names
(without specific naming convention
definitions).Import/export of glossaries (*.CSV files)
also from/to other tools.See the Naming Convention
Properties dialog | Glossary tab | Import button.You
can find some CSV files with diacritical marks at:
166
Option
Description
formation.
General Tab
Description
Relationship
Type
Parent Key
Referential
Integrity
Cardinality
Area
Settings
Parent Entity
Name and
Child Entity
Name
Notes Tab
SQL Preview
Tab
167
168
Option
Description
Tip: To select this option by default, select Settings |
Options | Physical Model | General tab | Word
Wrap for SQL Preview.
Index to
Foreign Key
Tab
Buttons:
- opens the Application Variables form
OK - confirms all changes and closes the form
Cancel - cancels the changes you have made, and closes the form
Apply - confirms the changes (The form will remain opened for further edit.)
Help - opens the Help file
Related Topics
Change Type of Relationship
Format Relationship LinesIn Toad Data Modeler, you can change format of a particular
relationship or more relationships at one jump. (Use SHIFT key for multiple selection.)To change
a format of all relationship lines on the WorkspaceRight-click the WS and select Workspace
Format.To change format of the selected relationship(s)Right-click the relationship and select
Format.To change format of the relationship name (caption)Right-click the relationship | Format |
Click Font Settings and define the settings in the Font dialog.Tip: Use the Inplace editor to
change the relationship name in your diagram directly. See Inplace Editor for more
information.Related TopicsFormat ObjectsEdit Relationship Lines (page 1)
Inplace Editor (page 46)
Object Navigator Box (page 402)
Features (page 374)
Referential Integrity
To define integrity rules of a relationship related to changing, adding or deleting a record
inside parent or child entity
Option
Description
Parent
Update
169
170
Option
Description
If the primary key is changed inside the parent entity
record, and inside the child entity there are records
allocated to the original parent record primary key, the
database will change appropriate foreign keys inside the
child entity.
Set NULL
If the primary key is changed inside the parent entity
record, and inside the child entity there are records
allocated to original parent record primary key, the
database will set appropriate foreign keys inside the child
entity to NULL.
Set Default
If the primary key is changed inside the parent entity
record, and inside the child entity there are records
allocated to the original parent record primary key, the
database will set appropriate foreign keys inside the child
entity to a default value.
Parent
Delete
Tip: Define default values for referential integrity type. See "Default Values" (page 470) for more
information.
171
Straight mode
To set up the default mode for new models and new workspaces of already existing models
Select Settings | Options | Physical/Logical Model | tab Workspace, select or clear the
Right Angled Lines checkbox.
Note: In already existing models, you can switch between the modes during
your modeling on Workspaces. (Right-click the Workspace and select
Workspace Format.)
Straight Mode
In the Straight Mode, you can:
l
172
Right-click the selected Workspace and click Straight All Lines or Change Lines to
Right Angled.
Right-click the selected relationship line(s) and click Straight Line or Change Line to
Right Angled, or
Right-click the selected relationship line(s), select Format | Line tab and select
Force Right Angled Line.
Lock Points in Right Angled Modeif this option is checked and you move with the end
shape, the line tries to retain all inner points while staying right angled. In other cases, it tries to
produce an optimal right angled line according to Z or L style.
This option is active only if right angled mode for the given Workspace or line is checked.
Force Right Angled Lineenables right angled mode for a single line.
This option is active only if right angled mode is not selected for the given Workspace.
173
You cannot move handle points (but can move the selected line segment).
You cannot change the right-angled lines to straight lines (but can change the straight
lines to right-angled).
Drag&drop techniques
Keyboard arrows
Tips:
1. To move an entity with its relationship, including all handle points, select the entity and
the appropriate relationship (use SHIFT) and drag and drop the entity. Result: The
selected entity, relationship and its handle points will move too. Position of handle points
will be preserved.
2. Move only the selected line segment: Press ALT key, hold it down, select the line
segment and move it by the drag and drop techniques or via the keyboard arrows. (This
option works only for angled lines (however, in both Straight and Right-angled modes).)
3. In the Objects menu, see the following options:
Select Links Automatically - Enable this option if you want to select the
relationships of related entities automatically while making the multiple selection
via SHIFT key.
Recalculate on Move - Enable this option if you want to recalculate and see
position of relationships while moving a bloc of objects.
174
Right-click the selected relationship in particular place and select Move Caption
Here, Move Caption to Parent or Move Caption to Child.
Right-click the Workspace | Workspace Format | General tab | clear the Display Line
Names checkbox.
Click the relationship name (caption). The appropriate relationship line will be
highlighted on the Workspace by the blue color.
Click the relationship line, its name (caption) will be highlighted in a frame.
175
Explorer and grids (e.g. Entity Properties form)Use SHIFT or CTRL keys.Related TopicsObject
ViewerSearch Objects" (page 1) for more information.
To edit the selected relationships and change their format at one jump, use SHIFT for multiple
selection. Then right-click any selected relationship and select Edit or Format.
Related Topics
Format Relationship LinesIn Toad Data Modeler, you can change format of a particular
relationship or more relationships at one jump. (Use SHIFT key for multiple selection.)To change
a format of all relationship lines on the WorkspaceRight-click the WS and select Workspace
Format.To change format of the selected relationship(s)Right-click the relationship and select
Format.To change format of the relationship name (caption)Right-click the relationship | Format |
Click Font Settings and define the settings in the Font dialog.Tip: Use the Inplace editor to
change the relationship name in your diagram directly. See Inplace Editor for more
information.Related TopicsFormat ObjectsEdit Relationship Lines (page 1)
Format Relationship Lines
In Toad Data Modeler, you can change format of a particular relationship or more relationships at
one jump. (Use SHIFT key for multiple selection.)
To change a format of all relationship lines on the Workspace
Right-click the relationship | Format | Click Font Settings and define the settings in the
Font dialog.
Tip: Use the Inplace editor to change the relationship name in your diagram directly. See
"Inplace Editor" (page 46) for more information.
Related Topics
Format Objects (page 62)
Straight Mode (page 171)
176
Option
Description
Format
Add into
Workspace
Remove from
Workspace
177
Option
Description
Delete Object
Arrange
Add Object to
Gallery
Straight Line
Change Line
to Right
Angled
Simplify Line
Reduce
Handle Points
Move Caption
Here
Move Caption
to Parent
Move Caption
to Child
Edit
Edit
Entities/Views
178
Option
Description
Opens the parent/child Entity Properties form .
Add to
Category
Macros
Views
Views
Toad Data Modeler allows you to display and model views in your ER diagrams visually.
179
180
2. Click
on the toolbar and draw view relationships between some existing table or
view and your newly created view.
3. Double click the view relationship line to edit it. In Alias field you can specify a new
alias name for the linked table.
181
182
183
- Deletes an object with all its shortcuts from model.Example:Your model has two Workspaces WS1 and WS2. You add a new entity to your model. -> The entity (its shortcuts) is contained on
both Workspaces (- Auto Complete option is enabled). However, you need to have the new
entity on WS1 only.Solution: You select the entity on the WS2 and simply press Delete. Result:
The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The entity still exists
in your model. If you wanted to delete the entity from your model completely (including all its
shortcuts from all Workspaces), you would select the Delete Object option (or press
SHIFT+Delete). For the deletion, you could select any entity shortcut on any WS - either WS1 or
WS2. The entity would be deleted from your model. To remove shortcut of object from
WorkspaceSelect an object (shortcut of object) on the WS and press Delete.Tip: You can delete
shortcuts in Model Explorer too - select particular shortcut of an object in the Shortcuts folder |
right-click | Delete Item.To delete objects from model (including all its shortcuts)Select the
shortcut of objecton Workspace and press SHIFT+Delete.Tip: You can also delete the objects:In
Model Explorer - select an object | right-click | Delete Item.In the Object dialog (Model menu |
Model Items | Entities, Relationships etc.) - select the object and click Delete.When you press
Delete or SHIFT+Delete in your ER diagram, the following message will display:Select the
action you want to perform.Note: Key shortcuts: ALT+O for OK and ALT+C for Cancel. To set
the default Delete options in Toad Data Modeler:Select Settings | Options | Dialog Boxes | Other
tab.OptionDescriptionDisplay DialogWhenever you press Delete or SHIFT+Delete in your ER
diagram, the Delete Confirmation Dialog will pop up and you will be able to select what action
you want to perform in particular case.Remove Graphical Representative of ObjectIf this option
is selected, the Delete will always remove selected shortcut(s) of object from particular
Workspace. SHIFT+Delete will have to be used to completely delete an object from your model.
Delete ObjectIf this option is selected, the Delete will completely delete selected object(s) from
your model, including all the object shortcuts. There is no option to only remove selected
shortcut(s) of object. (The Delete will replace SHIFT+Delete.)Related TopicsShortcuts of
Objects (page 1)Select Objects Physical Model Pointer and Objects Selection tool
optionsLogical Model Pointer and Objects Selection tool optionsMetamodel Pointer and Objects
Selection tool optionsSelect Links Automaticallyalso available from Objects menu. By default
enabled. When enabled, lines/relationships between selected objects are selected automatically.
During one selecting process you can enable and disable this option several times to select only
certain lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
184
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1) (page 1)
Materialized Views
Materialized Views
Materialized Views are supported in the following databases: Oracle 11g, Oracle 10g and 9i, DB
2 v. 9.5 (LUW), DB 2 v. 9 (LUW), DB2 UDB v. 8 (LUW), Sybase SQLAnywhere 11.
Toad Data Modeler 3.x allows you to display materialized views graphically in your
ER diagram.
To add a materialized view
Click
or
Model Explorer | Right-click the Materialized Views folder | Add
Materialized View.
Tip: Select Model | Model Items |Materialized Views and click Add in the Materialized
Views dialog. Here, you can also view all materialized views of your model.
To edit a materialized view
Option
Description
Object
Navigator Box
General Tab
Description
Caption
Option
Description
Name
Schema
Generate
Generate SQL
only
SQL Tab
Permissions
Tab
To Do Tab
Before Script
Tab
After Script
Tab
Notes Tab
SQL Preview
Tab
Click
at the bottom of this tab to see the part of
SQL code for the materialized view.
Refresh Tab
Physical
Properties
Tab
185
186
Option
Description
Materialized
Views
Properties
Tab
Create Index
Tab
Related Topics
Copy Objects (page 68)
Move Objects (page 69)
Delete ObjectsIn Toad Data Modeler, there are two deletion options (see the Objects menu):
Remove from Workspace (Delete) - Removes an object shortcut from a Workspace. Delete Object
- Deletes an object with all its shortcuts from model.Example:Your model has two Workspaces WS1 and WS2. You add a new entity to your model. -> The entity (its shortcuts) is contained on
both Workspaces (- Auto Complete option is enabled). However, you need to have the new
entity on WS1 only.Solution: You select the entity on the WS2 and simply press Delete. Result:
The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The entity still exists
in your model. If you wanted to delete the entity from your model completely (including all its
shortcuts from all Workspaces), you would select the Delete Object option (or press
SHIFT+Delete). For the deletion, you could select any entity shortcut on any WS - either WS1 or
WS2. The entity would be deleted from your model. To remove shortcut of object from
WorkspaceSelect an object (shortcut of object) on the WS and press Delete.Tip: You can delete
shortcuts in Model Explorer too - select particular shortcut of an object in the Shortcuts folder |
right-click | Delete Item.To delete objects from model (including all its shortcuts)Select the
shortcut of objecton Workspace and press SHIFT+Delete.Tip: You can also delete the objects:In
Model Explorer - select an object | right-click | Delete Item.In the Object dialog (Model menu |
Model Items | Entities, Relationships etc.) - select the object and click Delete.When you press
Delete or SHIFT+Delete in your ER diagram, the following message will display:Select the
action you want to perform.Note: Key shortcuts: ALT+O for OK and ALT+C for Cancel. To set
the default Delete options in Toad Data Modeler:Select Settings | Options | Dialog Boxes | Other
tab.OptionDescriptionDisplay DialogWhenever you press Delete or SHIFT+Delete in your ER
diagram, the Delete Confirmation Dialog will pop up and you will be able to select what action
you want to perform in particular case.Remove Graphical Representative of ObjectIf this option
is selected, the Delete will always remove selected shortcut(s) of object from particular
Workspace. SHIFT+Delete will have to be used to completely delete an object from your model.
Delete ObjectIf this option is selected, the Delete will completely delete selected object(s) from
your model, including all the object shortcuts. There is no option to only remove selected
shortcut(s) of object. (The Delete will replace SHIFT+Delete.)Related TopicsShortcuts of
Objects (page 1)Select Objects Physical Model Pointer and Objects Selection tool
optionsLogical Model Pointer and Objects Selection tool optionsMetamodel Pointer and Objects
187
Selection tool optionsSelect Links Automaticallyalso available from Objects menu. By default
enabled. When enabled, lines/relationships between selected objects are selected automatically.
During one selecting process you can enable and disable this option several times to select only
certain lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1) (page 1)
Procedures
Procedures
To add a procedure
To edit a procedure
Select Model | Procedures and double-click the selected procedure or click Edit.
Tip: You can also edit/rename/delete procedures in Model Explorer | Procedures
folder | Right-click the selected procedure.
General Tab
Description
Caption
Name
Schema
Procedure
Arguments
Invoker Rights
Definition is
Wrapped
Generate
188
Generate SQL
only
SQL Tab
Permissions
Tab
To Do Tab
Before Script
Tab
After Script
Tab
Notes Tab
189
190
191
Related Topics
Model Explorer (page 391)
Functions
Functions
To add a function
Select Model | Model Items |Functions and click Add in the Functions dialog.
Tip:You can also add a function in the Model Explorer | Right-click the
Functionsfolder | Add Function.
To edit a function
General Tab
Description
Caption
Name
Schema
Invoker Rights
(CURRENT_
USER)
Function
Arguments
Datatype of the
192
Return Value
Deterministic
Definition is
Wrapped
Generate
Generate SQL
only
SQL Tab
To Do Tab
Permissions
Tab
Before Script
Tab
After Script
Tab
Notes Tab
193
194
Tips:
1. To copy functions, use CTRL + Drag&Drop techniques.
2. To move functions, use Drag&Drop techniques.
You can copy and move your functions within a model and between models of the same
and different databases:
l
195
Related Topics
Model Explorer (page 391)
Defaults
Defaults
To add a default
Select Model | Model Items |Defaults and click Add in the Defaults dialog.
Tip:You can also add a default in the Model Explorer | Right-click the Defaults
folder | Add Default.
To edit a default
Select Model | Model Items | Defaults and double-click the selected default or click Edit.
Tip: You can also edit/rename/delete defaults in Model Explorer | Defaults
folder | Right-click the selected default.
196
197
Related Topics
Model Explorer (page 391)
Templates (page 473)
Check Constraint Rules
Check Constraint Rules
To add a check constraint rule
Select Model | Model Items |Check Constraint Rules and click Add in the Check
Constraint Rules dialog.
Tip:You can also add a check constraint rule in the Model Explorer | Right-click
the Check ConstraintRules folder | Add Check ConstraintRule.
Select Model | Model Items |Check Constraint Rules and double-click the selected
check constraint rule or click Edit.
Tip: You can also edit/rename/delete check constraint rules in Model Explorer |
Check ConstraintRules folder | Right-click the selected check constraint rule.
198
Related Topics
Model Explorer (page 391)
Schemas
Schemas
To add a schema
Select Model | Model Items |Schemas and click Add in the Schemas dialog.
Tip:You can also add a schema in the Model Explorer | Right-click the Schemas
folder | Add Schema.
To edit a schema
Select Model |Model Items | Schemasand double-click the selected schema or click Edit.
Tip: You can also edit/rename/delete schemas in Model Explorer | Schemas
folder | Right-click the selected schema.
Related Topics
Schema/Owner/Database Assignment (page 353)
199
Synonyms
Synonyms
To add a synonym
Select Model | Model Items |Synonyms and click Add in the Synonyms dialog.
Tip:You can also add a synonym in the Model Explorer | Right-click the
Synonyms folder | Add Synonym.
To edit a synonym
Related Topics
Templates (page 473)
Users
Users
Toad Data Modeler allows you to define Users and assign them to User Groups. Later you can
assign the Users and User Groups permissions to particular objects.
To add a user
Click
Note: To open the Users dialog, you can also select Model | Users.
or
In Model Explorer | Right-click the Users folder | Add User.
To edit a user
Model | Model Items |Users | double-click the selected user or click Edit.
or
In Model Explorer | Users folder | double-click the selected user or rightclick | Edit.
200
Option
Description
Object
Navigator
Box
General
Tab
Description
Caption
Name
Password
User's password
Membership
Tab
To Do
201
(The User Groups have already been defined in Model | Model Items |User Groups.)
Tip: If you confirm Apply, the User Properties dialog will remain opened, and you can
comfortably assign other users to user groups. - Simply select another user from the object
navigator box at the top.
on the toolbar.
2. From the User Groups dialog, select Administrators user group and click Edit.
3. In the User Group Properties dialog, click the Members tab.
4. Select SCOTT and click the Add arrow button to shift the selected user to the
window Selected.
Tips:
1. To copy users, use CTRL + Drag&Drop techniques.
2. To move users, use Drag&Drop techniques.
You can copy and move your users within a model and between models of the same and
different databases:
l
Related Topics
User Groups (page 202)
PermissionsIn Toad Data Modeler, you can assign permissions to the following objects: Entity,
Attribute, User Data Type, View, Procedure, Schema, Users and User Groups.A list of permitted
objects varies according to a database type. E.g. in some databases, it's not possible to assign a
permission for Users.For every object, different permissions can be set (SELECT, INSERT,
UPDATE etc.), depending on selected database.Options for permissions are described in the
following example of permissions for entity. Permissions for attribute, user data type etc. are set
in the Properties dialog of particular object | Permissions tab.Add PermissionsTo be able to add
a Permission, it's necessary to define a User or User Group. If you forget to define them first,
never mind. Toad Data Modeler allows you to define them directly on tab Permissions of the
appropriate object - click Users or User Groups. To add a permission for entityIn the Entity
202
Properties form, select the Permissions tab and click Add. Tip:You can also add a permission in
the Model Explorer | Entities folder | Unfold the selected entity. | Right-click the Permissions
item. | Add PermissionUser or User Group must exist to be able to add a permission.Example:
Created permission in the Entity Properties form:After you add a new permission and confirm
Apply, a new item (user or user group) will display (e.g. Dave).If you want to add the created
permission to another user or user group, press F2 and select appropriate user or user group from
the User (User Group) box.Define items in other columns in the same way (F2 or via inplace
editor) - Grantor, SELECT etc.Permissions TabDescriptionUser (User Group)Name of user (group)
that the permission has been assigned to.GrantorName of user (group) that has assigned a user
(group) the permission.Permissions: SELECT, INSERT, UPDATE, DELETE, RULE,
REFERENCES, TRIGGERTo edit a permissionIn the Entity Properties form | Permissions tab,
double-click the selected permission or press Edit .Tip: You can also edit/rename/delete
permissions in Model Explorer | EntityName folder | Permissions | Right-click the selected
permission.General TabDescriptionPermissionsList of all available permissions to particular
object.StatusShows if the particular permission has been assigned or not.Unchanged - No change
has been made.Grant - Permission has been granted.Deny - Permission has been denied. (E.g. in
MS SQL 2005 models.)with Grant OptionYes/No - Says if the permission can be assigned also to
another user (group). Tip: To delete a permission, in the Entity Properties form | Permissions tab,
select the permission and click Delete.Related TopicsUsersUser GroupsPER - PER Conversion
Information (page 1)
PER - PER Conversion Information (page 425)
User Groups
User Groups
Toad Data Modeler allows you to define Users and assign them to User Groups. Later you can
assign the Users and User Groups permissions to particular objects.
To add a user group
Click
Note: To open the User Groups dialog, you can also select Model| User Groups.
or
In Model Explorer | Right-click the User Groups folder | Add User Group.
To edit a user group
Model |Model Items | User Groups | double-click the selected user group or click Edit.
or
In Model Explorer | User Groups folder | double-click the selected user group or
right-click | Edit.
203
Option
Description
Object
Navigator
Box
General
Tab
Description
Caption
Name
Membership
Tab
Description
Available
Selected
Members
Tab
Description
User
Groups
section
Users
section
To Do
Tab
On this tab, you can write some tasks on the selected user
group.
204
Model |Model Items | User Groups | Select a user group and click Delete.
Model Explorer | User Groups folder | Right-click and select Delete Item.
Related Topics
Method A - via the Users dialog (page 200)
PermissionsIn Toad Data Modeler, you can assign permissions to the following objects: Entity,
Attribute, User Data Type, View, Procedure, Schema, Users and User Groups.A list of permitted
objects varies according to a database type. E.g. in some databases, it's not possible to assign a
permission for Users.For every object, different permissions can be set (SELECT, INSERT,
UPDATE etc.), depending on selected database.Options for permissions are described in the
following example of permissions for entity. Permissions for attribute, user data type etc. are set
in the Properties dialog of particular object | Permissions tab.Add PermissionsTo be able to add
a Permission, it's necessary to define a User or User Group. If you forget to define them first,
never mind. Toad Data Modeler allows you to define them directly on tab Permissions of the
appropriate object - click Users or User Groups. To add a permission for entityIn the Entity
Properties form, select the Permissions tab and click Add. Tip:You can also add a permission in
the Model Explorer | Entities folder | Unfold the selected entity. | Right-click the Permissions
item. | Add PermissionUser or User Group must exist to be able to add a permission.Example:
Created permission in the Entity Properties form:After you add a new permission and confirm
Apply, a new item (user or user group) will display (e.g. Dave).If you want to add the created
permission to another user or user group, press F2 and select appropriate user or user group from
the User (User Group) box.Define items in other columns in the same way (F2 or via inplace
editor) - Grantor, SELECT etc.Permissions TabDescriptionUser (User Group)Name of user (group)
that the permission has been assigned to.GrantorName of user (group) that has assigned a user
(group) the permission.Permissions: SELECT, INSERT, UPDATE, DELETE, RULE,
REFERENCES, TRIGGERTo edit a permissionIn the Entity Properties form | Permissions tab,
double-click the selected permission or press Edit .Tip: You can also edit/rename/delete
permissions in Model Explorer | EntityName folder | Permissions | Right-click the selected
permission.General TabDescriptionPermissionsList of all available permissions to particular
object.StatusShows if the particular permission has been assigned or not.Unchanged - No change
has been made.Grant - Permission has been granted.Deny - Permission has been denied. (E.g. in
MS SQL 2005 models.)with Grant OptionYes/No - Says if the permission can be assigned also to
another user (group). Tip: To delete a permission, in the Entity Properties form | Permissions tab,
select the permission and click Delete.Related TopicsUsersUser GroupsPER - PER Conversion
Information (page 1)
PER - PER Conversion Information (page 425)
205
Scenario
Create Oracle 10g physical model Videorental.
1. Click
2. Click the Physical Data Model tab and select a target database - Oracle 10g.
3. To the Model Name box, write the model name Videorental.
4. Confirm OK.
Result:
l
In the Application Window, designer for the Workspace All Items will open
automatically.
The status bar in the Application Window displays the database name. (DB: Oracle 10g
in our example.)
Main menu and the Designer toolbar for physical data model will activate.
Notes:
l
Database Name - A database for which the model is created (e.g. Oracle 10g). The
database name information can be found at the bottom of the Application Window, or is
displayed in the pop-up hint when you point your mouse cursor at the Model Name in
the Application View.
Model Name - A model can be saved to more files. In Toad Data Modeler, Model Name
should be understood as a title of a document that can be saved to several files of a
different name.
File Name - A name of file where the model is saved. File Name is defined after you
select Save Model or Save Model as.
Related Topics
Create Entities (page 206)
206
Create Entities
In Toad Data Modeler, there are several ways how to create entities - on the Workspace, via
Model Explorer and in the Entities dialog (Model | Entities). All the options are described in
the Help file. Here, you will create entities directly on the Workspace.
Scenario
Create entity Customer on the Workspace in your Videorental model.
1. Click
on the toolbar (also CTRL+E) and then click anywhere on the work area.
Caption
Name
207
Related Topics
Create Attributes (page 207)
Create Attributes
Scenario
Create attribute Customer ID in the Customer entity.
1. In the Entity Properties form of the Customer entity, click the Attributes tab.
2. Click Add to create Attribute1.
Tip: You can also use the quick Add button. - Write the attribute name and click
the small Add button then.
3. Confirm Apply to be able to edit the attribute.
4. Click Edit (or double-click the attribute) to specify its properties.
Caption
Name
Primary
Key
Not
Null
Unique
208
209
Data
Type
6. Feel free to define other database dependent options on tab General and also on other
tabs of the Attribute Properties dialog.
7. Confirm OK.
Related Topics
Create Primary Key
Select Colors for Attributes and Keys (page 350)
210
Keys do NOT migrate in Logical models, but only in Physical models. In Logical model,
only logical information is available. The relationships have only a logical meaning
(therefore keys do not migrate). However, in Physical model the information on foreign keys
is necessary. Therefore when you convert the Logical model to Physical model, FKs will be
displayed properly in the physical model. It is done automatically and there is not any way
to avoid doing this automatically.
Related Topics
PER - LER Conversion Information (page 428)
Migration of Keys
211
Create Relationships
1. Select a relationship type - click the appropriate relationship icon on the toolbar:
Identifying relationship (also CTRL+R)
Non-identifying relationship
M:N relationship
2. Move your mouse cursor over the work area. (The cursor changes its appearance.)
3. Click the first entity (parent) and then the target entity (child).
Tips:
l
Select a mode for creating relationships - Straight Mode or Right Angled mode.See
"Straight Mode" (page 171) for more information.
While creating a relationship, you can add handle points. Click the parent entity and then
click the work area as many times as many handle points you want to create. Finally click
the child entity.
212
1. Press SHIFT and click the Relationship icon. See the blue frame in the icon now.
2. Create as many relationships in you model as you need.
3. Right-click the work area (or click the Relationship icon again) to turn this function off.
Note: This function can be applied for any object on the toolbar.
Related Topics
Buttons: (page 168)
Linking Method (page 121)
Synchronization of NotNull and Mandatory Parent (page 127)
Automatic FK Mapping (page 130)
Features (page 374)
Default Values (page 470)
PER - LER Conversion Information (page 428)
Define Cardinality
Scenario
You need to set up cardinality 1:5 for the relationship Makes.
1. Double-click the Makes relationship on the Workspace.
2. Click the General tab | Cardinality area.
3. Type 5 to the Cardinality box.
213
214
Related Topics
Display Partiality (page 214)
Display Partiality
To define partiality for Parent and Child tables
1. Edit the selected relationship on the Workspace.
2. Click the General tab in the Relationship Properties dialog and select or clear the
Mandatory Parent and Mandatory Child checkboxes.
See how the relationship will look like for different partiality (to display cardinality in your ER
diagram, select Notation | IDEF1X):
Parent: Mandatory
Child: Mandatory
A teacher MUST have a lecture (the record related to lecture is mandatory), a lecture MUST be
attached to a teacher (the record related to teacher is also mandatory. Teacher is Mandatory.)
Parent: Mandatory
Child: Optional
A teacher MAY have a lecture (the record related to lecture is Optional), a lecture MUST be
attached to a teacher (Teacher is Mandatory.)
Parent: Optional
215
Child: Mandatory
A teacher MUST have a lecture (lecture is Mandatory), a lecture MAY be attached to a teacher
(teacher is Optional).
Parent: Optional
Child: Optional
A teacher MAY have a lecture (lecture is Optional), a lecture MAY be attached to a teacher
(teacher is Optional).
The information can be found on Relationship Properties form, see graphical representation at
bottom of the form.
Related Topics
Set up Referential Integrity Rules (page 216)
Set up Referential Integrity Rules
To set up referential integrity rules for Parent entities
Open the Relationship Properties form and see the Referential Integrity group box.
Restrict
Cascade
216
217
Set Null
Set Default
Related Topics
Connect Parent and Child Entities (page 218)
218
219
PFK
As soon as you create an identifying relationship, Toad Data Modeler automatically adds a copy
of the primary key of the Parent table to the Child table - Primary Foreign Key (PFK). (The
foreign key in Child table is a part of the primary key.)
FK
As soon as you create a non-identifying relationship, Toad Data Modeler automatically adds a
copy of the primary key of the Parent table to the Child table - Foreign key (FK). (This foreign
key in Child table is not a part of the primary key.)
In other words, foreign keys (PFKs and FKs) are imported from parent entities to child entities
automatically when you create relationship. Foreign keys cannot exist without relationships.
Therefore, you are not allowed to delete FK or PFK from Child tables either. To delete them, you
have to delete appropriate relationship.
In Toad Data Modeler, information on foreign keys can be found in:
l
The Attribute Properties dialog | Foreign Keys tab where you can see details on
particular FK.
220
The Relationship Properties dialog where you set up linking method between parent and
child entities.
Automatic FK Mapping
You can also set Automatic FK Mapping in Settings | Options | Model | Physical Model.
221
EnableToad Data Modeler searches for matching attributes. If a single option is found,
it gets mapped. If multiple options are found, a dialog appears.
Always Show DialogThe dialog opens even if only a single option is found.
222
Scenario
You have just added a self-relationship to the Film entity.
1. A copy of your identifying key attribute has been created in the entity - Film ID. Now
you have two Film ID attributes in the Film entity.
2. Edit the newly created Film ID attribute, define a new Name . The link to parent attribute
is displayed on right top corner of the form.
223
224
In MS SQL 2000 db, there are no user defined types but only Dictionary types.
Dictionary types are called user-defined data types in MS SQL 2000 database.
In PostgreSQL database, Users are not supported (only User Groups). To User Groups,
roles should be written.
and others.
Please read the Help file, "Databases" topic and select your database to see some screenshots and
options specific for your database.
Alternate Keys
As you already know, you can connect Parent and Child entities via:
l
Alternate keys are used when you want to link two entities using two attributes. These two
attributes make one unique item.
Scenario
For entity Film, you need to create an alternate key with attributes Title
and Director.
1. Edit the Film entity.
2. In the Entity Properties form click the Keys tab. Here, primary keys and alternate keys
are stored, and you can manage them easily - using the Add, Edit and Delete buttons. So
now click Add to create a new key and confirm Apply.
3. Edit the new key.
4. Define its properties on tab General and then click the Attributes tab.
5. From the window Available, select attributes Title and Director and click the Add arrow
button to move them to window Selected.
6. Define properties on other tabs at your convenience (e.g. Notes) and confirm OK.
Scenario: Now you want to select this alternate key for the linking method.
Indexes
To create an index
In the Entity Properties form, select the Indexes tab and click Add.
Tip: You can also create indexes in Model Explorer | Entities folder | Unfold the
selected entity | Right-click the Indexes item. | Add Index.
To edit indexes
In the Entity Properties dialog | Indexes tab, double-click the index or press Edit.
Tip: You can also edit/rename/delete indexes in Model Explorer | EntityName
225
Description
Above the Object Navigator Box, you can see name
of entity that the index belongs to. Click the button
on top right- hand corner to display parent form
(Entity Properties form).
Object
Navigator box
General Tab
Description
Caption
Name
Schema
Unique
Bitmap Index
Generate
Description
Available
Selected
Notes Tab
Index
Description
226
227
Properties
Tab
Tablespace
Indextype
ODCI
Parameters
Right-click the WS, select Workspace Format | Entity tab and select the Display
Indexes checkbox.
Note: No matter if indexes are displayed or not, you can see which attribute belongs to
which index (see e.g. attribute Name belonging to indexes i_name and i_name_address name (IX1,IX2).
To delete an index
In the Entity Properties dialog | select the Indexes tab, select the index and click Delete.
228
229
230
Views
Toad Data Modeler allows you to display and model views in your ER diagrams visually.
231
232
2. Click
on the toolbar and draw view relationships between some existing table or
view and your newly created view.
3. Double click the view relationship line to edit it. In Alias field you can specify a new
alias name for the linked table.
233
234
235
- Deletes an object with all its shortcuts from model.Example:Your model has two Workspaces WS1 and WS2. You add a new entity to your model. -> The entity (its shortcuts) is contained on
both Workspaces (- Auto Complete option is enabled). However, you need to have the new
entity on WS1 only.Solution: You select the entity on the WS2 and simply press Delete. Result:
The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The entity still exists
in your model. If you wanted to delete the entity from your model completely (including all its
shortcuts from all Workspaces), you would select the Delete Object option (or press
SHIFT+Delete). For the deletion, you could select any entity shortcut on any WS - either WS1 or
WS2. The entity would be deleted from your model. To remove shortcut of object from
WorkspaceSelect an object (shortcut of object) on the WS and press Delete.Tip: You can delete
shortcuts in Model Explorer too - select particular shortcut of an object in the Shortcuts folder |
right-click | Delete Item.To delete objects from model (including all its shortcuts)Select the
shortcut of objecton Workspace and press SHIFT+Delete.Tip: You can also delete the objects:In
Model Explorer - select an object | right-click | Delete Item.In the Object dialog (Model menu |
Model Items | Entities, Relationships etc.) - select the object and click Delete.When you press
Delete or SHIFT+Delete in your ER diagram, the following message will display:Select the
action you want to perform.Note: Key shortcuts: ALT+O for OK and ALT+C for Cancel. To set
the default Delete options in Toad Data Modeler:Select Settings | Options | Dialog Boxes | Other
tab.OptionDescriptionDisplay DialogWhenever you press Delete or SHIFT+Delete in your ER
diagram, the Delete Confirmation Dialog will pop up and you will be able to select what action
you want to perform in particular case.Remove Graphical Representative of ObjectIf this option
is selected, the Delete will always remove selected shortcut(s) of object from particular
Workspace. SHIFT+Delete will have to be used to completely delete an object from your model.
Delete ObjectIf this option is selected, the Delete will completely delete selected object(s) from
your model, including all the object shortcuts. There is no option to only remove selected
shortcut(s) of object. (The Delete will replace SHIFT+Delete.)Related TopicsShortcuts of
Objects (page 1)Select Objects Physical Model Pointer and Objects Selection tool
optionsLogical Model Pointer and Objects Selection tool optionsMetamodel Pointer and Objects
Selection tool optionsSelect Links Automaticallyalso available from Objects menu. By default
enabled. When enabled, lines/relationships between selected objects are selected automatically.
During one selecting process you can enable and disable this option several times to select only
certain lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
236
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1) (page 1)
Materialized Views
Materialized Views are supported in the following databases: Oracle 11g, Oracle 10g and 9i, DB
2 v. 9.5 (LUW), DB 2 v. 9 (LUW), DB2 UDB v. 8 (LUW), Sybase SQLAnywhere 11.
Toad Data Modeler 3.x allows you to display materialized views graphically in your
ER diagram.
To add a materialized view
Click
or
Model Explorer | Right-click the Materialized Views folder | Add
Materialized View.
Tip: Select Model | Model Items |Materialized Views and click Add in the Materialized
Views dialog. Here, you can also view all materialized views of your model.
To edit a materialized view
Option
Description
Object
Navigator Box
General Tab
Description
Caption
Name
Option
Description
Schema
Generate
Generate SQL
only
SQL Tab
Permissions
Tab
To Do Tab
Before Script
Tab
After Script
Tab
Notes Tab
SQL Preview
Tab
Click
at the bottom of this tab to see the part of
SQL code for the materialized view.
Refresh Tab
Physical
Properties
Tab
Materialized
237
238
Option
Description
Views
Properties
Tab
tab.
Create Index
Tab
Related Topics
Copy Objects (page 68)
Move Objects (page 69)
Delete ObjectsIn Toad Data Modeler, there are two deletion options (see the Objects menu):
Remove from Workspace (Delete) - Removes an object shortcut from a Workspace. Delete Object
- Deletes an object with all its shortcuts from model.Example:Your model has two Workspaces WS1 and WS2. You add a new entity to your model. -> The entity (its shortcuts) is contained on
both Workspaces (- Auto Complete option is enabled). However, you need to have the new
entity on WS1 only.Solution: You select the entity on the WS2 and simply press Delete. Result:
The entity shortcut in WS2 will be removed. Shortcut in WS1 will remain. The entity still exists
in your model. If you wanted to delete the entity from your model completely (including all its
shortcuts from all Workspaces), you would select the Delete Object option (or press
SHIFT+Delete). For the deletion, you could select any entity shortcut on any WS - either WS1 or
WS2. The entity would be deleted from your model. To remove shortcut of object from
WorkspaceSelect an object (shortcut of object) on the WS and press Delete.Tip: You can delete
shortcuts in Model Explorer too - select particular shortcut of an object in the Shortcuts folder |
right-click | Delete Item.To delete objects from model (including all its shortcuts)Select the
shortcut of objecton Workspace and press SHIFT+Delete.Tip: You can also delete the objects:In
Model Explorer - select an object | right-click | Delete Item.In the Object dialog (Model menu |
Model Items | Entities, Relationships etc.) - select the object and click Delete.When you press
Delete or SHIFT+Delete in your ER diagram, the following message will display:Select the
action you want to perform.Note: Key shortcuts: ALT+O for OK and ALT+C for Cancel. To set
the default Delete options in Toad Data Modeler:Select Settings | Options | Dialog Boxes | Other
tab.OptionDescriptionDisplay DialogWhenever you press Delete or SHIFT+Delete in your ER
diagram, the Delete Confirmation Dialog will pop up and you will be able to select what action
you want to perform in particular case.Remove Graphical Representative of ObjectIf this option
is selected, the Delete will always remove selected shortcut(s) of object from particular
Workspace. SHIFT+Delete will have to be used to completely delete an object from your model.
Delete ObjectIf this option is selected, the Delete will completely delete selected object(s) from
your model, including all the object shortcuts. There is no option to only remove selected
shortcut(s) of object. (The Delete will replace SHIFT+Delete.)Related TopicsShortcuts of
Objects (page 1)Select Objects Physical Model Pointer and Objects Selection tool
optionsLogical Model Pointer and Objects Selection tool optionsMetamodel Pointer and Objects
Selection tool optionsSelect Links Automaticallyalso available from Objects menu. By default
239
enabled. When enabled, lines/relationships between selected objects are selected automatically.
During one selecting process you can enable and disable this option several times to select only
certain lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects (page 1) (page 1)
Procedures, Functions, Schemas, Synonyms, Defaults...
Toad Data Modeler supports procedures, functions, schemas etc., plus other database objects that
are supported by particular database system, e.g. Assemblies in SQL Server 2005 database,
Sequences in Oracle database etc. (To see the list of these objects for particular database, please
see the Help file, "Databases", "Extra Objects" topic.)
The database objects that are supported or used in (almost) all database systems are accessible via
the Model menu and are listed also in Model Explorer. (See Model | Functions, Procedures,
Schemas...)
Database objects that are specific for particular database system are available only in Model
Explorer on appropriate folders. (See Model Explorer of SQL Server 2005 model |
Assemblies folder.)
From both places, you can add, edit and delete them. - See the appropriate buttons e.g. in the
Schemas dialog (Model | Schemas), or see the pop-up menu of the selected folder or item in
Model Explorer (right-click the Sequences folder, right-click the selected sequence).
Example: Procedure for Oracle 10g model
240
Related Topics
User Templates
Users and User Groups
In Toad Data Modeler, you can define users, user groups and assign permissions to them.
Scenario
Create users in your model - two administrators and a manager, and user
groups Administrators and Managers.
To create users
1. Click
on the toolbar.
2. In the Users dialog, click Add three times and confirm Apply.
241
242
on the toolbar.
2. In the User Groups dialog, click Add twice and confirm Apply.
3. Double-click UserGroup1.
4. Define name of this group - Administrators and confirm Apply.
5. From the Object Navigator box, select the other item.
6. Write its name -Managers and confirm Apply. -> The dialog remains opened.
7. Click the Members tabs of the Managers User Group Properties dialog. Here, available
user groups and users are listed, and you can add a user group and users to the Managers
user group.
8. Switch to the Manager User Properties dialog and click the Membership tab. -> Two
available user groups are there. You can assign the Manager user to the selected group.
9. In the Manager User Properties dialog, select the Managers group and confirm
Apply. -> Managers item has moved to the window Selected. Also, see the Managers
User Group Properties dialog - user Manager has been assigned to this group
automatically too.
10. Let's see how it works in the User Groups dialog now: From the Object Navigator box,
select the Administrators user group.
11. Select the two administrator users (use SHIFT key) and click the Add arrow button.
12. Confirm Apply. (You can check out e.g. the Admin1 User Properties dialog to see the
change also there - use Object Navigator box again.)
13. Close the dialogs OK.
Note: Users and User Groups are accessible in the Model menu. You can also manage them via
Model Explorer.
Permissions
In Toad Data Modeler, you can assign permissions to the following objects: Entity, Attribute,
User Data Type, View, Procedure, Schema, Users and User Groups.
A list of permitted objects varies according to a database type. E.g. in some databases, it's not
possible to assign a permission for Users.
For every object, different permissions can be set (SELECT, INSERT, UPDATE etc.), depending
on selected database.
243
Options for permissions are described in the following example of permissions for entity.
Permissions for attribute, user data type etc. are set in the Properties dialog of particular object |
Permissions tab.
Add Permissions
To be able to add a Permission, it's necessary to define a User or User Group. If you forget to
define them first, never mind. Toad Data Modeler allows you to define them directly on tab
Permissions of the appropriate object - click Users or User Groups.
To add a permission for entity
In the Entity Properties form, select the Permissions tab and click Add.
Tip:You can also add a permission in the Model Explorer | Entities folder |
Unfold the selected entity. | Right-click the Permissions item. | Add Permission
After you add a new permission and confirm Apply, a new item (user or user group) will display
(e.g. Dave).
If you want to add the created permission to another user or user group, press F2 and select
appropriate user or user group from the User (User Group) box.
Define items in other columns in the same way (F2 or via inplace editor) - Grantor,
SELECT etc.
Permissions
Tab
Description
User (User
Group)
244
Grantor
In the Entity Properties form | Permissions tab, double-click the selected permission or
press Edit .
Tip: You can also edit/rename/delete permissions in Model Explorer | EntityName folder |
Permissions | Right-click the selected permission.
General
Tab
Description
Permissions
Status
with Grant
Option
Tip: To delete a permission, in the Entity Properties form | Permissions tab, select the
permission and click Delete.
Related Topics
Method A - via the Users dialog (page 200)
User Groups (page 202)
PER - PER Conversion Information (page 425)
Verification
Model Verification
Toad Data Modeler allows you to verify your models. You can select what items of your model
you want to check, find out what errors and flaws your model contains etc.
245
On tab Verification Settings, you can enable or disable errors, warning and hints. Additional
information is available on right side.
Rules are database dependent, the following screenshot shows rules for Microsoft SQL
Server 2012.
246
Show Errors
Show Warnings
Show Hints
247
248
Quick Fixes
Toad Data Modeleroffers Quick Fixes, recommended solutions for selected problems or issues.
Quick Fixes are accessible in both Verification Log andPhysical Model Explorer.
In Verification Log you can switch between Tree and Grid layouts, using the first icon on
Verification Log toolbar.
Tree layout shows Quick Fixes as hyperlinks, Grid layout allows you to apply Quick Fixes via
popup menu.
249
On Form Verification
Errors, warning and hints can be displayed directly on object form, at bottom. Quick Fixes are
not available in this mode.
Settings
Verification rules can be specified as Errors, Warnings and Hints and you can modify the
categorization in Settings.
Navigate to selected target database and define settings for Model Verification.
250
251
252
253
254
255
Choose User/Schema and select items you wish to reverse engineer. Make sure you select Tables,
Views, Procedures and Functions (Types of objects can be defined during Connection creation).
256
257
2. Select what entities, views and synonyms you want to add to your model. Use SHIFT for
multiple selection.
3. Drag and drop the selected items from the Object Palette to particular Workspace or
Model Explorer.
258
259
2. From the Open dialog, select particular *.erd or *.erx file and click Open.
3. If you wish to use connection string stored in ERDfile, click Yes on the
following dialog window:
5. Result:
In the .erd file, there is only information on tables. Now it is necessary to connect
to database to load information on attributes and other items of the ER diagram. In
other words, reverse engineering has to be done to create a new model in Toad
Data Modeler. The reverse engineering should be completed automatically and the
only information you might need is password to your database connection.
Related Topics:
Command Line Parameters (page 379)
260
261
262
263
Script Generation
Order of Generated Objects
Toad Data Modeler allows you to set order of objects before SQL/DDL script generation.
Example: You want to generate Users before User Permissions to a table.
You can change order of the following objects:
l
Domains
Entities
Views
Dictionary types
Sequences
Stored procedures
Functions
264
Users
Note: You can also use the pop-up menu: Top (CTRL+Up), Bottom (CTRL+Down).
The same form can be open from DDL Script Generation window. On tab Detail
Settings click Edit.
Result: Objects placed above the selected item will be generated before the item.
(E.g.: The Genre entity will be generated before the Medium entity and the Order
Record entity after the Borrowing entity.)
4. Click the Extension tab to set up other options.
Note: When the After CREATE TABLE Section option is selected for an object, the
object will not be displayed in SQL Preview.
265
266
Related Topics
SQL/DDL Script Generation
Select Items
Now you are ready to start the SQL/DDL Script Generation.
Toad Data Modeler respects as many database specifics as possible and therefore you can model
almost any possible situation and generate very detailed and database specific SQL/DDL code.
Scenario
Generate DDL script for your Oracle 10g Videorental model.
Scenario: Define options on tab What to Generate.
1. Click
267
3. In the Location of SQL File box, set up the path where the final DDL script should be
saved. By default, the path defined in the Settings menu | Options| Paths | File with
Generated Script is filled in automatically. However, you can define a different path for
each model of yours. To change the path for all your models, we recommend to change
the default path in the Settings menu | Options.
Tip: To save the changed location for particular model (and also other settings
you define in this dialog), you need to click Save Settings at the bottom of the
dialog. The new path (including other settings for script generation) will be saved
within the model. Next time you open the model, you will not have to set up the
settings again.
4. Append to File checkbox - When checked, the extra code is appended to the original file
and nothing of the original file is overwritten.
5. From the User/Schema box, select a user/schema for which you want to generate the
script. The schema selection here influences selection of entities on tab Entity List. If you
select the item --Not Specified--, SQL script for all users/schemas will be generated.
5. Make selection of Object Types and Properties for the script generation. Feel free to use
the Select All, Deselect All or Invert Selection buttons. The Auto Check button is
enabled by default, which means that all sub-items of the selected main item will be
automatically selected too. If a sub-item is selected, the main item will automatically be
selected too.
6. For bulk change of properties in column Extended Value, use the combo box next to
the buttons.
7. Click the Extended Value column at a particular item to select a command - Create,
Drop, Drop and Create, Create or Replace etc. For bulk changes in this column, use the
combo-box next to the Auto Check button.
Tips:
1. For Experts only:
a. You can change the default selected Object Types and Properties. See more details
in the Help file, "OTPs" topic.
b. You can change the default values of the Script Generation dialog. See "Set
Default Values" (page 565) for more information.
2. You can disable script generation for particular objects - see their Properties dialog and
clear the Generate checkbox (e.g. in the Entity Properties form).
Related Topics
Detailed Settings (page 267)
Detailed Settings
Scenario: On the Detail Settings tab, define other database dependent options.
268
Checkbox Generate Permissions Only to Object Types Selected on Tab What to Generate (The
checkbox is selected by default.):
Select this checkbox to generate permissions to:
o
Clear this checkbox to generate permissions also to objects that are not selected on tab What to
Generate. However, in any case, the Generate checkbox must be selected for these objects.
Note: To see the details for the database you use, have a look at the Help file, "Databases"
chapter, select your database and see its "Script Generating" topic.
Related Topics
Referential Integrity (page 269)
269
Referential Integrity
On the Referential Integrity tab, define rules for referential integrity generation.
Related Topics
Select Entities/Workspaces and Save Settings (page 269)
Select Entities/Workspaces and Save Settings
Scenario: On tab Select List, you select if you want to generate SQL/DDL script for entire
model or particular workspace and also objects that should be generated (selected entities, views,
user data types etc).
1. From the Workspace box, select Entire Model to generate DDL script for all Workspaces
of the model.
2. Clear the Generate by Property "Generate" checkbox (it's selected by default).
Note: If you leave it selected, all items where the Generate checkbox is enabled in (see
e.g. the Entity Properties form) will be selected for the script generation automatically. If
you clear it, you can make selection of individual entities, views, procedures etc. that you
want to generate, and enable the Filter.
270
3. In the Filter box, type T_C* and click the filter icon to select all entities that fit your
criteria.
4. Save all the script generation settings you have just defined in the dialog for particular
model (selected options including the script location). - Click Save Settings.
Remember to save also your model to preserve the settings for next script
generation!
Note:You can run Verification on your selection before generating the script click
Verify button.
Related Topics
Preview SQL Script (page 270)
Preview SQL Script
Toad Data Modeler allows you to preview the DDL script, check it out and decide whether you
want to overwrite the existing .sql file or not.
See the Show Preview checkbox on the bottom left side of the dialog. It is clear by default. See
below what happens if it is clear or selected after you press Generate.
To generate DDL/SQL script
Click Generate.
Tip: To see the generation process, click Show Log.
271
2. Select Yes.
Note: If you selected No, the process would be interrupted and the .sql file would
not be overwritten.
Tip: Select Do not show next time if you do not want to display the dialog
next time.
3. Finally, in the log (or Message Explorer if it's opened) the following message will
display: "SQL Generation has been finished successfully."
4. Click Show Code to open the generated script in the SQL File Viewer dialog.
5. Click x to close the dialogs.
B: The Show Preview Checkbox Is Selected
1. The preview will be displayed in SQL File Viewer. Feel free to go through it. As soon as
you close the preview, the following message will display:
2. Select Yes to overwrite the existing .sql file with the SQL script shown in the preview.
Note: No interrupts the process. The following message will display in the
Message Explorer: "SQL Generation has not been finished successfully. File
cannot be saved." You can make other modifications and generate another
preview. Existing .sql file remains unchanged.
3. Click Show Code to open the generated script in the SQL File Viewer dialog.
4. Click x to close the dialogs.
Related Topics
Example of Generated Script (page 271)
Example of Generated Script
Videorental model - Oracle 10g database
Tip: Right-click the SQL File Viewer to see options Search, Find and Replace.
/*
Created: 15.3.2007
Modified: 1.6.2011
Project: Videorental Project
Model: Videorental
Company: Quest Software, Inc.
Author: Radim Mario Tkacik
Database: Oracle 10g
*/
-- Create user data types section ------------------------------------------------CREATE TYPE SCOTT.Phone_List_Type
AS VARRAY(5) OF VARCHAR2(25)
/
CREATE TYPE SCOTT.Cust_Address_Type
AS OBJECT
(street_address VARCHAR2(40)
, postal_code VARCHAR2(10)
, city VARCHAR2(30)
, state_province VARCHAR2(10)
, country_id CHAR(2)
, phone Phone_List_Type
)
/
CREATE TYPE SCOTT.Price_Type
AS OBJECT (price NUMBER(10,2),
MEMBER FUNCTION total_price_VAT (vat number) RETURN NUMBER)
/
CREATE TYPE BODY SCOTT.Price_Type
272
IS
MEMBER FUNCTION total_price_VAT (vat NUMBER)
RETURN NUMBER IS
BEGIN
RETURN (price*((vat+100)/100));
END;
END;
/
-- Create sequences section ------------------------------------------------CREATE SEQUENCE SCOTT.SeqExemplar
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOMINVALUE
NOCACHE
/
-- Create tables section -------------------------------------------------- Table SCOTT.T_CUSTOMER
CREATE TABLE SCOTT.T_CUSTOMER(
customer_id Integer NOT NULL,
name Varchar2(20 CHAR),
address SCOTT.Cust_Address_Type
)
/
-- Create indexes for table SCOTT.T_CUSTOMER
CREATE INDEX i_name ON SCOTT.T_CUSTOMER (name)
/
-- Add keys for table SCOTT.T_CUSTOMER
273
274
275
276
from T_EXEMPLAR
where T_EXEMPLAR.exemplar_id = :new.exemplar_id;
:new.total_price := Price_Type((:new.end_date-:new.start_date)*price);
end;
/
CREATE TRIGGER SCOTT.tru_BORROWING
BEFORE UPDATE
ON SCOTT.T_BORROWING
FOR EACH ROW
declare
price number(10,2);
total_price_old number(10,2);
end_d date;
start_d date;
begin
select e.price_per_day
into price
from T_EXEMPLAR e
where e.exemplar_id = :new.exemplar_id;
total_price_old := :new.total_price.price;
end_d := :new.end_date;
start_d := :new.start_date;
if (total_price_old is null) then
total_price_old := 0;
end if;
if ((end_d-start_d)*price != total_price_old) then
:new.total_price := Price_Type((end_d-start_d)*price);
end if;
277
278
end;
/
-- Table and Columns comments section
279
/
-- Add keys for table SCOTT.T_CUSTOMER_RATING
ALTER TABLE SCOTT.T_CUSTOMER_RATING ADD CONSTRAINT pk_T_CUSTOMER_
RATING PRIMARY KEY (title,director)
/
-- Table and Columns comments section
280
and e.film_id=f.film_id
/
-- Create functions section ------------------------------------------------CREATE FUNCTION SCOTT.f_Customer_Has_Num_Film(cid IN integer)
RETURN integer
IS
sol integer;
BEGIN
p_Customer_Has_Num_Film(cid,sol);
RETURN (sol);
END;
/
-- Trigger for sequence SCOTT.SeqExemplar for column exemplar_id in table SCOTT.T_
EXEMPLAR --------CREATE OR REPLACE TRIGGER SCOTT.ts_T_EXEMPLAR_SeqExemplar BEFORE INSERT
ON SCOTT.T_EXEMPLAR FOR EACH ROW
BEGIN
SELECT SCOTT.SeqExemplar.nextval INTO :new.exemplar_id FROM DUAL;
END;
/
CREATE OR REPLACE TRIGGER SCOTT.tsu_T_EXEMPLAR_SeqExemplar AFTER
UPDATE OF exemplar_id
ON SCOTT.T_EXEMPLAR FOR EACH ROW
BEGIN
RAISE_APPLICATION_ERROR(-20010,'Cannot update column exemplar_id in table SCOTT.T_
EXEMPLAR as it uses sequence.');
END;
/
-- Create relationships section -------------------------------------------------
281
282
/
insert into T_FILM values (8,'One Flew Over the Cuckoo''s Nest','Milos Forman','Fantasy
Films',3,15,null)
/
insert into T_EXEMPLAR values (1,1,3,3)
/
insert into T_EXEMPLAR values (2,1,3,3)
/
insert into T_EXEMPLAR values (3,1,3,3)
/
insert into T_EXEMPLAR values (4,1,4,2)
/
insert into T_EXEMPLAR values (5,1,4,2)
/
insert into T_EXEMPLAR values (6,2,3,3)
/
insert into T_EXEMPLAR values (7,2,4,2)
/
insert into T_EXEMPLAR values (8,3,3,3)
/
insert into T_EXEMPLAR values (9,4,4,2)
/
insert into T_EXEMPLAR values (10,5,3,3)
/
insert into T_EXEMPLAR values (11,6,4,2)
/
insert into T_EXEMPLAR values (12,6,4,2)
/
insert into T_EXEMPLAR values (13,7,4,2)
283
284
/
insert into T_CUSTOMER values (1,'Audrey',Cust_Address_Type('92A Campton
Avenue','60021','Fox River Grove',null,'us',null))
/
insert into T_CUSTOMER values (2,'Simon',Cust_Address_Type('12 Hillpeak
Street','60006','Arlington Heights',null,'ca',null))
/
insert into T_CUSTOMER values (3,'Dave',Cust_Address_Type('31D South
Avenue','60001','Alden',null,'us',Phone_List_Type('541 123 456')))
/
insert into T_CUSTOMER values (4,'Chris',Cust_Address_Type('5 Quiet Street','60061','Vernon
Hills',null,'us',Phone_List_Type('541 123 456','596 815 641')))
/
insert into T_CUSTOMER values (5,'Elen',Cust_Address_Type('47 My Avenue','60083','Beach
Park','Illinois','us',null))
/
insert into T_BORROWING (exemplar_id,customer_id,start_date,end_date) values (11,1,to_date
('01-01-2010','DD-MM-YYYY'),to_date('03-01-2010','DD-MM-YYYY'))
/
insert into T_BORROWING (exemplar_id,customer_id,start_date,end_date) values (12,2,to_date
('02-01-2010','DD-MM-YYYY'),to_date('10-01-2010','DD-MM-YYYY'))
/
insert into T_BORROWING (exemplar_id,customer_id,start_date) values (1,2,to_date('06-012010','DD-MM-YYYY'))
/
insert into T_BORROWING (exemplar_id,customer_id,start_date) values (6,4,to_date('07-012010','DD-MM-YYYY'))
/
insert into T_BORROWING (exemplar_id,customer_id,start_date) values (7,3,to_date('07-012010','DD-MM-YYYY'))
/
insert into T_BORROWING (exemplar_id,customer_id) values (9,3)
/
285
Select Encoding
To set up encoding for the generated script
1. Select Settings | Options | Physical Model | General tab | SQL Script area.
2. From the Encoding Used for SQL Scripts box, select the encoding you prefer,
e.g. UTF-8.
286
Note: Here, you can also define External Editor for the generated SQL script or alter script.
External editor enables you to open the file with generated SQL, it doesn't allow you to edit all
SQL codes. Via this feature, you can view the generated SQL code in the program you prefer,
and possibly execute the script from there.
See "About Integration Options" (page 650) for more information.
Related Topics
Select Items (page 266)
Convert Physical Models (PER)
Toad Data Modeler allows you to convert:
l
287
Scenario
Convert your Oracle 10g model Videorental to MS SQL 2008. Use the
Sync & Convert Wizard.
1. Click
2. On the Action page, select Convert Model to Another Target Database System.
3. On the Select Left Side page, select File (*.txp, *.txl). Click the button on the right to
find model Videorental in the Open dialog.
4. On the Select Right Side page, select a target database system MS SQL 2008.
5. On the Settings page, select Comment Out Database Specific Items.
Tip: You can select whether you want to comment the database specific items or
not. If you converted your Oracle 10g model to Oracle 11g, you would clear this
checkbox not to comment them.
6. On the Select Object Types page, select Convert All.
7. On the Select Items page, you can select/deselect particular items of your model that you
want or do not want to convert. Leave the default selection to convert all items of model
Videorental.
8. On the Review page, see the statistic information and define a model name for the
converted model in the New Model Name box - Videorental_Converted.
9. Click Finish.
10. The Sync & Convert Wizard closes and the new model Videorental_Converted of MS
SQL 2008 database opens in the Application Window automatically.
Note: Please read the User Guide for more examples on model conversion.
Related Topics
PER - PER Conversion Information (page 425)
PER - LER Conversion Information (page 428)
Sync & Convert Wizard (page 438)
Simple Model Conversion (page 434)
Conversion to Physical Model (page 310)
288
in Universal Data Models PK attributes migrate from parent to child entities as PFK or
FK attributes
it is necessary to convert model to target database platform if you decide to generate SQL
for your Universal Data Model
This chapter 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 4.0\Samples.
289
Related Topics
Main Menu and Toolbars
Create Logical Model
Benefits of Logical Data Model
Logical Data Model allows you to model inheritances in entity relationship diagrams. Neither
Universal Data Model nor Physical Data Model offer this feature.
Specifics of Logical Data Model
l
there are three methods how inheritance can be converted to physical model
290
sequences/autoincrements etc.
l
you can define Valid Values in logical model (will be converted to physical model)
291
Disadvantage
The main disadvantage of logical modeling is that direct synchronization with existing
database is not possible. Look at the diagrams above again. Both of them, when converted to
physical model, result in identical output. But if we tried to reverse engineer the output back to
logical model, the software would not know rules for possible inheritance conversion.
292
Entity
Inheritance
Stamp
All these objects are available in the Objects menu or via icons in the Designer toolbar.
Tips:
1. Besides these objects you can add also other graphical shapes to your ER diagram. See
"Model Independent Graphics" (page 79) for more information.
2. See "Arrange Objects in Layers" (page 336) for more information.
Related Topics
Objects Menu (page 51)
ModelsModel ObjectsAdd ObjectsToad Data Modeler allows you to add objects from multiple
places. See the following options.To add an object on WorkspaceClick an object icon on the
toolbar, e.g. for entity.Click anywhere on the work area to add the object.Tip: Use hot keys, e.g.
CTRL+E for entity, CTRL+I for inheritance, or select the object from the Objects menu.To add
multiple objects on WorkspacePress SHIFT and click the object icon. A blue frame will appear
in the icon (for an entity e.g. ). Click the work area 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. Tip: Use
this function to add any object on the toolbar (view, note etc.).To add objects in Model
ExplorerFind the object type name in the tree (e.g. Entities) | right-click and select Add (Add
Entity). To add objects from Model menuSelect Model | Model Items | the object type (e.g.
Entities). In the dialog (Entities), click Add. Related TopicsHot Keys (page 1)Model Explorer
(page 1) (page 1)
Format Logical Objects
1. Right-click the Workspace in your logical model and select Workspace Format.
2. Click the Entity tab.
Option
Description
Align
Option
Description
Display
Data Types
Display
Keys
Graphically
Display
Level
Gradient
Effect
Display
Domain
Select Settings | Options | Model section | Logical Model | Entity tab | Attribute
Colors area.
293
Related Topics
Format Objects (page 62)
Entities
Edit Entities
Note: You can also edit entities in the Entities dialog (Model menu | Model Items |
Entities | Edit).
Option
Description
Object
Navigator Box
General Tab
Description
Caption
Name
Category
Size
Nature
Logical Only
Attributes Tab
294
Option
Description
Unique
Identifiers
Tab
Description
Tab
To Do Tab
Related Topics
Inplace Editor (page 46)
Object Navigator Box (page 402)
Features (page 374)
295
Option
Description
Format...
Add into
Workspace...
Remove from
Workspace
Delete Object
Arrange
Arranges the entity in another layer.
See "Arrange Objects in Layers" (page 336) for more
information.
Add Object to
Gallery
296
297
Option
Description
Recalculate
Size
Align Self
Relationship
Edit
Add
Edit Attribute...
Add to
Category
Attributes
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.
Option/Column
Description
Ident.
Caption
Name
Data Type
Mandatory
Option/Column
Description
Status
Buttons:
- opens the Application Variables form
Add - adds an attribute
Edit - opens the Attribute Properties dialog
Delete - deletes selected attribute
Related Topics
PER - LER Conversion Information (page 428)
Edit Attributes
In the Entity Properties dialog | Attributes tab, double-click the selected attribute.
or
Find the attribute in Model Explorer | EntityName folder | Attributes | Doubleclick the selected attribute.
298
Option
Description
Above the Object Navigator Box, 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 Box
General Tab
Description
Caption
Name
299
Option
Description
Data Type
Domain
Default Rule
Logical Only
Mandatory
Rules Tab
Valid Values
Tab
Bigint
Float
Integer
Char
VarChar
300
301
Option
Description
If the Valid Values tab is not available (depends on
the selected data type), you can use rules (see the
Rules tab).
A tab for description notes on the attribute.
Description
Tab
Related Topics
Inplace Editor (page 46)
Object Navigator Box (page 402)
Unique Identifiers
Edit Unique Identifiers
To add or edit the unique identifier
Open the Entity Properties dialog | Unique Identifiers tab | double-click the unique
identifier.
or
Find the unique identifier in Model Explorer | EntityName folder | Unique
Identifiers | Double-click or right-click it and select Edit.
2. Click
3. Confirm OK.
Option
Description
Object
Navigator
Box
302
Option
Description
General
Tab
Description
Caption
Name
Attributes
Tab
Available
Selected
Related Topics
Conversion to Physical Model (page 310)
Migration of Keys
Relationships
Edit Relationships
Logical model supports the following relationship types:
l
Identifying relationship
Non-identifying relationship
M:N relationship (See "M:N RelationshipsLER and PER models both support M:N
relationships. See below how they are converted.LER ModelPER Model (After
303
304
Note: You can also edit relationship in the Relationships dialog (Model menu |
Relationships | Edit).
Option
Description
Object Navigator
Box
Option
Description
Apply to confirm changes and select another
relationship from the Object Navigator box.
General Tab
Description
Caption
Name
Foreign Unique
Identifier
Opposite Foreign
Unique Identifier
Logical only
305
306
Cardinality
Tab
Description
Tab
To Do Tab
Keys do NOT migrate in Logical models, but only in Physical models. In Logical model,
only logical information is available. The relationships have only a logical meaning
(therefore keys do not migrate). However, in Physical model the information on foreign keys
is necessary. Therefore when you convert the Logical model to Physical model, FKs will be
displayed properly in the physical model. It is done automatically and there is not any way
to avoid doing this automatically.
307
Related Topics
PER - LER Conversion Information (page 428)
M:N RelationshipsLER and PER models both support M:N relationships. See below how they
are converted.LER ModelPER Model (After Conversion)Related TopicsMigration of KeysPER LER Conversion Information (page 1)
Inheritance
Create Inheritances
1. Click
Tip: You can also create inheritance in the Objects menu | Add New |
Inheritance.
2. Move your mouse cursor over the work area and click the parent entity and then the
target entity (child).
Tips:
l
While creating an inheritance, you can add handle points at the same time. Click the
parent entity and then click the work area as many times as many handle points you want
to create. Finally click the child entity.
on the toolbar.
Related Topics
a) Single Table - Parent Inherits All Children (page 313)
PER - LER Conversion Information (page 428)
Edit Inheritances
or
Edit the inheritance in Model Explorer | Inheritances folder | double-click the
selected inheritance (or right-click | Edit).
Note: You can also edit inheritances in the Inheritances dialog (Model menu |
Inheritances | Edit).
Option
Description
Object
Navigator
Box
General Tab
Description
Caption
Name
Parent
Logical Only
Exclusive
308
Option
Description
For exclusive inheritances, Toad Data Modeler
generates triggers that will perform a check whether a
correct record in siblings exists or not, and decide
whether a record can be added to table or not etc.
Exclusive inheritances are displayed with cross in the
middle of the graphics:
Complete
Generation
Tab
Descendents
Tab
Description
Name
Name of descendent
Discriminator
Valid Value
Edit
Discriminator
To Do Tab
Description
Tab
Related Topics
309
310
See "Sync & Convert Wizard" (page 438) for more information.
See "Simple Model Conversion" (page 434) for more information.
Before you convert your LER model to PER model, you should know particularly the following
information:
l
Before you start the conversion, you can set up the conversion rules in the Data Type
Conversion Settings dialog.
Note: This option is available only if Expert Mode is enabled.
Related Topics
311
Select Expert Mode | Expert Mode Settings | Data Type Conversion Settings. See "Data
Type Conversion Settings" (page 422) for more information.
Note: This option is available only if Expert Mode is enabled.
Related Topics
M:N RelationshipsLER and PER models both support M:N relationships. See below how they
are converted.LER ModelPER Model (After Conversion)Related TopicsMigration of KeysPER LER Conversion Information (page 1)
PER - LER Conversion Information (page 428)
M:N Relationships
LER and PER models both support M:N relationships. See below how they are converted.
LER Model
312
Related Topics
Migration of Keys
PER - LER Conversion Information (page 428)
Inheritance
Inheritance is not supported in Physical Model. Therefore, before you convert your LER model,
you need to set up how you want to implement inheritance to PER model. See the following
example of inheritance.
313
314
315
Single Table Generation (Parent Inherits All Children), Discriminator for Child
Entities is Set - After the conversion, a check constraint will be created in parent entity in
PER model. This check constraint determines conditions for setting Not Null value of
attributes taking into account options set up in Discriminator.
Inheritance Exclusive, N - 1 Generation (Each Child Inherits the Parent) - During the
conversion, all attributes of parent entity will be passed to child entities and triggers will
be created in the child entities. These triggers determine creation of new items in child
entities. - Rule: it is not possible that two child entities with the same key of parent
entity would exist.
Related Topics
Conversion (page 316)
PER - LER Conversion Information (page 428)
316
Conversion
Scenario
You want to convert Logical model Employee to PER model for Oracle
10g. Use the Sync & Convert Wizard. Model Employee is open and
active.
3. On the Action page, select Convert Model to Another Target Database System.
4. On the Select Left Side page, Available Model box, select the logical model Employee.
5. On the Select Right Side page, select a target database system Oracle 10g.
6. On the Settings page, select Comment Out Database Specific Items and Log Progress to
File - to save the messages that the Wizard returns to a file.
7. On the Select Object Types page, select Convert All.
8. On the Select Items page, leave the default selection to convert all items of the model.
9. On the Review page, see the statistic information and define a model name for the
converted model in the New Model Name box - Employee_ConvertedLER.
10. Click Finish.
317
11. The Sync & Convert Wizard closes and the new model Employee_ConvertedLER opens
in the Application Window automatically.
See the result:
Related Topics
PER - LER Conversion Information (page 428)
Sync & Convert Wizard (page 438)
Simple Model Conversion (page 434)
Defaults
Defaults
To add a default
Select Model | Model Items | Defaults and click Add in the Defaults dialog.
Tip:You can also add a default in the Model Explorer | Right-click the Defaults
folder | Add Default.
To edit a default
Select Model |Model Items | Defaults and double-click the selected default or click Edit.
Tip: You can also edit/rename/delete defaults in Model Explorer | Defaults
folder | Right-click the selected default.
Select Model | Model Items |Defaults | select a default and click Delete.
Related Topics
PER - LER Conversion Information (page 428)
Rules
Rules
To add a rule
Select Model | Model Items |Rules and click Add in the Rules dialog.
Tip:You can also add a rule in the Model Explorer | Right-click the Rules
folder | Add Rule.
To edit a rule
Select Model |Model Items | Rules and double-click the selected rule or click Edit.
Tip: You can also edit/rename/delete rules in Model Explorer | Rules folder |
Right-click the selected rule.
Select Model | Model Items |Rules | select a rule and click Delete.
Related Topics
PER - LER Conversion Information (page 428)
318
319
Reports
Report Generation
HTML, RTF and PDF Reports
Toad Data Modeler allows you to generate detailed documentation to your physical and logical
models in HTML, RTF or PDF format.
For metamodels, you can generate only HTML reports.
All the settings you set up for your report generation are saved with the model.
Tip: For your physical models, Toad Data Modeler allows you to generate also alter reports
(HTML, RTF and PDF). See "Model CompareCompare Models, Alter ReportsToad Data Modeler
allows you to view differences between two models and for physical models you can generate
alter reports in HTML, RTF and PDF formats. Alter reports are not available in logical
models.Example: You want to compare Oracle 10g models Videorental_Original and
Videorental_Modified and generate HTML alter report for the differences.Note: Please read the
User Guide for solution to this example of alter report generation.You can compare your models
and generate the alter report via the Sync & Convert Wizard.To compare models and generate the
alter report Click on the toolbar.On the Action page, select Compare Models and Generate Alter
Report.Go through other pages of the wizard.See Sync & Convert Wizard for more information
on the wizard.Sync & Convert Wizard, Select Items PageOn the Select Items page, you can see
differences between the models. The differences will be generated in the alter
report.OptionDescriptionGo to Previous DifferenceGo to Next DifferenceExpand AllCollapse
AllGenerate Alter ReportNote: Click this icon to generate the report, or click the button Report
at the bottom of the page.Display options for objectsDisplay options for propertiesModel 1The
model selected on page Select Left Side of the wizard. It is the updated or modified model.Model
2The model selected on page Select Right Side of the wizard. It is the older version of the
model.Diff.Column showing the type of difference: This icon and the blue color say: "There is a
difference." This icon and the green color say: "This item exists in Left model (Model 1) and is
missing in Right model (Model 2)." This icon and the red color say: "This item is missing in Left
model (Model 1) and exists in Right model (Model 2)."To generate the alter reportClick on page
Select Items of the Sync & Convert Wizard. The Report Wizard opens. You can close the Sync &
Convert Wizard.Go through the steps in the Report Wizard (same as during standard report
generation).Note: The Options page of the Report Wizard for the alter report is empty for
now.Finally click Execute and Show to display the alter report.Related TopicsSync & Convert
WizardHTML, RTF and PDF Reports" (page 1) for more information.
To generate an HTML, RTF or PDF report
1. Click
2. On the Select Format page, select the report format - HTML, RTFor PDF.
3. On the Select Report Type page, select a report type and a language in which you want
to generate the report.
320
You need to download appropriate packages for your language from the
Modeling community website.
4. On the Select File page, define a path where you want to generate the report.
Note: The default path can be set up in the Settings menu | Options | Application
| Paths | Reports | Path to HTML/RTF/PDF Reports.
5. On the Select Layout page, select a frame and style of your report.
Select Layout
Page
Report Layout
Description
321
Select Layout
Page
Description
CSSStyle
Frames Drawing
Cells Shadow
Default
Close Wizard
after
Execution
Previous
Goes back.
Next
Goes ahead.
Show Log
Cancel
Log Area
Displays
messages
generation process.
during
report
6. On the What to Report page, select Object Types and Properties you want to work with.
See "Object Types and Properties - OTPs " (page 406) for more information.
See "Object Types and Properties - OTPs " (page 406) for more information.
7. On the Options page, select options for your report. The options are specific for each
report format and type.
l
322
To generate a report for the whole model but only an ERD image of
particular Workspace, select the Workspace from the Select Workspace
box and select the Generate All Model Objects checkbox.
In RTF and PDF reports, there is the Use References Inside Report
checkbox on page Options. Select this checkbox to use references in the
generated report.
Note: If you open the report in MS Word, we recommend to press
CTRL+A to select all text and right-click | Update Field. Then
CTRL+click to follow the link.
8. Click Execute. To see the generation process, select the Show Log checkbox.
9. As soon as the report generation is finished, the following message will be displayed in
the Wizard: 'Report has been generated.' Now click Show to see the final report.
10. Click Cancel or x to close the Report Wizard.
Tip: Leave checkbox Close Wizard after Execution cleared if you want to
generate another report - with new options, another style etc. Click Previous to
get back to previous steps to define new report options.
Notes:
1. HTML Reports: After you generate the new report and your previous report has remained
open, press Refresh F5 to update it.
2. RTF Reports: If you want to generate another RTF report, remember to close the previous
report first!
3. Both HTML and RTF reports are saved in UTF-8 encoding.
323
Related Topics
Model CompareCompare Models, Alter ReportsToad Data Modeler allows you to view
differences between two models and for physical models you can generate alter reports in HTML,
RTF and PDF formats. Alter reports are not available in logical models.Example: You want to
compare Oracle 10g models Videorental_Original and Videorental_Modified and generate
HTML alter report for the differences.Note: Please read the User Guide for solution to this
example of alter report generation.You can compare your models and generate the alter report
via the Sync & Convert Wizard.To compare models and generate the alter report Click on the
toolbar.On the Action page, select Compare Models and Generate Alter Report.Go through other
pages of the wizard.See Sync & Convert Wizard for more information on the wizard.Sync &
Convert Wizard, Select Items PageOn the Select Items page, you can see differences between the
models. The differences will be generated in the alter report.OptionDescriptionGo to Previous
DifferenceGo to Next DifferenceExpand AllCollapse AllGenerate Alter ReportNote: Click this
icon to generate the report, or click the button Report at the bottom of the page.Display options
for objectsDisplay options for propertiesModel 1The model selected on page Select Left Side of
the wizard. It is the updated or modified model.Model 2The model selected on page Select Right
Side of the wizard. It is the older version of the model.Diff.Column showing the type of
difference: This icon and the blue color say: "There is a difference." This icon and the green
color say: "This item exists in Left model (Model 1) and is missing in Right model (Model 2)."
This icon and the red color say: "This item is missing in Left model (Model 1) and exists in
Right model (Model 2)."To generate the alter reportClick on page Select Items of the Sync &
Convert Wizard. The Report Wizard opens. You can close the Sync & Convert Wizard.Go
through the steps in the Report Wizard (same as during standard report generation).Note: The
324
Options page of the Report Wizard for the alter report is empty for now.Finally click Execute
and Show to display the alter report.Related TopicsSync & Convert WizardHTML, RTF and
PDF Reports (page 1)
XSL Transformation (page 324)
XSL Transformation
This feature allows you to create user outputs for your physical models very fast. The output can
be in any format that supports XSL language - e.g. HTML, PDF, CSV, text or XML.
You select among various XSL templates. Each template generates a different output (HTML,
CSV etc.) Advanced users can customize the templates and modify their content to generate an
output that will fit their needs.
You can generate the following reports or outputs:
l
Comments (HTML)
Entities (CSV)
Notes (HTML)
Tablespaces (HTML)
To Do Report (HTML)
Option
Description
XSL Template
Name
Output File
Template
Description
More>>
325
Option
Description
Input Values
Transform
View
Notes:
1. More information on XSL templates and details on how to customize XSLT templates can
be found in User Guide.
2. Some XSL templates are available in the Modeling community.
326
2. Click Transform and View to open the generated simplified XML file for your database
model. You will see a structure of XML file and a content of your model, including
entity names, attribute names, information about relationships, comments etc.
327
For creation of new XSL templates, it is useful to work with XSD files. XSD files describe
structure of XML source file and helps you to understand the XML structure, what nodes may
appear in XML and so on. You can click Show XSD File or Save XSD File As to display or
save XSD file for your simplified XML structure.
Predefined XSL Templates
By default, the following reports or outputs can be generated:
l
Comments (HTML)
Entities (CSV)
Notes (HTML)
Tablespaces (HTML)
Using these predefined items you can generate report of all ToDo items, create CSV files with
information about entity names, captions and descriptions etc.
Path to XSLT files
There are two folders where XSLT files are stored.
328
If you want to create a template only for selected target databases, use the following:
will display in the Input Values table of the XSL Transformation dialog.
329
Print
Page Format
1. Click
Description
Fit to Page
Enlarge
Portrait/Landscape
330
Option
Description
model-dependent.
Printer
Related Topics
Export to Graphic File (page 331)
Print (page 331)
Preview
Click
Option
Related Topics
331
To set up size of the pages, select File | Page Setup. To customize the page size, see the
Page Setup dialog | Scale area | and from the Page box, select Custom. Define Height
and Width on the right.
To print your ER diagram on one page, select File | Page Setup | select the Fit to
Page checkbox.
Turn off the display of page boundaries - select Settings | Options | Graphics | clear the
Visible Page Boundaries checkbox.
In Settings | Options | General, clear the Print Gradients checkbox for much faster print
performance. (It is disabled by default.)
Turn off page numbering and a frame around your ER diagram - select File | Print |
Settings tab | clear the Print Frame and Print Page Number checkboxes.
Notes:
l
You may try to print to PDF using "PDF printer". (Not all PDF printers are supported.)
Problem during print on virtual printer - The problem occurs only in case of print from
local machine (all printers from local machine are visible on vWorkspace). If the virtual
printer is installed on vWorkspace directly, the problem doesn't occur.
Related Topics
Print (page 329)
Export to Graphic File (page 331)
Export to Graphic File
In Toad Data Modeler, you can export your model into the following graphical formats:
BMP
JPEG
PNG
Description
File Type
Color
Pages
Paint Frame
of Pages
Scale
Width
Height
Margin
Destination
File
Open Folder
After Export
3. Define other settings specific for the selected graphical format on other tabs.
Note: Large images cannot be exported into JPG. Generate PNG files instead of JPG if you
expect the image size to be more than 2 MB.
332
333
Graphics
Autolayout
There are three autolayouts available in Toad Data Modeler.
1. Top to Bottom
2. Left to Right
3. Alphabetic
To re-arrange objects on your Workspace automatically
Reverse engineering
The Add All Model Objects to Workspace option - when you add shortcuts of objects to
your new Workspace.
Tip: To set up a coefficient of distance between tables on the Workspace, select Settings |
Options | Graphics | Autolayout area. (The lower the coefficient is, the smaller the distance
between tables will be.)
Related Topics
Arrange Objects in Layers (page 336)
Create ShortcutsToad Data Modeler allows you to create shortcuts of objects on Workspaces in
many ways and also from Model Explorer to a particular Workspace. See the following
options.To add a shortcut within a WorkspaceDrag&Drop techniques and CTRL+SHIFTThis
cannot be used for creating shortcuts of relationships and inheritance.Example:Create a shortcut
of the Customer entity on one WS - Borrowing WS:Click the Customer entity on the Borrowing
WS and hold the mouse key down.Press CTRL+SHIFT keys and hold them down.Drag the
Customer entity to any place on the work area (the mouse cursor will change its
appearance).Release the mouse button and then the keys.To add a shortcut from Model Explorer
to WorkspaceDrag&Drop techniques from Model Explorer to particular WSExample:Activate the
Workspace where you want to add a shortcut of the Customer entity.In Model Explorer, find the
Customer entity.Click the Customer entity and hold the mouse key down.Drag the Customer
entity to the WS (the mouse cursor will change its appearance).Release the mouse button and
then the keys.Tip: Have a look at the Shortcuts folder of the Customer entity in Model Explorer.
334
A new shortcut has been created.To add a shortcut of the selected object(s) from one
Workspace to another WorkspaceRight-click the selected object(s) (e.g. entity) on the WS and
select: Add into Workspace to select the particular WS.orAdd into New Workspace to create a
new WS and add the shortcut there. The layout and format of the shortcuts remain preserved
when you use this option.To add a shortcut of related objects to particular entity on the
Workspace (including relationships)Right-click the entity and select from the following
options:Fill Parent Objects to add shortcuts of parent objects of the selected entity to the WS.Fill
Child Objects to add shortcuts of child objects of the selected entity to the WS.Fill Parent and
Child Objects to add shortcuts of parent and child objects of the selected entity to the WS.To
add a shortcut of object(s) to the selected WorkspaceRight-click the selected Workspace and
select:Add All Model Objects to Workspace to add shortcuts of all objects that exist in your
model.orAdd Selected Objects to Workspace to select shortcuts of those entities that are not
contained on the WS, and of those relationships/inheritances that are possible to create on this
WS.Related TopicsEdit Shortcuts (page 1)Shortcut Right-Click Options in Model Explorer (page
1) (page 1)
MacrosMacrosToad Data Modeler supports macros. You can use sample macros available in the
Macros menu or create your own macros. You can create a macro in Package Explorer or Script
Explorer and modify its properties to display the macro either in the main menu or pop-up menu
(of particular object or on the Workspace etc.). Visual components for creation of macros are also
available (User Forms).To see or use the available sample macrosSelect Macros | All.Sample
macros:Convert Names to Lower CaseConvert Names to Upper CaseInfer Relationship - Macro
for automatic creation of relationships between identically named columns.Alphabetic
Autolayout - See Autolayout for more information.The selected macro will be applied on all
objects on all Workspaces of the model or all objects of the active Workspace.Select Macros |
Selected Objects. Sample macros:Remove Spaces from NamesDisplay Entities Note on
WorkspaceInfer Relationships on Selected EntitiesThe selected macro will be applied only on
the selected objects on the currently active Workspace.Select Macros | Productivity to access
macros from Productivity PackSelect Macros | Rename to access macros from Rename Objects
PackScenarioYou want to create a macro Add Attribute to PK and add this macro to pop-up
menu of attributes in Model Explorer.To create your own macroOpen Script Explorer (Tools
menu, Expert mode must be enabled).Right-click the Macros item and select Add New
Macro.Right-click the newly created macro and select Properties.Define properties of the new
macro. Remember to define its caption (macro name that will be displayed), visibility on tab
Visibility (if for all databases etc.).On tab Others, you can define Undo options. It is
recommended to keep the default settings.On tab Menu, you can define where you want to
display the macro - in Main menu, pop-up menu or both.Select Add to Popup Menuand write the
path name.On tab Object Types, select object types for which the macro will be available in
their pop-up menu. Select Attribute and confirm OK.Double-click the new macro to open the
Script Editor. Modify the default code at your convenience.Confirm Commit and Save.The
Macros will be available accordingly.Related TopicsScript ExplorerScript Editor (page 1)
335
Align Objects
To align objects in the Workspace
1. Select objects you want to align.
2. Click
3. Select the way to align the objects from the Align Palette.
To align a self relationship
3. Click on the Handle Points icon, which enables only appropriate functions on the palette.
336
Related Topics
Arrange Relationship Lines (page 337)
Right-click the object | Arrange and select any of the following options:
l
Z-Order Box
To put an object (e.g. entity) to exact layer
1. Right-click the entity and select Arrange | Settings.
2. In the Object Format dialog, see the Z-Order box. Use the small arrows to define the
layer number.
337
Related Topics
Autolayout (page 333)
Format Objects (page 62)
Straight mode
Straight Mode
In the Straight mode, you can:
l
338
3. Click on the Handle Points icon and select one of the enable options.
Right-click the selected Workspace and click Straight All Lines or Change Lines to
Right Angled.
Right-click the selected relationship line(s) and click Straight Line or Change Line to
Right Angled.
You cannot move handle points (but can move the selected line segment).
You cannot change the right-angled lines to straight lines (but can change the straight
lines to right-angled).
Select the entity and the appropriate relationship (use SHIFT) and drag and drop
the entity.
Result: The selected entity, relationship and its handle points will move too. Position of handle
points will be preserved.
To move only the selected line segment
Press ALT key, hold it down, select the line segment and move it by the drag and drop
techniques or via the keyboard arrows.
339
Note: This option works only for angled lines (however, in both Straight and
Right-angled modes).
Move, Hide, Find Relationship Names
To move the name of relationship on the Workspace
Right-click the selected relationship in particular place and select Move Caption Here.
Right-click the Workspace | Workspace Format | General tab | clear the Display Line
Names checkbox.
Click the relationship name (caption). The appropriate relationship line will be
highlighted on the Workspace by the blue color.
Click the relationship line, its name (caption) will be highlighted in a frame.
Related Topics
Format Workspaces and Objects (page 349)
Categories
Categories allow you to colorfully distinguish parts of your model. You can assign entities,
views and relationships to categories.
Example: In the main model, you want to distinguish all entities that relate to the Ordering
process. Or, you want to colorfully mark all entities that contain personal data of your
employees. Solution: You can simply create a category, select a color for it and assign
appropriate entities to the category. All the entities will be colored by the appropriate color.
An entity can be assigned only to one category.
Tips:
1. If you model has more categories, you can display a caption of the categories on the
Workspaces. See "Caption of Categories and Shortcuts" (page 83) for more information.
2. To display entities in Model Explorer by category, right-click the Model Explorer |
Settings | and select Use Colors of Category to Draw. Names of entities will be
displayed in color of appropriate category.
To add a category to your model
Select Model | Categories and click Add in the Category List dialog.
340
or
Model Explorer | Categories folder | Right-click and select Add Category.
Tip: You can also create a category directly in the Entity Properties form |
General tab. Just click the small button next to the Category box.
To edit a category
In the Category List dialog | double-click the selected category or click Edit.
or
Model Explorer | Categories folder | double-click the selected category or rightclick | Edit.
Tip: You can also manage Categories via the Caption of Categories on
the Workspace.
Option
Description
Object
Navigator
Box
All categories of your model are listed here. The combobox allows you to edit them, one by one from one place.
Use Apply to confirm all the changes you make.
General
Tab
Description
Name
Category name
Color
Description
Tab
Objects
Tab
To Do Tab
You can assign entities, views and relationships to category in the Category Properties dialog
and also in the object Properties dialog.
4.
To assign entity to category in the Entity Properties form
1. Double-click the selected entity (on the Workspace or Model Explorer).
2. Click the General tab in the Entity Properties form.
3. From the Category box, select the category.
Tips:
1. To copy categories, use CTRL + Drag&Drop techniques.
2. To delete categories:
l
Related Topics
Caption of Categories and Shortcuts (page 83)
To select more objects on WS by category or schema/owner (page 67)
341
Change Notation
To change or select notation for your model
IDF1X
IE
342
343
344
By default, the Data Warehouse options are not available and must be activated in Settings.
Standard Entity Properties form:
Click Settings | Options and in section Physical Model enable checkbox in group box
Form Settings.
345
346
Display Modes
In Toad Data Modeler, you can switch between a logical and physical views and full name view.
Click
Full Names
347
348
Entities
Primary Keys
PK and FK keys
All Keys
Attributes
LER Model
l
Entities
Primary Identifiers
Unique Identifiers
Attributes
Descriptions - Text written on the Description tab of entity will be displayed on the WS.
349
Change the display level from the Display Level box on the toolbar (also View |
Display Level).
Note: Also right-click the work area | Workspace Format | Entities tab |
Display Level.
To set up default display level for new model (models that you will create)
To set the same size for the selected objects on the Workspace
1. Make the selection of objects (SHIFT).
2. Right-click the particular object of which size you want to apply and select Set Same
Size for the Selected Objects.
350
Select Settings | Options | Model section | Physical Model/Logical Model| Entity tab |
Attribute Colors area.
Tip: When you point your mouse cursor at a relationship line, parent and child attributes are
highlighted on the Workspace. You can set up the color at: Settings | Options | Graphics |
Colors area | Highlight Color.
351
to show grid.
Select an entity on the Workspace, press SHIFT, hold it down and use the keyboard
arrows to change size of the entity box.
352
Tools
Refactoring Utility
Now you can rename objects in your model and use Refactoring Utility to change names in
other objects properties, like SQL code in Triggers, Stored Procedures etc.
In section Previously Renamed Object (top-right), you can find objects that were
renamed.
In section Objects to Modify, you can find objects and properties that contain old names.
Use buttons Previous Term and Next Term to navigate among names in the same code.
Section Preview of Modified Code shows suggested names. You can click any of the
suggested term and choose old or new name or use the icons in middle column to reject
suggested change.
353
Schema/Owner/Database Assignment
This option allows you to assign schema/owner/database/user to your model at one jump or
remove existing schema from objects of your model at one jump.
Note: Schema, user, owner, database - database dependent issues. E.g. Oracle db - users.
To assign a schema/owner to your model
Option
Description
Select
Schema/Owner/Database
354
Option
Description
the Select types of objects area.
Confirm before
assignment checkbox
Execute
Close
Related Topics
To select more objects on WS by category or schema/owner (page 67)
Naming Conventions
About Naming Conventions
Toad Data Modeler allows you to use naming conventions in your physical models. What are
naming conventions? Via naming conventions you can:
l
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
dont, 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.
Naming conventions are supported for most objects of physical model for which you can
define a name (physical name) and a caption (logical name).
355
A naming convention can be used in various models across different database systems.
You can use them for new models, reversed models or models that already exist in Toad
Data Modeler.
Every defined naming convention is stored in external .TXN file stored by default in your
Documents folder, directory Toad Data Modeler\ Installation name\Naming Conventions.
You can define only one naming convention for one model.
Define valid characters for physical names and set how invalid characters should
be replaced.
Use glossaries for automatic word replacement during new objects creation.
Glossaries can be made of multiple CSV files and you can easily turn on or turn
off the selected glossaries.
Verify naming conventions and rewrite physical names in a batch mode. Check
your model and replace physical names of objects that dont match naming
conventions rules.
Related Topics
Basic Operations (page 355)
Basic Operations
To define a new naming convention for your model
1. Click
356
Click
on the toolbar.
357
Option
Description
Reset Name to
Explain Violation
Edit Naming
Convention
Verify Naming
Convention Rules
Tip: Read the User Guide, "Naming Conventions" chapter, "Scenarios" topics to get practical
examples on how to use the naming conventions.
Related Topics
Naming Convention Properties (page 358)
Naming Convention Settings In the Naming Convention Properties dialog | General tab, you can
see options for: Synchronization of Captions and Names Verification of Names Read the
following use cases for different settings of these options. Tip: See the User Guide, "Naming
Conventions" chapter for more practical examples.Synchronization of Captions and NamesA:
Automatic Synchronization On, Apply Naming Convention Rules OnIf you enable both
checkboxes, captions and names will be automatically synchronized, naming conventions rules
will be applied automatically and glossaries will be used too.Example: The new logical name
defined as Exemplar will be converted to physical name to T_EXEMPLAR automatically.
Customer will be converted to T_CUS etc.Use: These settings are great for modeling new ER
Diagrams according to naming convention rules. Automatic synchronization will create physical
names based on logical names, naming convention plus glossary definitions automatically. Using
these settings, you can save time during modeling new database structures.B: Automatic
Synchronization Off, Apply Naming Convention Rules OffIf you create a new naming
358
convention and clear both checkboxes, you will turn off automatic synchronization.Use: This is
handy if you reverse engineer a physically existing database and start to modify captions (logical
names). Names (physical names) will stay preserved.C: Automatic Synchronization On, Apply
Naming Convention Rules OffUse these settings if you want to synchronize captions with
physical names, but dont want to apply naming convention rules during
synchronization.Example:T_EXEMPLAR (logical name) => T_EXEMPLAR (physical name).
Prefix will not be automatically added to the physical name because your already defined it in
caption (logical name).Use: This can be useful when you need to rewrite the caption (logical
name) and want the physical name to change automatically. Or if you are used to defining
logical names in accordance with naming convention rules.D: Automatic Synchronization Off,
Apply Naming Convention Rules OnYou turn off the automatic synchronization as you want to
synchronize some selected items manually.Use: Use these settings if you are used to defining
both captions and names manually with the advantage to apply the naming convention rules
during manual synchronization.How does it work? - E.g. in the Entity Properties form, you
define the caption and physical name manually. Later you find out that something is wrong with
the physical name (it violates the naming convention rules). -> Clicking the arrow button
between the Caption and Name boxes (manual synchronization) will change the physical name
and the naming convention rules will be appliedVerification of NamesCheckboxes in the
Verification of Names area affect behavior of the Naming Convention Verification and
Synchronization feature. (page 1)
Naming Convention Properties
To define properties of the naming convention linked to your model
1. Click
on the toolbar.
359
2. On tab Naming Convention Rules, define the rules. See "Naming Convention Valid
Characters" (page 362) for more information on defining valid characters.
Note: Click the particular column and use F2 to turn on the edit mode. Press Enter
360
3. On tab Glossary, you can define what characters and words should be replaced in the
physical name of objects. On this tab, you can also import and export .CSV files.
In the example below, some CSV files have been imported from C:\Program
Files\Quest Software\Toad Data Modeler 3\Naming Conventions\CSV.
361
Option
Description
Glossaries
Add
Delete
Import
Export
Related Topics
Naming Convention Valid Characters (page 362)
Verification of NamesTo verify whether the physical names in your model match the naming
convention rules (and also to decide whether you want to apply them for particular item or not)
Click on the toolbar (or select Tools | Naming Conventions | Verification...).In the Naming
362
Convention Verification & Synchronization dialog, you can see a list of items that do not match
either the naming convention rules (NC column) or the synchronization rules (Sync
column).Compare the items in the Physical Name column (current physical name) and Expected
Physical Name column (physical name after the naming convention rules are applied).Tip: Point
the mouse cursor at the icons or click the selected row to learn more
details.OptionDescriptionShow Naming Convention ViolationsShow Synchronization
ViolationsSelect AllDeselect AllGo to previous violationGo to next violationTurn on
FilterLogical NameCurrent logical name of objectPhysical NameCurrent physical name of
objectNC Apply the naming convention rules. (Click this icon to get the following icon.) Do not
apply the naming convention rules. (The red color means that the physical name will not match
the naming convention rules defined in the Naming Convention Properties dialog.) Sync Apply
the synchronization rules. (Click this icon to get the following icon.) Do not apply the
synchronization rules. (The red color means that the physical name will not match the
synchronization rules defined in the Naming Convention Properties dialog | General tab.)
Expected Physical NamePhysical name after the naming convention and synchronization rules
will be applied.If more variants of the physical name exists, there is a combo box from which
you can choose the preferred name.Tip: You can also see the name/names in the Properties
dialog of particular object (e.g. Entity Properties form), right-click the Name box and select Reset
Name to.Select the items for which you want to apply the rules.Click Update and Close
then.Tip: Read the User Guide, "Naming Conventions" chapter, "Scenarios" topics to get
practical examples on how to use the naming conventions.RelatedTopicsBasic
OperationsNaming Convention PropertiesNaming Convention Settings (page 1)
Naming Convention Valid Characters
On tab Naming Convention Rules you can define valid characters for physical names and also
set how invalid characters should be replaced.
Example: Lets say you have set a space as invalid character for entity names in your naming
convention. See how Toad Data Modeler will behave in the following situation:
Customer Data logical name in the Caption box, will automatically change to CustomerData
physical name in the Name box. -> The space will be ignored.
You edit the naming convention and define that every space should be replaced with '_'.
Customer Data logical name in the Caption box, will change to Customer_Data physical name
in the Name box.
Once you manually edit the physical name, the automatic synchronization will turn off.
Valid Characters and Character/Word Replacement
Character Replacement
Use Character Replacement to replace diacritical characters. Do not use Character Replacement
to replace a space with another character.
363
Word Replacement
Use Word Replacement to replace one word with another word or more words. Word
Replacement launches after characters are replaced.
Valid Characters + Replacement
Use this combination to define valid characters. Also, it is possible to replace invalid characters
with an alternative character. Check of valid characters launches as last. See the example below.
Example:
Character Replacement:
-> n
Word Replacement:
espanoles -> esp
residentes -> res
Valid Characters:
Space -> _
Toad Data Modeler proceeds in the following order:
1) "residentes espaoles" -> "residentes espanoles"
2) "residentes espanoles" -> "res esp"
3) "res esp" -> "res_esp"
Option
Description
All Characters
Except Space Character
Except
User Defined
Character Set
364
Option
Description
written out in the Valid Chars column.
Selected Characters
Space (32)
Number '0'-'9'
- number 0 9 as valid.
Lower Characters
Underscore (95)
- Underscore 95 as valid.
Note: Number 95 is an ordinal value of the
Underscore character.
Upper Characters
Language Specific
Chars
Replacer Column
365
366
Single character in single quote, divided by comma: 'a', 'b', 'c', '0', '1', '2'
Single characters ordinal value divided by comma, in hexadecimal format: $61, $62, $63,
$30, $31, $32
Related Topics
Naming Convention Properties (page 358)
Naming Convention Settings
In the Naming Convention Properties dialog | General tab, you can see options for:
l
Verification of Names
Read the following use cases for different settings of these options.
Tip: See the User Guide, "Naming Conventions" chapter for more practical examples.
If you enable both checkboxes, captions and names will be automatically synchronized, naming
conventions rules will be applied automatically and glossaries will be used too.
Example: The new logical name defined as Exemplar will be converted to physical name to T_
EXEMPLAR automatically. Customer will be converted to T_CUS etc.
Use: These settings are great for modeling new ER Diagrams according to naming convention
rules. Automatic synchronization will create physical names based on logical names, naming
367
convention plus glossary definitions automatically. Using these settings, you can save time
during modeling new database structures.
If you create a new naming convention and clear both checkboxes, you will turn off automatic
synchronization.
Use: This is handy if you reverse engineer a physically existing database and start to modify
captions (logical names). Names (physical names) will stay preserved.
Use these settings if you want to synchronize captions with physical names, but dont want to
apply naming convention rules during synchronization.
Example:T_EXEMPLAR (logical name) => T_EXEMPLAR (physical name).
Prefix will not be automatically added to the physical name because your already defined it in
caption (logical name).
Use: This can be useful when you need to rewrite the caption (logical name) and want the
physical name to change automatically. Or if you are used to defining logical names in
accordance with naming convention rules.
368
You turn off the automatic synchronization as you want to synchronize some selected
items manually.
Use: Use these settings if you are used to defining both captions and names manually with the
advantage to apply the naming convention rules during manual synchronization.
How does it work? - E.g. in the Entity Properties form, you define the caption and physical
name manually. Later you find out that something is wrong with the physical name (it violates
the naming convention rules). -> Clicking the arrow button between the Caption and Name
boxes (manual synchronization) will change the physical name and the naming convention rules
will be applied
Verification of Names
Checkboxes in the Verification of Names area affect behavior of the Naming Convention
Verification and Synchronization feature.
Verification of Names
To verify whether the physical names in your model match the naming convention rules
(and also to decide whether you want to apply them for particular item or not)
1. Click
2. In the Naming Convention Verification & Synchronization dialog, you can see a list of
items that do not match either the naming convention rules (NC column) or the
369
Option
Description
Show Naming Convention Violations
Show Synchronization Violations
Select All
Deselect All
Go to previous violation
Go to next violation
Turn on Filter
Logical
Name
Physical
Name
NC
370
Option
Description
to get the following icon.)
Do not apply the naming convention rules. (The red
color means that the physical name will not match the
naming convention rules defined in the Naming
Convention Properties dialog.)
Sync
Expected
Physical
Name
3. Select the items for which you want to apply the rules.
4. Click Update and Close then.
Tip: Read the User Guide, "Naming Conventions" chapter, "Scenarios" topics to get practical
examples on how to use the naming conventions.
RelatedTopics
Basic Operations (page 355)
Naming Convention Properties (page 358)
Naming Convention Settings In the Naming Convention Properties dialog | General tab, you can
see options for: Synchronization of Captions and Names Verification of Names Read the
following use cases for different settings of these options. Tip: See the User Guide, "Naming
Conventions" chapter for more practical examples.Synchronization of Captions and NamesA:
Automatic Synchronization On, Apply Naming Convention Rules OnIf you enable both
checkboxes, captions and names will be automatically synchronized, naming conventions rules
will be applied automatically and glossaries will be used too.Example: The new logical name
371
Infer Relationships
This feature tries to map Primary Key or Alternate Key attributes with identically named
attributes in other entities.
Conditions:
l
Mapping is performed between key and non-key attributes. In other words, if identically
named attributes are part of primary key in various tables, e.g. ID column in table
Customer and ID column in table Order, the two ID columns will not be mapped and no
relationship will be created.
Names must be identical and data type must be the same, including parameters.
372
Example:
Model with no relationships. See the Customer ID column in tables Customer and Order
Record.
In table Film there is alternate key with two columns Title and Director. Identically named
columns are in table Customer Rating.
373
374
Features
Application Variables
Application Variables
In Toad Data Modeler you can use application variables in:
l
Templates
Properties that contain SQL code (any property that contains the attribute Resolve
Application Variables, for example: SQL, Before Script, After Script) - Please see the
Reference Guide for more details on the Resolve Application Variables attribute.
Note: The Resolve Application Variables attribute determines where (for which
properties of object) an application variable can be used. E.g. Entity.After Script
has the Resolve Application Variables attribute, however Entity.Name doesn't have
it. Therefore in Entity.Name, an application variable cannot be used.
CheckConstraintDomain
AsText
EntityTrigger
TableName
Year
TableName
TableFullName
UniqueNumber
ColumnName
TableFullName
Author
Time
DateTime
OwnerName
375
OwnerCaption
PERBase
OwnerFullNam
e
CheckConstraintAttribute
AsText
TableName
ViewTrigger
ViewName
ViewFullName
ColumnName
TableFullName
Relation
ParentTableNa
me
ChildTableNa
me
CheckConstraintEntity
AsText
TableName
TableFullName
Attribute
ParentAttributeNam
e
ParentAttributeCapt
ion
TableName
TableFullName
Note: OwnerName, OwnerCaption - Explanation: E.g. For attribute it is an entity, for entity it is
a model. It has nothing to do with object Owner/Schema.
Related Topics
Application Variables - Examples (page 376)
Templates (page 473)
376
377
5. Click
to display a quick help bar with application variables that are possible to
use in entity.
Example: Name is property of entity. It is of widestring data type, so you can use
application variable <%Name%>. Author is not property of entity. However, you
can use the application variable <%Author%> in entity. - All the application
variables that you can use for entity are available in the list.
Tips:
l
Note: The list of properties that you can use this way is available in the
Reference Guide.
378
379
Related Topics
Features (page 374)
Templates (page 473)
Default Values (page 470)
Open-File
New-Model
Execute-Script
Start-Log
Import Toad for Oracle ER diagram and Toad for Oracle Project
Open-File
Opens file defined in command line parameters.
Definition:
Open-File<space>-File<Delimiter>Name=<string>[,Name=<string>]*
Example:
TDM.exe Open-File -File:Name="My logical model.txl", Name="My physical model.txp"
New-Model
Creates a new model
Definition:
New-Model<space>-ModelType<Delimiter><string>[<space>-ModelName<delimiter><string>]
Examples:
380
381
USER=movies,PROTOCOL=TNS,CONNECTAS=NORMAL,SAVEPASSWORD=1,ORACLEH
OME=c:\oracle\product\10.2.0\db_1,HOST=OstDbServer,SErVICENAME=ORCL,
PORT=1521,LDAP=,METHOD=1"
Categories
Categories allow you to colorfully distinguish parts of your model. You can assign entities,
views and relationships to categories.
Example: In the main model, you want to distinguish all entities that relate to the Ordering
process. Or, you want to colorfully mark all entities that contain personal data of your
employees. Solution: You can simply create a category, select a color for it and assign
appropriate entities to the category. All the entities will be colored by the appropriate color.
An entity can be assigned only to one category.
Tips:
1. If you model has more categories, you can display a caption of the categories on the
Workspaces. See "Caption of Categories and Shortcuts" (page 83) for more information.
2. To display entities in Model Explorer by category, right-click the Model Explorer |
Settings | and select Use Colors of Category to Draw. Names of entities will be
displayed in color of appropriate category.
To add a category to your model
Select Model | Categories and click Add in the Category List dialog.
or
Model Explorer | Categories folder | Right-click and select Add Category.
Tip: You can also create a category directly in the Entity Properties form |
General tab. Just click the small button next to the Category box.
To edit a category
In the Category List dialog | double-click the selected category or click Edit.
or
Model Explorer | Categories folder | double-click the selected category or rightclick | Edit.
Tip: You can also manage Categories via the Caption of Categories on
the Workspace.
382
Option
Description
Object
Navigator
Box
All categories of your model are listed here. The combobox allows you to edit them, one by one from one place.
Use Apply to confirm all the changes you make.
General
Tab
Description
Name
Category name
Color
Description
Tab
Objects
Tab
To Do Tab
You can assign entities, views and relationships to category in the Category Properties dialog
and also in the object Properties dialog.
To assign entity to category in the Category Properties dialog
1. Edit the selected category and click the Objects tab. All objects are listed in
alphabetical order.
2. Optional step: Start typing characters to activate filter at bottom of the form.
4.
To assign entity to category in the Entity Properties form
1. Double-click the selected entity (on the Workspace or Model Explorer).
2. Click the General tab in the Entity Properties form.
3. From the Category box, select the category.
Tips:
1. To copy categories, use CTRL + Drag&Drop techniques.
2. To delete categories:
l
Related Topics
Caption of Categories and Shortcuts (page 83)
To select more objects on WS by category or schema/owner (page 67)
383
384
Find
To find a particular object (its shortcut) on particular Workspace in your large model, you can
use the following options:
l
Find function
1. Activate the WS in the Application Window.
2. From the Edit menu, select Find (also SHIFT + CTRL + F).
3. Write a name of the searched object to the Object Name box and click OK to
highlight the searched object on the Workspace.
Model Explorer
1. In Model Explorer, select the object of which shortcut you need to find. | Unfold
its Shortcuts folder. -> Here, all shortcuts of the selected object with a name of
Workspaces where they occur are listed.
or
In Model Explorer, select appropriate WS in the Workspaces folder. | Unfold the
Entity / Relationship / View Shortcuts folder. Here, all entity/relationship/view
shortcuts that occur in selected WS are listed.
2. Select a shortcut and double-click it, or right-click and select Find On Workspace.
-> The Workspace where the shortcut occurs will be activated in the Application
385
Window
and
the
shortcut
will
be
highlighted.
Object Viewer
Object Viewer allows you to display a complete list of selected objects of your
model, e.g. attributes, triggers, check constraints, views, etc. with a possibility to
find the object on actual workspace.
386
Gallery
You can create a new gallery and store frequently used parts of your models into the gallery. Not
only entities can be stored into the gallery, but also single attributes, stored procedures and other
objects can be added. Drag-and-drop technique can be used for inserting gallery items into your
models. You can drag a gallery item and drop it to your workspace or particular folder in
Physical Model Explorer. Every item inserted from the gallery remembers its origin and this
allows synchronizing items in your model with appropriate gallery items. Multiple galleries can
be created and shared among users; the only condition is to place them to a shared folder.
387
The Gallery name, Path to the Gallery and Convertor Options applied for the Gallery
can be editted.
388
Converter Options dialog enables several settings as in the regular Model Conversion wizard.
Individual Gallery items can be also edited on the level of file information on the General tab.
389
Message Explorer
In Message Explorer, you can see hints, errors, warnings and other messages that appear during
your work with Toad Data Modeler.
Message Explorer is by default docked at the bottom of the application window. However, you
can hide or close it at any time.
You can sort messages by IDs, date, time and message type. - Simply click the
appropriate column.
Message Explorer versus Log Area
Log area in appropriate forms/dialogs/wizard displays information only on the operation
proceeding in the particular form/dialog/wizard. (Show/Hide Log options are available.)
Message Explorer displays information on all proceeding operations.
Option
Description
Details
View
Options
390
391
Option
Description
l
Save
Messages
Opens the Save As dialog via which you can save all
messages to LocalLog.txt file.
Save
Selected
Messages
Opens the Save As dialog via which you can save the
selected messages to LocalLog.txt file.
Model Explorer
In Model Explorer, you can see all objects that exist in your model.
Model Explorer is by default docked on the left side of the Application Window. However, you
can hide or close it.
To display Model Explorer again
Click
392
The content of Model Explorer depends on type of your model. Example of Physical
Model Explorer
Tip: Start typing characters to activate filter for the items displayed in Physical Model Explorer.
Note: Objects of your model that have the Generate checkbox disabled in their Properties
dialogs are displayed in Model Explorer this way:
393
Manage objects/items - Double-click or Enter the main item in Model Explorer opens
appropriate dialog. Example: Double-click the Procedures opens the Procedures dialog
(same as when you select Model | Model Items |Procedures). The same works for
Entities, Relationships, Views, Functions, Users etc.
Add, edit and delete (context menu for multiple selection of objects is available)
Find shortcuts of objects on the Workspace quickly - Double-click the shortcut in Model
Explorer highlights it on the Workspace.
Between Model Explorer and particular dialog/form (e.g. Entity Properties form)
Tip: Searching in the tree of Model Explorer: When you need to find an object, e.g. entity, in
Model Explorer, simply expand the Entities folder and start typing the entity name. It will be
found at once. - This function works for expanded folders (search will not go through folders
that are collapsed).
Description
Sort by
Name
Expand All
Collapse
All
Settings
Option
Description
category are colored with the category color in the tree of
Model Explorer.
Description
Add
Workspace
Model
Properties
Save
Save as
Object Viewer
Add to Project
Add to
Version
Manager
Sync &
Convert
Wizard
Sort Tree
Alphabetically
Rename
Close Model
In Expert Mode, the following options are available: (See Expert Mode
394
Option
Description
Repair Model
Description
Add
Workspace
Open All
Designers
Sort
Alphabetically
Description
Activate
Designer
Open Designer
Edit...
Workspace
Format
Copy Workspace
Add Object to
Gallery
Macros
395
396
Option
Description
Rename
Delete
Workspace
Description
Add
Edit...
Sort
Alphabetically
Note: In Attributes, Sort by Nature Order option is available in the context menu and enables
sorting the attributes in the order as they were created.
Related Topics
A. Drag&Drop techniques + CTRL on the Workspace (page 94)
Move EntitiesIn Toad Data Modeler there are several methods how to move entities. You can
select from the following options.To move entities within a Workspace, useDrag&Drop
techniquesorKeyboard arrowsTips:Select Settings | Options | Graphics | Move Objects by
(mm/10) to set up the size of a step to move (in tenths of millimeters).Select an entity, press
SHIFT, hold it down and use the keyboard arrows to change size of the entity box.To move
more entities on the WS at one jumpMake multiple selection of entities. See "Select Objects
Physical Model Pointer and Objects Selection tool optionsLogical Model Pointer and Objects
Selection tool optionsMetamodel Pointer and Objects Selection tool optionsSelect Links
Automaticallyalso available from Objects menu. By default enabled. When enabled,
lines/relationships between selected objects are selected automatically. During one selecting
process you can enable and disable this option several times to select only certain
lines/relationships. To select multiple objects on Workspace, you have the following
options:Press SHIFT and click the particular objects on WS. This option works regardless
settings in Pointer and Objects Selection tool on the toolbar.Drag your mouse over the objects
on WS. (Works only for adjoining objects.)Note: If you drag your mouse from the left side, only
the objects that are entire in the frame will be selected. If you drag your mouse from the right
side, even objects that are partly in the frame will be selected. - See the following
example.Example:You want to select the Customer and Order Record entities. In Pointer and
397
Objects Selection tool, you must set either Select All (relationships will be also selected), Select
Entities or Select All Shapes. Drag your mouse from the left side as long as both entities are
completely in the frame (see the following image).Release your mouse button. Objects have been
selected.The result would be the same if you dragged your mouse from the right side and
included even a small part of the two entities in the frame. Tip: To select all objects on WS,
select Edit | Select All.To select more objects on WS by category or schema/ownerRight-click
the Workspace | Select Objects.Define a category or owner, or category and owner and click
Select. To select child and parent objects of the selected entity on the WorkspaceRight-click
the selected entity and select Select Parent Objects or Select Child Objects or Select Parent and
Child Objects.To select multiple objects in Model Explorer and grids (e.g. Entity Properties form)
Use SHIFT or CTRL keys.Related TopicsObject ViewerSearch Objects" (page 1) for more
information.Point your mouse cursor at any selected object, click and hold the mouse button
down. Drag the objects to the required position. A whole bloc of all selected entities will move,
including their relationships.Tips:In the Objects menu, see the following two options:Select
Links Automatically - Enable this option if you want to select the relationships of related
entities automatically while making the multiple selection via SHIFT key in WS. Recalculate on
Move - Enable this option if you want to recalculate and see position of relationships while
moving the bloc of objects.To move an entity in a straight line, drag it and then press and hold
SHIFT key.To move an entity with its relationship, including handle points, select the entity and
the appropriate relationship (use SHIFT) and drag the entity. -> Selected entity, relationship and
its handle points will move too. To move entities to another Workspace or another model, select
from the following options:Cut&Paste functions: Edit | Cut/Paste, or via shortcuts CTRL+X,
CTRL+VDrag&Drop techniques between the Entities dialogs of two different modelsDrag&Drop
techniques between the Entities dialog and Model ExplorerDrag&Drop techniques in or from
Model ExplorerDrag&Drop techniques between Entities dialog/Model Explorer and
WorkspaceExample: Moving an entity between two models via Model Explorer. An entity will
be moved from Model A to Model B.Version A: Moving an entity between Model Explorers of
the two models.Open Model Explorers for both models. You can leave them undocked, or at
least one of them to be able to drag the entity between them.Select an entity in Model Explorer
A | Entities folder, and hold the mouse button down.Drag the entity to the Entities folder of the
Model Explorer B.Version B: Moving an entity from Model Explorer A directly to a Workspace
of Model B.Undock the Model Explorer A if it's docked, and click the Workspace tab of Model
B in the Application Window.Select an entity in Model Explorer A and hold the mouse button
down.Drag the entity to a Workspace of Model B.Related TopicsModel Explorer (page 1) (page
1)
Shortcuts of Objects (page 72)
Model Properties
Tab
Description
General
Before Script
After Script
Description
398
399
Tab
Description
Naming
Convention
Database
Parameters
Naming
Convention
Related Topics
Stamp and Shortcuts (page 83)
Model Statistics
To display details on your model, its Workspaces, objects etc.
To change some of the General Information (e.g. model name, author or company)
Tip: You can also change it via the shortcut of Stamp on the Workspace - just doubleclick the Stamp.
Related Topics
Stamp and Shortcuts (page 83)
Modeless Dialogs/Forms
In Toad Data Modeler 3.x, you can open several dialogs/forms at one time, switch among them
and work with them concurrently without the necessity to close any of them. This allows you to
400
Scenario
You've created a new Attribute1 for an entity and started to define its
properties. It is probable that you will need to add another attribute (or
other attributes) later.
1. Select the newly created Attribute1 in the the Entity Properties form and click Edit. The
Entity Properties form remains opened and the Attribute Properties dialog opens.
2. Define properties of the Attribute1.
3. Now you find that you need to create another attribute. You don't have to close the
Attribute Properties dialog but can simply click the Entity Properties form to activate it
and add a new attribute there - click Add in the Entity Properties form.
401
4. Click the Attribute Properties dialog again. From the Object Navigator box,
select the new item Attribute2 to define properties of this attribute.
Tips:
1. For even quicker adding new attributes, you can use the OK+Add button in the Attribute
Properties dialog.
2. While defining properties of an attribute, you can close the Entity Properties form. Later,
if you find you need to create another attribute, you can:
a. Use Model Explorer: right-click the Attributes folder of appropriate entity | Add
Attribute. The newly created item will display in the Object Navigator box in the
still opened Attribute Properties dialog immediately. Feel free to select it and
define its properties.
b. Open the Entity Properties form directly from the Attribute Properties dialog.
Just click
Note: Another great example of using modeless dialogs is e. g. defining Users and User Groups.
(See "Users and User Groups" (page 241) for more information.
Instances of Forms
Toad Data Modeler also allows you to open several instances of the same dialog/form. To enable
this option, select Settings | Options | Application section | General and clear the Allow One
Instance of Form option. (The change will be applied also for currently opened model.)
402
What are the advantages of this feature? - For each instance of form/dialog, you can set a
different view, dock them where you want, and undock or close/open when necessary.
Tips:
l
Application View - You work with two models that have a lot of Workspaces. You need
to see all WS for each model. -> You can open AV for each model.
Version Manager - Open Version Manager for each project for more comfortable work
with them.
Message Explorer - Set up different view filter on messages in each Message Explorer.
VM, ME, Script and Package Explorer - Dock the forms to the models where you
need them or use them. Set particular view on items in the forms for each model to
meet your needs.
Example 1: You work with scripts and packages only in Model X. Feel free to dock Package and
Script Explorers to the model. -> It saves place while working with other models. The packages
will be available only for Model X - just where you need them.
Example 2: Open several instances of Message Explorer - for each model. Dock it on particular
models and set a different message view filter for each.
Is available in object Properties dialogs and forms (entity, attribute, check constraint,
view, function, users, user groups etc.).
Allows you to select items for edit from one (the same) place.
Scenario
You need to edit several entities of your model.
1. Double-click ANY entity on the Workspace (WS) to edit it.
403
4. From the Object Navigator box, select the entity you need to edit (Borrowing).
5. Change its properties and confirm Apply. -> The changes will be saved and the Entity
Properties form remains opened.
6. Again, from the Object Navigator box, select another entity you need to edit (Customer).
Confirm Apply to save the changes.
7. Take the same steps until you edit all entities you need.
8. For the last entity, you can confirm the changes OK to close the Entity Properties form.
Feel free to take advantage of this box when editing relationships, procedures, views,
functions, users etc.
Tip: Quick search in the Object Navigator box - To find e.g. particular entity in ERD to edit it,
double-click any entity on the Workspace, expand the Object Navigator box in the Entity
Properties form and simply start typing name of the searched entity. The searched item will be
found in the list. Click it to open its Properties form.
404
Object Viewer
Toad Data Modeler allows you to display a complete list of selected objects of your model, e.g.
attributes, triggers, check constraints, views, etc. with a possibility to open the Properties dialog
of the selected object(s), delete them or find on the Workspace.
To open Object Viewer
Click
on the toolbar.
or
Select Window | Object Viewer....
Tip: You can also open Object Viewer from the Model Explorer or the
Application View - right-click the model name and select Object Viewer.
Object Viewer is docked by default on the right side of the Model Explorer.
Option
Description
Object
Name
Object
Type
405
406
Right-click the selected item in the list to display other options (edit, delete, find on Workspace).
Reverse Engineering Wizard and Model Update Wizard - What to Reverse page
407
408
Description
Select an OTP.
409
Option
Description
Deletes the selected OTP.
Click Yes to delete the OTP from the .txo
file of particular database (Oracle 10g.txo
in our example).
Sets the selected OTP as default.
Note: The OTP options are the same also in other dialogs and wizards e.g. DDL Script Generation dialog or Report Wizard etc.
410
This option is available for real experts interested in writing their own support for new database
systems or for people who need to enhance existing support for the selected database system.
Quick Search
To quickly find an object in your model or on your workspace:
1. Press CTRL + F
2. Type object name or caption, or part of object name or caption.
3. Use arrow down key on your keyboard to select item in result set.
4. Press Enter to perform Edit or Find on Workspace action.
Standard Search
When you search for object, write part of the name or caption to the first field.
Wildcards
Available wildcards are * and ? characters. (The star wildcard at the end of search term is
not required).
411
Word Recognition
If you use underscores in names, you can type just first characters of the words to refine search.
The following example shows search results of string tcr. Results include T_
CUSTOMER_RATING.
Underscore characters was used as word delimiter.
Similar functionality is available for search in captions where space is used as word delimiter.
You can partially combine the standard search with word recognition based search.
412
Camel Case
In case your objects are defined using CamelCase, type just the characters you expect to be in
uppercase.
Example: To find EventLogConfig, search for elc.
Dot Notation
Define object name and type . character to display child items of the object. The dot notation
works for schemas as well.
413
Actions
Select item in result set and press Enter to perform suggested action or click Arrow button next
to the suggested action button and choose either Edit or Find on Workspace.
414
Find
To find a particular object (its shortcut) on particular Workspace in your large model, you can
use the following options:
l
Find function
1. Activate the WS in the Application Window.
2. From the Edit menu, select Find (also SHIFT + CTRL + F).
3. Write a name of the searched object to the Object Name box and click OK to
highlight the searched object on the Workspace.
Model Explorer
1. In Model Explorer, select the object of which shortcut you need to find. | Unfold
its Shortcuts folder. -> Here, all shortcuts of the selected object with a name of
Workspaces where they occur are listed.
or
In Model Explorer, select appropriate WS in the Workspaces folder. | Unfold the
Entity / Relationship / View Shortcuts folder. Here, all entity/relationship/view
shortcuts that occur in selected WS are listed.
2. Select a shortcut and double-click it, or right-click and select Find On Workspace.
-> The Workspace where the shortcut occurs will be activated in the Application
415
Window
and
the
shortcut
will
be
highlighted.
Object Viewer
Object Viewer allows you to display a complete list of selected objects of your
model, e.g. attributes, triggers, check constraints, views, etc. with a possibility to
find the object on actual workspace.
416
Search Items
Search Items in Trees and Grids
The quick search function is available in the list of items in the Object Navigator box, in grids e.g. Entities dialog, and in all trees in Toad Data Modeler- e.g. in the Application View, Model
Explorer, Version Manager, Script Explorer, Package Explorer etc. This function works only for
expanded folders (the search will not go through folders that are collapsed).
Example: When you need to find e.g. a particular entity in Model Explorer, simply expand the
Entities folder and start typing the entity name. It will be found at once. This way, you can find
particular project or file in Version Manager, model or Workspace in the Application View,
script in Package or Script Explorer etc. To find particular entity in ERD to edit it, double-click
any entity, expand the Object Navigator box in the Entity Properties form and simply start
typing the name of the searched entity.
Scenario
417
You need to find an entity of which whole name you don't remember.
You only know there is a word "rating".
You know on which Workspace (WS) the entity is. OR Your model has
only one WS.
1. Open the model and activate particular Workspace.
2. Press CTRL+SHIFT+F (Edit menu | Find).
3. Type the entity name.
You can use e.g. the following search string: *rating or only rat*, *ting etc.
Other search string: ?rating
* - for unlimited number of characters,
? - for one character.
4. Define the options for search. Remember that Compare to Name refers to a physical view
(searches among physical names on the WS) and Compare to Caption to a logical view
(searches among logical names on the WS). See what view is displayed on the WS or
select the third option for sure - Compare to Name or Caption.
5. If you know there are several entities containing the name "rating" OR there are several
shortcuts of the entity on one WS, you can select the Find All checkbox.
6. Confirm OK.
Result: The entity shortcut is found on the WS and highlighted.
If there are more entity shortcuts that match the searched term, press Next to
skip to another.
Note: The Find function searches objects only on current Workspace.
Scenario
You know the entity name or at least how it begins.
You don't know on which WS the entity is. OR The entity shortcut is on
more workspaces.
1. Open the model. Its Model Explorer should open automatically. (Otherwise select Tools
| Physical Model Explorer.)
2. Expand the Entities folder in Model Explorer. You need to find entity tab_Order Record.
The entities are sorted as they were created. If you want to sort the items in Model
Explorer alphabetically, right-click the Model Explorer and select Sort by Name.
3. Start typing the entity name, e.g. "t". Cursor will switch to entity of which name begins
with "t". Continue typing "tab_O" and see the searched entity finally.
4. Select the entity and expand the entity folder.
418
5. See folder Shortcuts. Here all shortcuts of the particular entity are listed. You can see
information on which Workspaces, and also a number of the shortcut if there are more of
them on one WS.
6. Select the particular shortcut from particular WS and double-click it.
Result:
If the WS is not active, it will open and the selected shortcut will be highlighted. (If
it is not the entity shortcut you wanted, feel free to double-click another one in
Model Explorer.)
To Do List
To-Do List allows you to keep records of tasks and make notes on unfinished actions.
You can assign tasks to:
l
Particular object of your model in its Properties dialog (see the Entity Properties form |
To Do tab)
Main To Do dialog - see the Model menu | To Do (A complete list of all To Do items
can be found here.)
419
Model, Entity, Relationship, Attributes, Keys, Indexes, Check constraints, Triggers, Users, User
groups, Dictionary Types, User Data Types, Domains, Defaults, Rules, Views, Procedures,
Schemas, Categories, Metamodels.
Tip: Toad Data Modeler allows you to generate a To Do report. See "XSL Transformation" (page
324) for more information.
To add a new ToDo item
Note: Or edit the object (e.g. entity) and in the Properties dialog, click To Do tab | Add.
To edit a To Do item
420
General
Tab
Description
Name
Task name
Priority
Task priority
Category
Date of
Creation
Deadline
Completed
Text
During your work with models on the Workspace, in Application View and
Model Explorer.
During your work with models in forms and dialogs (e.g. the Entity Properties form). The
functions will always return to a state before the confirmation OK or Apply.
During your work with packages and scripts in Package and Script Explorers.
Undo/Redo are not available while working with versions in Version Manager.
421
422
Conversion
Data Type Conversion Settings
Before you start the conversion process, you can set up conversion settings for data types.
1. Enable Expert mode: Select Settings | Options | General | select the Expert
Mode checkbox.
2. Select Expert Mode | Expert Mode Settings | Data Type Conversion Settings.
423
3. From the Source and Destination boxes, select database systems or Logical Model item
that you want to convert your model to.
4. Press
You can see a list of data types of source model and information on how they will be
converted in the destination model.
Example: Oracle Blob data type will be converted to MS SQL Server 2005 model
as Image data type. Feel free to click the Destination data type item, press F2 and
change it at your convenience.
Note: The modified database conversion settings will be saved to
DataTypeConversion.txn file stored by default at: C:\Documents and
Settings\user\Application Data\Quest Software\Toad Data Modeler\Installation
name\Configs. If you want to restore the original conversion settings, you need to
delete this .txn file.
5. Confirm OK.
Execute Script Checkbox
If you want to use scripts for data type conversion, select the checkbox in the Execute Script
column, create script ConversionDataType and write function for the data type conversion to the
script.
Example:
function Convert(){
var Log = System.CreateObject('Log');
Log.Information('Konverze');
Log.Information('Input MD: '+ InputModelDef.Abbrev );
Log.Information('Output MD: '+ OutputModelDef.Abbrev );
Log.Information(InputDataType.ConversionID.Code);
var outDT
if (InputDataType.ConversionID.Code == 'C_X'){
Log.Information('HERE');
for(
outDT = OutputDataTypes.GetObject(i );
Log.Information(
outDT.Name );
if (outDT.Name=='Box') {
return(i);
}
}
}
return(0);
}
Related Topics
PER - PER Conversion Information (page 425)
PER - LER Conversion Information (page 428)
424
425
Model A
Model B
Result
(Source
Model)
(Destination
Model)
Supported
data type
Supported
data type
Same data
type
Integer
Integer
Integer
Supported
data type
Equivalent
data type
Equivalent
data type
Float
Real
Real
Supported
Permission
Supported
Permission
Same
Permission
SELECT
SELECT
SELECT
Supported
Permission
Unsupported
Permission
--None--
DROP
(MySQL 5)
--None-(MS SQL
2005)
--None-(MS SQL
2005)
Unsupported
Permission
Supported
Permission
Model B
Permission
--None-- (MS
SQL 2005)
DROP
(MySQL 5)
DROP
(MySQL 5)
Data Types
Example*:
Example**:
Permissions
Example:
Example:
Example:
(DROP
preserved in
426
Item to
Convert
Model A
Model B
(Source
Model)
(Destination
Model)
Result
already
existing
model.)
Deny Permission
Example:
Deny
Permission
Supported
Deny
Permission
Supported
Deny
Permission
Converted
Deny
Permission
Supported
Deny
Permission
Unsupported
--None--
Deny
Permission
Unsupported
Deny
Permission
Supported
Model B
Deny
Permission
MySQL 5
MS SQL
2005
MS SQL
2005 (Deny
permission
preserved in
already
existing
model.)
Grantor
Supported
Grantor
Supported
Grantor
Converted
Grantor
Supported
Grantor
Unsupported
--None--
Grantor
Unsupported
Grantor
Supported
Grantor is
empty.
MySQL 5
MS SQL
2005
MS SQL
2005
(Grantor
preserved in
already
Grantor
Example:
427
Item to
Convert
Model A
Model B
(Source
Model)
(Destination
Model)
Result
existing
model.)
Users and User Groups
Example:
Supported
Supported
Converted
successfully
Supported
Unsupported
--None--
Unsupported
Supported
--None--
Users
unsupported
in
PostgreSQL
Users
supported in
MS SQL
2005
--None--
Conversion between PostgreSQL and MS SQL: Serial and BigSerial data types in
PostgreSQL are converted to Identity in MS SQL. Identity in MS SQL is converted to
combination of sequence and default "nextval" in PostgreSQL.
Conversion between PostgreSQL and Oracle: Serial and BigSerial data types in
PostgreSQL are converted to combination of sequence and a sequence selected for
attribute in Oracle. A sequence selected for attribute in Oracle is converted to default
"nextval" in PostgreSQL (the sequence is converted automatically).
Conversion from Oracle to MySQL (and back): Sequence in Oracle are converted to
Autoincrement in MySQL (and back).
Conversion from MS SQL to MySQL (and back): During conversion of Identity (MS
SQL) to Autoincrement (MySQL) and back the new IdentitySeed/Initial Autoincrement is
428
taken into consideration. (In version 3.4, only conversion between checkbox Identity and
Autoincrement was possible.)
l
Model Conversion from MySQL to MSSQL and Oracle:MySQL Enum data type is
converted to Char data type, a check constraint for the attribute is created, the parameter
is preserved (see the SQL tab of the Check Constraint Properties dialog).
* Data types conversion examples - conversion from MySQL 5 model to SQL Server
2005 model.
** See the equivalent data types for conversion in the Settings menu | Data Type
Conversion Settings.
Related Topics
Convert Model (page 431)
Convert Physical Models (PER)Toad Data Modeler allows you to convert:PER model into a
model of another database systemPER model to LER model and vice versaClick Model |
Conversion...to open Sync & Convert Wizard.See "Sync & Convert Wizard" (page 1) for more
information.See "Simple Model Conversion" (page 1) for more information.ScenarioConvert your
Oracle 10g model Videorental to MS SQL 2008. Use the Sync & Convert Wizard. Click on the
toolbar to open the Sync & Convert Wizard.On the Action page, select Convert Model to
Another Target Database System.On the Select Left Side page, select File (*.txp, *.txl). Click the
button on the right to find model Videorental in the Open dialog.On the Select Right Side page,
select a target database system MS SQL 2008.On the Settings page, select Comment Out
Database Specific Items.Tip: You can select whether you want to comment the database specific
items or not. If you converted your Oracle 10g model to Oracle 11g, you would clear this
checkbox not to comment them.On the Select Object Types page, select Convert All.On the
Select Items page, you can select/deselect particular items of your model that you want or do not
want to convert. Leave the default selection to convert all items of model Videorental.On the
Review page, see the statistic information and define a model name for the converted model in
the New Model Name box - Videorental_Converted.Click Finish.The Sync & Convert Wizard
closes and the new model Videorental_Converted of MS SQL 2008 database opens in the
Application Window automatically.Note: Please read the User Guide for more examples on
model conversion. Related TopicsPER - PER Conversion Information (page 1)PER - LER
Conversion Information (page 1)Sync & Convert Wizard (page 1)Simple Model Conversion
(page 1)Conversion to Physical Model (page 1) (page 1)
PER - LER Conversion Information (page 428)
429
Item to
Convert
Notes:
PER - LER
Conversion
LER - PER
Conversion
Data Types
Similar to PER to
PER conversion.
The conversion
rules should be
defined in the Data
Types Conversion
Settings dialog.
The conversion
rules should be
defined in the
Data Types
Conversion
Settings dialog.
Self
Relationship
In PER model,
only nonidentifying self
relationship is
supported.
Self relationship is
converted properly.
Identifying self
relationship will
change to nonidentifying self
relationship.
Cardinality
In PER model,
cardinality of one
side of
relationship is
1..n.
Cardinality is
converted properly.
Parent Key
Selected UI of LER
model is converted
to PER model (PK
and appropriate
alternate keys are
created).
No FKs are
displayed in child
entity in LER
model.
In LER model,
open the
Relationship
Properties dialog
| General tab |
Foreign Unique
Identifier box.
(In PER model,
Parent Key is
defined in the
Relationship
properties dialog |
Foreign Keys
tab.)
Foreign
Keys
In LER model,
keys are not
transferred from
parent to child
entity.
430
Item to
Convert
Notes:
Primary
Keys
PER - LER
Conversion
LER - PER
Conversion
PK (Primary key) in
PER -> PUI
(Primary unique
identifier) in LER
PUI (Primary
unique identifier)
in LER -> PK
(Primary key) in
PER
Alternate
Keys
AK (Alternate key)
in PER -> UI
(Unique identifier)
in LER
UI (Unique
identifier) in LER > AK (Alternate
key) in PER
NN versus
M
Attributes
NN - Not Null in
PER model.
NN -> M
M -> NN
M - Mandatory in
LER model.
The values can be
displayed in ER
diagram.
Inheritance
Inheritance is not
supported in PER
model.
--
Conversion of
inheritance to PER
model will be
executed by the
rules set up in the
Inheritance dialog
| Generation tab.
Valid
Values in
Attribute
--
Default values in
LER model ->
Check constraints
in PER model.
They can be
defined for the
following data
types: Bigint,
Float, Integer,
VarChar.
Defaults for
Attributes
and
Domains
(Check constraints
from PER model
are not converted
to LER model.)
Converted properly.
Converted
properly.
431
Item to
Convert
Notes:
PER - LER
Conversion
LER - PER
Conversion
Rules for
Attributes
and
Domains
In LER model,
attributes and
domains can have
rules.
Attribute check
constraint has rules
in PER model. ->
Rules for this
attribute are
converted to LER
model.
In PER model,
attributes and
domains have
check constraints
and these check
constraints can
have rules.
Related Topics
Convert Model (page 431)
Conversion to Physical Model (page 310)
PER - PER Conversion Information (page 425)
Convert Model
Toad Data Modeler allows you to convert:
l
PER models from one database system to another database system (e.g. Oracle 10g model
can be converted to SQL Server 2008 model)
PER model to LER model - to create a new logical model from the existing PER model
LER model to PER model - to create a new physical model from the existing LER model
432
Conversion is accessible also via the Model menu. Click Model | Convert... to open the Sync
and Convert Wizard.
See "Sync & Convert Wizard" (page 438) for more information
See "Simple Model Conversion" (page 434) for more information
To convert your model in the Sync & Convert Wizard
1. Click
on the toolbar.
2. On the Action page, select Convert Model to Another Target Database System.
3. Go through other pages of the wizard.
Note: Please read the User Guide for more examples on model conversion.
Option
Description
Expand All
Collapse All
Refresh Necessitated Items
Explanation: Some objects are related together (e.g. entity and
domain, entity and relationship). Once you clear the Action box for
particular entity, the related items will be deselected too. Not to
see them in the list, click Refresh Necessitated Items. The list will
be refreshed and the needless items will be removed.
Opens the Wildcard Dialogwhere you can define settings for bulk
selection/deselection of the Action box of the items listed on page
Select Items.
Display options.
433
434
Related Topics
Convert Physical Models (PER)Toad Data Modeler allows you to convert:PER model into a
model of another database systemPER model to LER model and vice versaClick Model |
Conversion...to open Sync & Convert Wizard.See "Sync & Convert Wizard" (page 1) for more
information.See "Simple Model Conversion" (page 1) for more information.ScenarioConvert your
Oracle 10g model Videorental to MS SQL 2008. Use the Sync & Convert Wizard. Click on the
toolbar to open the Sync & Convert Wizard.On the Action page, select Convert Model to
Another Target Database System.On the Select Left Side page, select File (*.txp, *.txl). Click the
button on the right to find model Videorental in the Open dialog.On the Select Right Side page,
select a target database system MS SQL 2008.On the Settings page, select Comment Out
Database Specific Items.Tip: You can select whether you want to comment the database specific
items or not. If you converted your Oracle 10g model to Oracle 11g, you would clear this
checkbox not to comment them.On the Select Object Types page, select Convert All.On the
Select Items page, you can select/deselect particular items of your model that you want or do not
want to convert. Leave the default selection to convert all items of model Videorental.On the
Review page, see the statistic information and define a model name for the converted model in
the New Model Name box - Videorental_Converted.Click Finish.The Sync & Convert Wizard
closes and the new model Videorental_Converted of MS SQL 2008 database opens in the
Application Window automatically.Note: Please read the User Guide for more examples on
model conversion. Related TopicsPER - PER Conversion Information (page 1)PER - LER
Conversion Information (page 1)Sync & Convert Wizard (page 1)Simple Model Conversion
(page 1)Conversion to Physical Model (page 1) (page 1)
Conversion to Physical Model (page 310)
Sync & Convert Wizard (page 438)
Simple Model Conversion (page 434)
Scenario
You want to convert your Oracle 10g model to MS SQL Server 2005.
435
Option
Description
To
Database
New
Model
Name
More>>
Close after
Conversion
Convert
Close
4. Click Convert.
Related Topics
Sync & Convert Wizard (page 438)
Convert Model (page 431)
Simple Model Merge (page 461)
Synchronization
Synchronization
Toad Data Modelerhelps you with synchronization tasks and allow you to generate SQL scripts
for changes made to your model as well as transfer differences found in your database to your
existing physical models. The main purpose and benefit of synchronization features is in the
possibility to keep, during your database development process, your model and dev. version of
your database synchronized and up-to-date.
Database and Model Synchronization
Situation A - Generation of Alter Scripts
436
You have made changes in your physical ER diagram in Toad Data Modeler and need to apply
the changes in your database.
Solution: Compare the models and generate Alter Scripts in Toad Data Modeler. Then use a
third party software to connect to your database and execute the script generated in Toad Data
Modeler in your database. (Note: Alter script generation is not supported for all databases.)
Situation B - Model Update
You or someone else made changes in your existing database (development version of database)
and you need to transfer the changes to your model.
Solution: Use the Model Update or Model Merge features to update your physical model.
Data types can be defined through logical types that do not exist in physically existing
databases, Domains, Dictionary Types etc. Toad Data Modeler must correctly resolve the
data types when comparing attributes (table columns) properties.
Objects must be paired by specific rules, for example in your Oracle Database model,
schema assignment is not required, but in your database, schema is always present.
In result, the synchronization of your model and your database is more complicated than
comparison of two physically existing databases. From technical point of view, the comparison is
based on more complicated algorithm that requires more resources.
Recommendations
l
Use the synchronization features on models of smaller or average size. If you work with
large models, try to split the model to smaller parts (smaller separate models), if possible.
For comparison and synchronization of two larger physically existing databases, use
specialized software. Theoretically you can reverse engineer both databases and create
437
two models, compare them and try to generate change scripts, but due to limitations
mentioned above the process will require more resources and will take longer. Other
products that do not work with models, e.g. Toad for Oracle, Toad for SQL Server and
others can offer you better performance and additional benefits - like comparison of
physical properties and data. Toad Data Modeler is a tool for visual creation of database
structures and should be used primarily with dev. version of databases. It doesn't represent
an alternative or competitive tool to specialized schema comparison software applications.
Model Size Limitations
l
Toad Data Modeler doesn't contain limitation based on fixed number of objects. You can
work with models of hundreds tables that contain few columns or on a model that contain
tens of tables with hundreds of column in each table. Number of other items in your
model (stored procedures, functions, sequences etc.) affects the performance as well. Other
factors include:
l
Type of tasks - you can model large database structure, generate complex
SQLscripts or detailed reports, but synchronization tasks might reach the
application limits sooner than generation of SQLscripts, for example.
Related Topics
Model Update (page 451)
Open Object Explorer - Live Reverse Engineering (page 257)
Alter Scripts (page 443)
Convert Physical Models (PER)Toad Data Modeler allows you to convert:PER model into a
model of another database systemPER model to LER model and vice versaClick Model |
Conversion...to open Sync & Convert Wizard.See "Sync & Convert Wizard" (page 1) for more
information.See "Simple Model Conversion" (page 1) for more information.ScenarioConvert your
Oracle 10g model Videorental to MS SQL 2008. Use the Sync & Convert Wizard. Click on the
toolbar to open the Sync & Convert Wizard.On the Action page, select Convert Model to
Another Target Database System.On the Select Left Side page, select File (*.txp, *.txl). Click the
button on the right to find model Videorental in the Open dialog.On the Select Right Side page,
select a target database system MS SQL 2008.On the Settings page, select Comment Out
Database Specific Items.Tip: You can select whether you want to comment the database specific
items or not. If you converted your Oracle 10g model to Oracle 11g, you would clear this
438
checkbox not to comment them.On the Select Object Types page, select Convert All.On the
Select Items page, you can select/deselect particular items of your model that you want or do not
want to convert. Leave the default selection to convert all items of model Videorental.On the
Review page, see the statistic information and define a model name for the converted model in
the New Model Name box - Videorental_Converted.Click Finish.The Sync & Convert Wizard
closes and the new model Videorental_Converted of MS SQL 2008 database opens in the
Application Window automatically.Note: Please read the User Guide for more examples on
model conversion. Related TopicsPER - PER Conversion Information (page 1)PER - LER
Conversion Information (page 1)Sync & Convert Wizard (page 1)Simple Model Conversion
(page 1)Conversion to Physical Model (page 1) (page 1)
Conversion to Physical Model (page 310)
Merge models
Basic Information
l
On the first page of the wizard, you select what action you want to perform. Then the
wizard guides you through other pages where you can select from the related options and
define particular settings.
The wizard allows you to work with the models from a file.
For alter script generation, on the Settings page of the wizard you can define Options for
Default Selection of Items (CREATE, DROP, ALTER). The settings affect the default
selection of items on page Select Items, which helps you to generate the alter script faster
and more comfortably.
439
The wizard has the Review page where you can find statistic data relating to the action
you perform.
For model merge, model compare and alter script generation, you have to select models of
the same database system.
Click
on the toolbar (or select File | Synchronization | Sync & Convert Wizard...).
Page
Description
Action
Settings
440
Page
Description
Log Progress to File - Select this checkbox to save
the messages that the Wizard returns to a file.
Notes:
Select Items
441
Page
Description
can be found in appropriate topics.
Note: Please read the User Guide for examples on actions you can perform in the Sync &
Convert Wizard.
Related Topics
Convert Model (page 431)
Model MergeMerge ModelsToad Data Modeler offers you two options to merge your
models:Simple Model Merge - allows you to merge physical models very quickly but without a
possibility to select particular items to merge. The target model will always be overwritten.
Model Merge in the Sync & Convert Wizard - allows you to see differences between two
models, select particular items to merge and merge the models either to already existing model or
into a new model.Example: You work with several models. Use Model Merge to compare the
models and merge them either one to the other (an existing model will be overwritten), or to
another model (a new model will be created). Both options are available at:File |
Synchronization |Sync & Convert.See Simple Model Merge for more information on this
option.See Sync & Convert Wizard for more information on the wizard.To merge your models in
the Sync & Convert WizardClick on the toolbar.On the Action page, select Merge Models.Go
through other pages of the wizard.Note: Please read the User Guide for more examples on model
merge.Sync & Convert Wizard, Select Items PageOn the Select Items page, you can select or
deselect items for the model merge select or clear the particular checkbox in the Action
column.OptionDescriptionGo to Previous DifferenceGo to Next DifferenceExpand AllCollapse
AllRefresh Necessitated ItemsExplanation: Some objects are related together (e.g. entity and
domain, entity and relationship). Once you clear the Action box for particular entity, the related
items will be deselected too. Not to see them in the list, click Refresh Necessitated Items. The
list will be refreshed and the needless items will be removed.Opens the Wildcard Dialog where
you can define settings for bulk selection/deselection of the Action box of the items listed on
page Select Items.Display options for objects Display options for propertiesSource ModelThe
model selected on page Select Left Side of the wizard. It is the updated or modified
model.Destination ModelThe model selected on page Select Right Side of the wizard. It is the
model that you want to update.ActionSelect this checkbox to apply the difference in the
Destination Model (Left model).Clear this checkbox not to apply the difference in the
Destination Model (Left model).Default selection: All differences are selected to be
applied.Icons:This icon and the blue color say: "There is a difference."This icon and the green
color say: "This item exists in Left model and is missing in Right model."This icon and the red
color say: "This item is missing in Left model and exists in Right model."This icon and the blue
color say: "There is a difference." - There are different model names.The selected Action
checkbox says: "Apply the difference in the Destination Model."By default, all the Action
checkboxes are selected, which means: "Take all differences from the Left model (Source Model)
and apply them in the Right model (Destination Model)."In this example it means, e.g.:Model
name line: The Right model Videorental_Original (Destination Model) will be renamed to
Videorental_Modified after the model merge.SCOTT.T_MEDIUM entity: The entity will be
442
added to the Right model.SCOTT.v_Customer_Has_Film view: The view will be deleted from
the Right model.Right-click an item to see the following options:OptionDescriptionCheck All
ChildrenSelects the Action checkbox of all children items.Uncheck All ChildrenClears the
Action checkbox of all children items.Check All Children to AddSelects the Action checkbox of
children items that exist in Left model and are missing in Right model (items) to add them to
the Right model.Check All Children to RemoveSelects the Action checkbox of children items
that are missing in Left model and exist in Right model (items) to remove them from the Right
model.Check All Modified ChildrenSelects the Action checkbox of children items where
properties differ (items) to apply the change in the Right model.Uncheck All Children to
AddClears the Action checkbox of children items that exist in Left model and are missing in
Right model (items) not to apply this change in the Right model.Uncheck All Children to
RemoveClears the Action checkbox of children items that are missing in Left model and exist in
Right model (items) not to apply this change in the Right model.Uncheck All Modified
ChildrenClears the Action checkbox of children items where properties differ (items) not to apply
this change in the Right model.Wildcard FilterOpens the Wildcard Dialog where you can define
settings for bulk selection/deselection of the Action box of the items listed on page Select
Items.Sync & Convert Wizard, Review PageOn the Review page, you can see the statistic
information. Here, you can also decide if you want to merge the changes to a new model or if
you want to update the existing model.To update the existing modelLeave the default settings.
To merge the models to a new modelSelect the Merge to New Model checkbox.To the Model
Name box, write the new model name.Related TopicsSync & Convert WizardSimple Model
MergeModel UpdateSynchronization (page 1)
Alter Scripts (page 443)
Model CompareCompare Models, Alter ReportsToad Data Modeler allows you to view
differences between two models and for physical models you can generate alter reports in HTML,
RTF and PDF formats. Alter reports are not available in logical models.Example: You want to
compare Oracle 10g models Videorental_Original and Videorental_Modified and generate
HTML alter report for the differences.Note: Please read the User Guide for solution to this
example of alter report generation.You can compare your models and generate the alter report
via the Sync & Convert Wizard.To compare models and generate the alter report Click on the
toolbar.On the Action page, select Compare Models and Generate Alter Report.Go through other
pages of the wizard.See Sync & Convert Wizard for more information on the wizard.Sync &
Convert Wizard, Select Items PageOn the Select Items page, you can see differences between the
models. The differences will be generated in the alter report.OptionDescriptionGo to Previous
DifferenceGo to Next DifferenceExpand AllCollapse AllGenerate Alter ReportNote: Click this
icon to generate the report, or click the button Report at the bottom of the page.Display options
for objectsDisplay options for propertiesModel 1The model selected on page Select Left Side of
the wizard. It is the updated or modified model.Model 2The model selected on page Select Right
Side of the wizard. It is the older version of the model.Diff.Column showing the type of
difference: This icon and the blue color say: "There is a difference." This icon and the green
color say: "This item exists in Left model (Model 1) and is missing in Right model (Model 2)."
This icon and the red color say: "This item is missing in Left model (Model 1) and exists in
Right model (Model 2)."To generate the alter reportClick on page Select Items of the Sync &
Convert Wizard. The Report Wizard opens. You can close the Sync & Convert Wizard.Go
through the steps in the Report Wizard (same as during standard report generation).Note: The
Options page of the Report Wizard for the alter report is empty for now.Finally click Execute
443
and Show to display the alter report.Related TopicsSync & Convert WizardHTML, RTF and
PDF Reports (page 1)
Alter Scripts
To synchronize changes that you made in the model with the database, generate alter scripts.
Alter scripts are generated in the Sync & Convert Wizard.
Example: You made some changes in your Oracle 10g model Videorental and resaved it as
model Videorental_Modified. (You added and also deleted some items, changed some properties
etc.). Now you want to generate complete alter script, including CREATE, DROP and ALTER
statements, for the model Videorental.
You don't have to work with two models. You can keep modifying a model (e.g. a previously
reversed model). Toad Data Modeler allows you to connect to your database directly without
prior complete reversing. So, you will simply open the Sync&Convert Wizard from your
modified model, go through the steps in the wizard, including connecting to your database.
To execute the generated alter script, you have to use a third party software (e.g. Toad for Oracle
for Oracle database). See "Toad for Oracle as Default Editor" (page 656) for more information.
Toad Data Modeler allows you to generate alter scripts for the following databases:
l
MSSQLAzure
on the toolbar.
444
4. On page Select Right Side, select the model model for which you want to
generate alter script. OR Connect directly to your database via the option
Reverse Engineering Alias.
5. On page Select Objects [RE], select tables you want to reverse (provided that
you connect to your database).
generate a complete alter script for all differences (CREATE, DROP and ALTER
statements), select all the checkboxes (all of them are selected by default).
7. On page Select Object Types, you can influence what object and property
differences you want to compare. Click Detailed Settings to make manual
selection of particular items.
445
Note: In previous versions, the settings defined in the DDL Script Generation
dialog | Detail Settings tab were also taken for the alter script generation
(quotations, schema prefix, primary key inside or outside statements). It was
recommended to set up the same DDL script generation settings for both models
that are being compared. Now it is not necessary. You can define these settings
directly in the Sync & Convert Wizard on the new page.
9. On the Select Items page, you can see the differences between the models.
Example:
446
447
Option
Description
Go to Previous Difference
Go to Next Difference
Expand All
Collapse All
Refresh Necessitated Items
Explanation: Some objects are related together (e.g. entity and domain,
entity and relationship). Once you clear the Action box for particular
entity, the related items will be deselected too. Not to see them in the list,
click Refresh Necessitated Items. The list will be refreshed and the
needless items will be removed.
Runs the verification process.
The verification might return a warning
box at the bottom of the page.
448
Option
Description
Display options for objects
Opens the Wildcard Dialog where you can define settings for bulk
selection/deselection of the Action box of the items listed on page Select
Items.
Model
1
The model selected on page Select Left Side of the wizard. It is the
updated or modified model.
Model
2
The model selected on page Select Right Side of the wizard. It is the
model for which you want to generate the alter script.
Action
Icons:
This icon and the green color say: "This item exists in Left model and is missing in
Right model."
This icon and the red color say: "This item is missing in Left model and exists in Right model."
449
All the Action checkboxes are selected in the example above, which means: "Generate alter
script for all the differences."
In this example it means, e.g.:
l
Changed data type from Varchar2 to Date of Order Date attribute: ALTER statement.
Option
Description
items) to
450
Option
Description
missing in Left model and exist in Right model (
items) not to generate alter script for this change.
Wildcard Filter
10. On page Review, see the statistic information and check out the output file with the
generated alter script. Click Finish.
451
Note: For databases MS SQL Azure, MS SQL Server, PostgreSQL, the following stands: If you
clear the Use Temporary Tables to Preserve Data checkbox, temporary UDT/DictType will not
be generated either. (They had to be created in connection with temporary tables.)
Related Topics
Sync & Convert Wizard (page 438)
Synchronization (page 435)
Model Update
Toad Data Modeler allows you to update models to synchronize changes between your database
and your model.
Example: You loaded the database structure of your database to Toad Data Modeler (Reverse
Engineering). - Model A was created. Then you made some changes in your database and now
you want to update the Model A. For this purpose, you can use the Model Update feature.
Model Update includes operations such as connecting to database, comparison and model merge.
To update your model
1. Open the model that you want to update.
2. Select Model | Synchronize | Update Model... to open the Model Update Wizard
3. Select Connection from the list of stored connections.
452
4. Click button Load Connection to load settings and type password to your
selected database connection
4. On the Tables page, select the tables that you want to load and click Execute.
453
6. On the Select Object Types page, select Compare All without Graphics.
7. On the Select Items page, you can select or deselect the items for the model merge
select or clear the particular checkbox in the Action column.
Leave the default selection, which means: "Take all differences from the Left
model (Source Model) and apply them in the Right model (Destination model)."
Example:
8. On the Review page, see the statistic information. Here, you can also decide if you want
to merge the changes to a new model or if you want to update the existing model.
You want to update the existing model.
454
9. Click Finish.
10. The wizard closes and the updated model activates in the Application Window.
Related Topics
Create New Model from Database - Reverse Engineering (page 255)
Model MergeMerge ModelsToad Data Modeler offers you two options to merge your
models:Simple Model Merge - allows you to merge physical models very quickly but without a
possibility to select particular items to merge. The target model will always be overwritten.
Model Merge in the Sync & Convert Wizard - allows you to see differences between two
models, select particular items to merge and merge the models either to already existing model or
into a new model.Example: You work with several models. Use Model Merge to compare the
models and merge them either one to the other (an existing model will be overwritten), or to
another model (a new model will be created). Both options are available at:File |
Synchronization |Sync & Convert.See Simple Model Merge for more information on this
option.See Sync & Convert Wizard for more information on the wizard.To merge your models in
the Sync & Convert WizardClick on the toolbar.On the Action page, select Merge Models.Go
through other pages of the wizard.Note: Please read the User Guide for more examples on model
merge.Sync & Convert Wizard, Select Items PageOn the Select Items page, you can select or
deselect items for the model merge select or clear the particular checkbox in the Action
column.OptionDescriptionGo to Previous DifferenceGo to Next DifferenceExpand AllCollapse
AllRefresh Necessitated ItemsExplanation: Some objects are related together (e.g. entity and
domain, entity and relationship). Once you clear the Action box for particular entity, the related
items will be deselected too. Not to see them in the list, click Refresh Necessitated Items. The
list will be refreshed and the needless items will be removed.Opens the Wildcard Dialog where
you can define settings for bulk selection/deselection of the Action box of the items listed on
page Select Items.Display options for objects Display options for propertiesSource ModelThe
model selected on page Select Left Side of the wizard. It is the updated or modified
model.Destination ModelThe model selected on page Select Right Side of the wizard. It is the
model that you want to update.ActionSelect this checkbox to apply the difference in the
455
Destination Model (Left model).Clear this checkbox not to apply the difference in the
Destination Model (Left model).Default selection: All differences are selected to be
applied.Icons:This icon and the blue color say: "There is a difference."This icon and the green
color say: "This item exists in Left model and is missing in Right model."This icon and the red
color say: "This item is missing in Left model and exists in Right model."This icon and the blue
color say: "There is a difference." - There are different model names.The selected Action
checkbox says: "Apply the difference in the Destination Model."By default, all the Action
checkboxes are selected, which means: "Take all differences from the Left model (Source Model)
and apply them in the Right model (Destination Model)."In this example it means, e.g.:Model
name line: The Right model Videorental_Original (Destination Model) will be renamed to
Videorental_Modified after the model merge.SCOTT.T_MEDIUM entity: The entity will be
added to the Right model.SCOTT.v_Customer_Has_Film view: The view will be deleted from
the Right model.Right-click an item to see the following options:OptionDescriptionCheck All
ChildrenSelects the Action checkbox of all children items.Uncheck All ChildrenClears the
Action checkbox of all children items.Check All Children to AddSelects the Action checkbox of
children items that exist in Left model and are missing in Right model (items) to add them to
the Right model.Check All Children to RemoveSelects the Action checkbox of children items
that are missing in Left model and exist in Right model (items) to remove them from the Right
model.Check All Modified ChildrenSelects the Action checkbox of children items where
properties differ (items) to apply the change in the Right model.Uncheck All Children to
AddClears the Action checkbox of children items that exist in Left model and are missing in
Right model (items) not to apply this change in the Right model.Uncheck All Children to
RemoveClears the Action checkbox of children items that are missing in Left model and exist in
Right model (items) not to apply this change in the Right model.Uncheck All Modified
ChildrenClears the Action checkbox of children items where properties differ (items) not to apply
this change in the Right model.Wildcard FilterOpens the Wildcard Dialog where you can define
settings for bulk selection/deselection of the Action box of the items listed on page Select
Items.Sync & Convert Wizard, Review PageOn the Review page, you can see the statistic
information. Here, you can also decide if you want to merge the changes to a new model or if
you want to update the existing model.To update the existing modelLeave the default settings.
To merge the models to a new modelSelect the Merge to New Model checkbox.To the Model
Name box, write the new model name.Related TopicsSync & Convert WizardSimple Model
MergeModel UpdateSynchronization (page 1)
Model Compare
Compare Models, Alter Reports
Toad Data Modeler allows you to view differences between two models and for physical models
you can generate alter reports in HTML, RTF and PDF formats. Alter reports are not available in
logical models.
Example: You want to compare Oracle 10g models Videorental_Original and Videorental_
Modified and generate HTML alter report for the differences.
Note: Please read the User Guide for solution to this example of alter report generation.
You can compare your models and generate the alter report via the Sync & Convert Wizard.
456
on the toolbar.
2. On the Action page, select Compare Models and Generate Alter Report.
3. Go through other pages of the wizard.
See "Sync & Convert Wizard" (page 438) for more information on the wizard.
Description
Go to Previous Difference
Go to Next Difference
Expand All
Collapse All
Generate Alter Report
Note: Click this icon to generate the report, or click the button Report at
the bottom of the page.
Display options for objects
Model
1
The model selected on page Select Left Side of the wizard. It is the
updated or modified model.
Model
2
The model selected on page Select Right Side of the wizard. It is the
older version of the model.
Diff.
457
Option
Description
This icon and the green color say: "This item exists in Left model
(Model 1) and is missing in Right model (Model 2)."
This icon and the red color say: "This item is missing in Left model
(Model 1) and exists in Right model (Model 2)."
Related Topics
Sync & Convert Wizard (page 438)
Reports (page 319)
Model Merge
Merge Models
Toad Data Modeler offers you two options to merge your models:
l
Simple Model Merge - allows you to merge physical models very quickly but without a
possibility to select particular items to merge. The target model will always be
overwritten.
Model Merge in the Sync & Convert Wizard - allows you to see differences between
two models, select particular items to merge and merge the models either to already
existing model or into a new model.
Example: You work with several models. Use Model Merge to compare the
models and merge them either one to the other (an existing model will be
overwritten), or to another model (a new model will be created).
458
See "Sync & Convert Wizard" (page 438) for more information
To merge your models in the Sync & Convert Wizard
1. Click
on the toolbar.
Description
Go to Previous Difference
Go to Next Difference
Expand All
Collapse All
Refresh Necessitated Items
Explanation: Some objects are related together (e.g. entity and
domain, entity and relationship). Once you clear the Action box for
particular entity, the related items will be deselected too. Not to see
them in the list, click Refresh Necessitated Items. The list will be
refreshed and the needless items will be removed.
Opens the Wildcard Dialog where you can define settings for bulk
selection/deselection of the Action box of the items listed on page
Select Items.
Display options for objects
459
Option
Description
Display options for properties
Source
Model
The model selected on page Select Left Side of the wizard. It is the
updated or modified model.
Destination
Model
The model selected on page Select Right Side of the wizard. It is the
model that you want to update.
Action
Icons:
This icon and the green color say: "This item exists in Left model and is missing in
Right model."
This icon and the red color say: "This item is missing in Left model and exists in Right model."
This icon and the blue color say: "There is a difference." - There are different model names.
The selected Action checkbox says: "Apply the difference in the Destination Model."
By default, all the Action checkboxes are selected, which means: "Take all differences from the
Left model (Source Model) and apply them in the Right model (Destination Model)."
In this example it means, e.g.:
l
Model name line: The Right model Videorental_Original (Destination Model) will be
renamed to Videorental_Modified after the model merge.
460
SCOTT.v_Customer_Has_Film view: The view will be deleted from the Right model.
Option
Description
items) to
461
Option
Description
Wildcard Filter
Related Topics
Sync & Convert Wizard (page 438)
Simple Model Merge (page 461)
Model Update (page 451)
Synchronization (page 435)
Simple Model Merge
This feature allows you to merge two physical models very quickly.
In comparison to the model merge in the Sync & Convert Wizard:
l
You cannot select particular items for the model merge (e.g. not to merge particular
entity). You can select only Object Types and Properties for the model merge.
462
4. From the To Model box, select a model that you want to update (target model). - This
model will be overwritten.
5. See other options.
Option
Description
To
Model
More>>
Close
after
Merge
Merge
Close
6. Click Merge.
Related Topics
Model MergeMerge ModelsToad Data Modeler offers you two options to merge your
models:Simple Model Merge - allows you to merge physical models very quickly but without a
possibility to select particular items to merge. The target model will always be overwritten.
Model Merge in the Sync & Convert Wizard - allows you to see differences between two
models, select particular items to merge and merge the models either to already existing model or
into a new model.Example: You work with several models. Use Model Merge to compare the
models and merge them either one to the other (an existing model will be overwritten), or to
another model (a new model will be created). Both options are available at:File |
Synchronization |Sync & Convert.See "Simple Model Merge" (page 1) for more informationSee
"Sync & Convert Wizard" (page 1) for more informationTo merge your models in the Sync &
Convert WizardClick on the toolbar.On the Action page, select Merge Models.Go through other
pages of the wizard.Note: Please read the User Guide for more examples on model merge.Sync
& Convert Wizard, Select Items PageOn the Select Items page, you can select or deselect items
for the model merge select or clear the particular checkbox in the Action
column.OptionDescriptionGo to Previous DifferenceGo to Next DifferenceExpand AllCollapse
AllRefresh Necessitated ItemsExplanation: Some objects are related together (e.g. entity and
domain, entity and relationship). Once you clear the Action box for particular entity, the related
items will be deselected too. Not to see them in the list, click Refresh Necessitated Items. The
list will be refreshed and the needless items will be removed.Opens the Wildcard Dialog where
you can define settings for bulk selection/deselection of the Action box of the items listed on
page Select Items.Display options for objects Display options for propertiesSource ModelThe
463
model selected on page Select Left Side of the wizard. It is the updated or modified
model.Destination ModelThe model selected on page Select Right Side of the wizard. It is the
model that you want to update.ActionSelect this checkbox to apply the difference in the
Destination Model (Left model).Clear this checkbox not to apply the difference in the
Destination Model (Left model).Default selection: All differences are selected to be
applied.Icons:This icon and the blue color say: "There is a difference."This icon and the green
color say: "This item exists in Left model and is missing in Right model."This icon and the red
color say: "This item is missing in Left model and exists in Right model."This icon and the blue
color say: "There is a difference." - There are different model names.The selected Action
checkbox says: "Apply the difference in the Destination Model."By default, all the Action
checkboxes are selected, which means: "Take all differences from the Left model (Source Model)
and apply them in the Right model (Destination Model)."In this example it means, e.g.:Model
name line: The Right model Videorental_Original (Destination Model) will be renamed to
Videorental_Modified after the model merge.SCOTT.T_MEDIUM entity: The entity will be
added to the Right model.SCOTT.v_Customer_Has_Film view: The view will be deleted from
the Right model.Right-click an item to see the following options:OptionDescriptionCheck All
ChildrenSelects the Action checkbox of all children items.Uncheck All ChildrenClears the
Action checkbox of all children items.Check All Children to AddSelects the Action checkbox of
children items that exist in Left model and are missing in Right model (items) to add them to
the Right model.Check All Children to RemoveSelects the Action checkbox of children items
that are missing in Left model and exist in Right model (items) to remove them from the Right
model.Check All Modified ChildrenSelects the Action checkbox of children items where
properties differ (items) to apply the change in the Right model.Uncheck All Children to
AddClears the Action checkbox of children items that exist in Left model and are missing in
Right model (items) not to apply this change in the Right model.Uncheck All Children to
RemoveClears the Action checkbox of children items that are missing in Left model and exist in
Right model (items) not to apply this change in the Right model.Uncheck All Modified
ChildrenClears the Action checkbox of children items where properties differ (items) not to apply
this change in the Right model.Wildcard FilterOpens the Wildcard Dialog where you can define
settings for bulk selection/deselection of the Action box of the items listed on page Select
Items.Sync & Convert Wizard, Review PageOn the Review page, you can see the statistic
information. Here, you can also decide if you want to merge the changes to a new model or if
you want to update the existing model.To update the existing modelLeave the default settings.
To merge the models to a new modelSelect the Merge to New Model checkbox.To the Model
Name box, write the new model name.Related TopicsSync & Convert Wizard (page 1)Simple
Model Merge (page 1)Model Update (page 1)Synchronization (page 1) (page 1)
Sync & Convert Wizard (page 438)
Simple Model Conversion (page 434)
464
Default options (e.g. options for models) - If you change default options, the changes
will be applied for new models,not in already existing models.
Other options (e.g. number of Undo/Redo steps, paths in Version Manager) - You can
change them at any time. The changes will be applied immediately for the currently
opened model.
Application - here you can modify all basic settings of the application
Model - here you can modify settings for every new model you will create and for models
of particular database platform
Application
Expert Mode
Page
General Page
Graphics Page
Colors area
Autolayout
area
Dialog Boxes
Page
Other examples:
Automatic Apply before Edit - If it's selected, you
can add e.g. new attributes to entities without the
465
Reverse
Engineering
Page
466
Reports Page
Version
Manager Page
Editable
Forms Page
Here, you can find basic options for design mode and
particular options for Component Palette, Object
Inspector, and Form Explorer.
If you accidentally close the Component Palette ,
Object Inspector, Form Explorer or Alignment
palette, select appropriate checkboxes on tab Design
Mode in this dialog.
467
Scripting Page
Show
Windows
Automatically
Show Log
Toad for
Oracle
Integration
Page
Version
Control
System Page
Print settings
Page
468
Model
Set default format settings for new models - physical and logical or for new Workspaces.
Physical
Model Page
Page of
Particular
Database
Define
External
Editor for
particular
database
469
470
Logical
Model Page
Related Topics
Designer and Workspace
To define different colors for attributes on your Workspace (page 86)
Default Values
Toad Data Modeler allows you to define and change default values of objects in your models.
Examples:
l
You want to define default values for referential integrity type in your model.
You want to define Not Null property for all new attributes that you create in
your model.
You want to define a name for your relationships in the following format: 'parent table child table'.
Tip: You can use application variables in default values. See "Application
Variables and Default Values" (page 376) for more information.
To define a default value e.g. for relationships in your Oracle 10g model
1. Open your Oracle 10g model.
2. Select Settings | Default Values.
3. Select the Relationships item in the list.
4. Select the default value you want to modify.
5. Press F2 in the Default Value column.
6. Define the value and click anywhere else in the dialog.
7. Confirm OK.
8. Restart Toad Data Modeler.
Note: When you change the default values, you make modifications in package
(by default in My Package.txg file). So, to apply the changes, you need to save
the package.
9. Create a new relationship. - All newly created relationships will have the new
default value.
471
472
Option
Description
Model Objects
Class Context
473
Option
Description
Name
Default Value
Source
Status
Ancestor
Source
RelatedTopics
Features (page 374)
Templates
About Templates
Toad Data Modeler allows you to:
l
Use pre-defined templates for properties that contain SQL code in your model (SQL,
Before Script, After Script etc.).
Example: You have created an entity trigger. Edit it and see the SQL tab in the Trigger
Properties dialog. The SQL code has been pre-defined = particular default template has been
474
used (according to the database). You dont have to write the code manually for every new
created trigger.
Press CTRL+A to highlight all text in the text box and select another template from the
Templates box.
Note: To replace one template with another, all text should be selected.
Otherwise, the new template selected from the Templates box will be inserted
to the position of cursor in the box. This behavior allows you to put together
partial templates.
Option
Description
Templates
475
Note: Templates for Properties with SQL Code - To find out for which properties you
can create the templates, see the Reference Guide and search the Supports Templates
attribute.
Related Topics
Template Editor (page 475)
Toad for Oracle TemplatesToad Data Modeler allows you to import the templates you created in
Toad for Oracle and refresh them at any time you need.We do not recommend to modify these
templates in Toad Data Modeler as export of the templates to Toad for Oracle is not
possible.Toad Data Modeler imports Toad for Oracle templates of the following objects:Stored
ProceduresFunctionsEntity TriggersPackages (object in Oracle)To import Toad for Oracle
template to Toad Data ModelerOpen Template Editor - Select Settings | Template Editor.Click .
The following dialog displays:Confirm OK and take notice of new templates in Template Editor
(e.g. "Default" templates).Note: The Toad for Oracle templates are stored in TOAD.txg file at:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation
name\Packages\{GUI}To refresh your existing Toad for Oracle templates in Toad Data
ModelerClick . Toad for Oracle Auto Replacement WordsToad Data Modeler allows you to use
Application Variables in your templates. See.Toad for Oracle templates can have Auto
Replacement Words.During import of Toad for Oracle templates, the Toad for Oracle Auto
Replacement Words are replaced by Toad Data Modeler Application Variables. See how:Toad
for Oracle Auto Replacement WordToad Data Modeler Application
Variable%YourObjectName%<%FullName%>%Date%<%Date%>%SysDate%<%Date%>%Date
Time%<%DateTime%>%Time%<%Time%>%TableName%<%TableFullName%>%UserName%'
<%Author%>Note: Not all Toad for Oracle Auto Replacement Words are supported. (page 1)
Template Editor
To open Template Editor
Option
Description
Commit
Rollback
Model Type
476
477
Option
Description
Creates a new template.
Deletes the selected template. Click Commit to
confirm the deletion.
Opens the Template Properties dialog.
Object Category
Parent
Template Name
Default
Active
Template
478
END
l
Complete The Generate SQL Only checkbox is selected. (It means that settings on tab
General are ignored in final SQL code.)
Example of default code for trigger:
CREATE OR REPLACE TRIGGER <%<%FullName%>%>
AFTER /*BEFORE*/
INSERT /*UPDATE | DELETE*/
ON <%<%TableFullName%>%>
BEGIN
/*trigger_body*/
END
To set up this property for your user templates, see the Template Properties dialog, General tab
and select or clear the Generate SQL Only checkbox.
Where Templates Are Stored
All pre-defined templates are saved in the Templates.txg file that is copied among user packages
during first start-up of Toad Data Modeler.
All user templates are by default saved to My Package.txg.
Both files are stored among user packages at (default location):
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation
name\Packages\{GUI}
Why are pre-defined templates stored in another package? - Once our team brings new predefined templates, you will be able to replace the old pre-defined templates with the new ones
(Templates.txg). Your user templates will stay preserved in your My Package.txg.
We do NOT recommend to modify the pre-defined templates. If you do so, please remember
to save the template to My Package.txg (see the Template Properties dialog, General tab,
Package area.)
Related Topics
Manage Templates (page 479)
Toad for Oracle TemplatesToad Data Modeler allows you to import the templates you created in
Toad for Oracle and refresh them at any time you need.We do not recommend to modify these
templates in Toad Data Modeler as export of the templates to Toad for Oracle is not
479
possible.Toad Data Modeler imports Toad for Oracle templates of the following objects:Stored
ProceduresFunctionsEntity TriggersPackages (object in Oracle)To import Toad for Oracle
template to Toad Data ModelerOpen Template Editor - Select Settings | Template Editor.Click .
The following dialog displays:Confirm OK and take notice of new templates in Template Editor
(e.g. "Default" templates).Note: The Toad for Oracle templates are stored in TOAD.txg file at:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation
name\Packages\{GUI}To refresh your existing Toad for Oracle templates in Toad Data
ModelerClick . Toad for Oracle Auto Replacement WordsToad Data Modeler allows you to use
Application Variables in your templates. See.Toad for Oracle templates can have Auto
Replacement Words.During import of Toad for Oracle templates, the Toad for Oracle Auto
Replacement Words are replaced by Toad Data Modeler Application Variables. See how:Toad
for Oracle Auto Replacement WordToad Data Modeler Application
Variable%YourObjectName%<%FullName%>%Date%<%Date%>%SysDate%<%Date%>%Date
Time%<%DateTime%>%Time%<%Time%>%TableName%<%TableFullName%>%UserName%'
<%Author%>Note: Not all Toad for Oracle Auto Replacement Words are supported. (page 1)
Manage Templates
To create a user template
1. In Template Editor, select Object Category (e.g. Triggers).
2. Click
and write the code in the Template body for template window.
Tip: Feel free to use application variables in your templates. Reference link.
Note: To change the template name, click the Template Name column, press F2,
write the new name and press Enter.
3. Confirm the changes Commit or Commit and Save.
To change properties of a user template (e.g. location, visibility etc.)
1. Select a template.
2. Click
Option
Description
General Tab
Name
Property Selection
Active Template
480
Option
Description
in the Templates box in the object
Properties dialog.
Default Template
Generate SQL
Only
Package
Lock Package
Visibility Tab
4. Confirm OK.
5. Confirm Commit and Save.
To set a template as Default
1. Select a template in Template Editor.
2. Select the Default checkbox for the template.
3. Confirm Commit and Save.
To disable a template
(not to display it in the combo-box in the object Properties dialog)
1. In Template Editor, find the template that you want to disable and clear the
Active checkbox.
2. Confirm Commit and Save.
481
To delete a template
1. In Template Editor, select the template that you want to delete.
2. Click
3. Confirm Commit and Save. Now it is not possible to edit the template.
Note: After you reopen the Template Editor, the deleted item will be removed.
The template has been deleted from the .txg package.
Related Topics
Template Editor (page 475)
Toad for Oracle Templates
Toad Data Modeler allows you to import the templates you created in Toad for Oracle and
refresh them at any time you need.
We do not recommend to modify these templates in Toad Data Modeler as export of the
templates to Toad for Oracle is not possible.
Toad Data Modeler imports Toad for Oracle templates of the following objects:
l
Stored Procedures
Functions
Entity Triggers
3. Confirm OK and take notice of new templates in Template Editor (e.g. "Default"
templates).
Note: The Toad for Oracle templates are stored in TOAD.txg file at:
C:\Documents and Settings\user name\My Documents\Toad Data
Modeler\Installation name\Packages\{GUI}
482
To refresh your existing Toad for Oracle templates in Toad Data Modeler
1. Click
%YourObjectName%
<%FullName%>
%Date%
<%Date%>
%SysDate%
<%Date%>
%DateTime%
<%DateTime%>
%Time%
<%Time%>
%TableName%
<%TableFullName%>
%UserName%'
<%Author%>
483
Note: Not all Toad for Oracle Auto Replacement Words are supported.
Dictionaries
Dictionaries tool is available from the Settings | Dictionaries... menu and allows you to add and
translate new terms in your current dictionary from other dictionaries, import web-based
dictionaries and export dictionaries to the web (in CSV file format).
File Extensions
Toad Data Modeler works with the following files:
File
Description
*.TXP
*.TXL
*.TXM
*.DM2
File
Description
*.DMX
*.TXG
Packages
*.TXD
*.TXC
Config files
*.TXE
*.TXS
*.XSLT
*.XSD
*.TXA
*.TXV
*.TXN
Exceptions
*.TXI
Export/Import of Dictionary
*.TXO
OTPs settings
*.CSV
*.TXN
*.TXP Files
Physical models created in Toad Data Modeler have *.TXP extension. These files are in
XML format.
484
485
*.TXL Files
Logical models created in Toad Data Modeler have *.TXL extension. These files are in
XML format.
By default, the .TXP and .TXL files are saved to a path defined in the Settings menu | Options |
Application | Paths | Advanced tab | Paths to Models.
*.TXM Files
Metamodels in XML format.
System metamodels are saved together with the application installation package. Possible path is:
C:\Program Files\Quest Software\Toad Data Modeler 3\Packages\System\MetaModels.
Path to user's metamodels can be set in the Settings menu | Options | Application | Paths | Paths
to Metamodels.
*.DM2 Files
Models created in Toad Data Modeler 2.x product.
*.DMX Files
Models created in Toad Data Modeler 2.x product (*.DM2) that were exported to XML format.
*.TXG Files
Packages where definition of database or its part, scripts, forms, data types etc. are saved. It's an
XML format.
System packages are saved together with the application installation package. Possible path is:
C:\Program Files\Quest Software\Toad Data Modeler 3\Packages\System.
User packages are saved in user's Documents and Settings directory, e.g.:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation
Name\Packages\{SOME GUID Number}.
*.TXD Files
Default config files that are saved together with the application installation package, e.g.:
C:\Program Files\Quest Software\Toad Data Modeler 3\Configs.
486
*.TXC Files
Config files that contain settings of Toad Data Modeler. The settings are accessible in the
Settings menu | Options.
.TXC files are modified .TXD files. If .TCX file doesn't exist, it will be created in user's
Documents and Settings directory automatically after running the application. Settings of .TXD
file will be copied to the new .TXC file then.
*.TXE File
Changed environment of Toad Data Modeler will be saved to this file after the
application is closed.
This file is saved in user's Documents and Settings directory.
*.TXS Files
Files with Style definitions for HTML reports.
CSS styles are saved in user's Documents and Settings directory.
*.XSLT Files
Templates for XSL transformation. Default path: C:\Program Files\Quest Software\Toad Data
Modeler 3\XSL
*.XSD Files
XSD file describes structure of XML file - of your physical model created in Toad Data Modeler
(TXP file). XSD shows how the TXP file looks like, how it is structured etc.
By default, the XSD file is generated to:
C:\Documents and Settings\user\My Documents\Toad Data Modeler\Reports
*.TXA Files
Files where aliases created during reverse engineering are saved. They are saved in user's
Documents and Settings directory.
The path to aliases can be set in the Settings menu | Options | Application | Reverse
Engineering | Paths to Aliases.
487
*.TXV Files
Local files created after the Check Out operation in Version Manager. These files are contained
in projects saved in Version Manager. They are saved in user's Documents and Settings directory.
The paths can be set in the Settings menu | Options | Application | Version Manager.
*.TXN Files
Files that contain exceptions for data type conversion between databases.
*.TXI Files
Files where dictionary items (User Data Types, Dictionary Types and Domains) are saved
during export/import between models. You can save the .TXI file where you want, no default
path is defined.
*. TXO Files
Files where selected OTPs settings are saved.
1. Default (System) Selected OTPs are stored by default at:
C:\Program Files\Quest Software\Toad Data Modeler\Selected OTPs
2. User Selected OTPs are stored by default at:
C:\Documents and Settings\user\My Documents\Toad Data Modeler\Installation
Name\Selected OTPs
*.CSV Files
Import/export of glossaries (*.CSV files) also from/to other tools is possible. See the Naming
Convention Properties dialog | Glossary tab | Import button. You can find some CSV files with
diacritical marks at: C:\Program Files\Quest Software\Toad Data Modeler 3\Naming
Conventions\CSV.
*.TXN Files
Every defined naming convention is stored in external .TXN file stored by default in user
Documents folder, directory Toad Data Modeler\ Installation name\Naming Conventions.
Notes:
488
1. Generally, it stands that system files are saved together with the application installation
package. (E.g.: C:\Program Files\Quest Software\Toad Data Modeler 3).
Files modified by a user are saved in the user's Documents and Settings directory.
(E.g.: C:\Documents and Settings\user name\My Documents\Toad Data Modeler,
or C:\Documents and Settings\user name\Application Data\Quest Software\Toad
Data Modeler.
2. The Documents and Settings directory is empty until you run Toad Data Modeler.
Then, all appropriate files will be copied to this directory from the application
installation package.
All changes you make for the files (e.g. changes in the application layout, new
aliases, modified styles in reports, new default path to generated SQL/DDL code,
modified My Package.txg file etc.) will be saved here and will be preserved when
you update the application.
If you need to restore the original default settings, you can simply delete
appropriate file in the Documents and Settings directory. When you run Toad Data
Modeler then, appropriate original default file from C:\Program Files\Quest
Software\Toad Data Modeler 3 will be copied to the Documents and Settings
directory again.
Version Control
Subversion
Getting Started - Subversion
Toad Data Modeleroffers you integration with third party version control systems. Version 5.0
supports Apache Subversion.
Note: If you are familiar with Apache Subversion, you can skip this topic and navigate to
Application Settings topic.
489
490
3. Define path to your SVN Server location, specify folder for your repository and
choose authentication method.
4. After installation run the Visual Server SVN Manager and create new user.
491
492
6. Edit properties of your repositories and add setup permissions for your newly created user.
493
If you wish to save some time, make your Visual Server SVN Manager active, select your
repository, right click on it and choose Copy URL to Clipboard.
494
4. If you wish to use Working folder for all your projects, select section Paths and define
Path to Projects to the same folder as you specified in field Working Directory.
495
Project Settings
1. Before you create new project (with Version Control System) in Toad Data Modeler, run
Visual Server SVN Manager and add new folder to your repository.
496
4. Define Project settings and if you wish to keep configuration simple, define path to
Location and Working Directory to the same folder.
497
498
5. In last step you have to specify path to folder where svn.exe file is available and Server
Path. To save time, select your folder in Visual SVN Server Manager, right click on it
and choose Copy URL to Clipboard.
6. Then paste the path to Server Path field in Toad Data modeler Project Wizard.
499
7. Important: Now you have to right click your created project in Application View and
choose Subversion | Check Out. This step is required!
500
Subversion Actions
You can run Subversion actions from Application View.
Adding new folder
To add new folder
Right click your project name and choose New Folder...
Create new folder and then right click the folder and choose Subversion | Add.
To commit changes right click the folder again and choose Subversion | Commit.
Adding new model
To add new model to project
Right click project name or folder name and select New Model...
After creation right click the model name and select Subversion | Add. Confirm the addition by
selecting Subversion | Commit.
Working with other files
You can add also *.doc, *.xls and other file formats to your projects (check them out from
subversion etc.)
Toad Data Modeler allows you to open them from Application View.
To open existing file
Right click the file name in Application View and select Open File.
501
Legend
Direct comparison
If you wish to compare two models stored in Subversion, check them out one by one and make a
copy of one of them. Direct comparison belongs among planned features.
502
Version Manager
About Version Manager
Version Manager allows you to create projects, add models (logical models, physical models)
and other files (e.g. text files, images etc.) to your projects, create versions and revisions etc.
Toad Data Modeler allows you to create unlimited number of projects.
To open Version Manager
1. Enable Expert Mode: select Settings | Options | General | select the Expert
Mode checkbox.
2. Click
Version Manager window is a place from where you can access all files stored in
Version Manager.
Tip: You can open several instances of Version Manager, e.g. for each project.
What Is a Project?
Project is a group of models and other files that logically match together although they are not of
the same origin (physical data model, document file, image etc.).
Example: You have created a project for Company "X". This project contains various models
(LER, PER models) and some other files (text files, images etc). The models are models of
different databases and have a different number of versions/revisions. Nevertheless, all these
models and files logically match together - all of them relate to Company "X".
As stated above, projects can contain models as well as other files of any type (e.g. any
documentation to models, text files, images, other programs...) Nevertheless, Toad Data
Modeler is not able to work directly with such files. It can only call appropriate programs or
allows you to view them only (see the Show Version (only to read) option).
Related Topics
Projects and Files in Version ManagerThere are several ways how to create a project and add
files to it:Create a new project from scratch (plus possibility to add several files to the project at
one jump. - It is recommended when you store all files that you want to add to the new project
in one directory.)Create a new project while adding an ER Diagram to the project. - It is
recommended when you want to add a single Toad Data Modeler model to a new or already
existing project.Add a single file to already existing project additionally (no matter if it is a
model, text document, screenshot etc.).Summary - Add a model and file to already existing
project.A. Create a New Project from ScratchClick on the toolbar.Right-click the Local Server
item and select Add Project.Define properties of the project (see the following details). General
503
TabDescriptionNameDefine a project name. The project name has to carry out conditions for file
names set in Windows, e.g. question mark "?" cannot be contained. The project name will
become a directory name on a disk. See the path where it will be created in the Settings menu |
Options | Version Manager. The default path can be:C:\Documents and Settings\user\Application
Data\Quest Software\Toad Data Modeler\Installation
Name\VersionManager\Server\Project\Project_Name.All files created in Version Manager will be
saved here until you change the path. Note: Information on versions (and their relations to other
versions and revisions) are saved by default to another file. Possible path is: C:\Documents and
Settings\userName\Application Data\Quest Software\Toad Data Modeler\Installation
Name\VersionManager\Server\projects.xmlAgain, you can change the path in the Settings
menu.Load Files in DirectoryClear (or not to select) this option to create a new project and let it
be empty.Select this option to enable the Directory box. Click the icon on the right to define a
path to a directory with files that you want to add to the project. All files stored in the directory
will be added to the project automatically. Sub-directories will be ignored. Description
TabNotes on the project should be written on this tab. If you want to add a group of files to this
project, follow the next steps 5 and 6.You already need to have all the files stored in one
directory.Select Load Files in Directory and click the small icon on the right. Find a directory
where files that you want to add to the project are stored.Confirm OK to load all files stored in
the directory to the project.B. Create a New Project + Add an ER Diagram to the ProjectCreate a
new model or open an existing one.Click on the toolbar (or Expert Mode | Version Manager |
Add to Version Manager) to open the New Version Location dialog.If no project exists on your
local server, click Add Project . (And follow step 4.)If the project where you want to add the
model exists on your local server, simply select it and click OK to add the model to the
project.The New Project dialog opens. Define a name and description of your project.Press OK to
confirm and turn back to the New Version Location dialog.Select the new project and confirm
OK to add the model to the project.The Check Outmessage displays and you are prompted to
define a path where your file should be checked outConfirm OK. The file doesn't exist and
therefore will be created.Click Yes. See the Version Manager now.C. Add a Single File to
Existing ProjectClick on the toolbar to open Version Manager. Right-click the selected project
and click Add File to display a File browser.From the Files of Type box, select the appropriate
type, find the file and confirm Open. D. Summary - Add a Model and File to Existing
ProjectModel: Open the model and simply click on the toolbar. Select a project and confirm OK.
(See B.)Model or any other file: In Version Manager, right-click the selected project and click
Add File, find the file and confirm Open. (See C.)Related TopicsVersion Manager Toolbar and
Options (page 1)
Projects and Files in Version Manager
There are several ways how to create a project and add files to it:
A. Create a new project from scratch (plus possibility to add several files to the project at
one jump. - It is recommended when you store all files that you want to add to the new
project in one directory.)
B. Create a new project while adding an ER Diagram to the project. - It is recommended
when you want to add a single Toad Data Modeler model to a new or already
existing project.
504
C. Add a single file to already existing project additionally (no matter if it is a model, text
document, screenshot etc.).
D. Summary - Add a model and file to already existing project.
on the toolbar.
General
Tab
Description
Name
Load Files
in
Directory
505
4. If you want to add a group of files to this project, follow the next steps 5 and 6.
You already need to have all the files stored in one directory.
5. Select Load Files in Directory and click the small icon on the right. Find a directory
where files that you want to add to the project are stored.
6. Confirm OK to load all files stored in the directory to the project.
If the project where you want to add the model exists on your local server, simply select
it and click OK to add the model to the project.
4. The New Project dialog opens. Define a name and description of your project.
5. Press OK to confirm and turn back to the New Version Location dialog.
6. Select the new project and confirm OK to add the model to the project.
7. The Check Outmessage displays and you are prompted to define a path where your file
should be checked out
8. Confirm OK. The file doesn't exist and therefore will be created.
9. Click Yes. See the Version Manager now.
506
2. Right-click the selected project and click Add File to display a File browser.
3. From the Files of Type box, select the appropriate type, find the file and confirm Open.
Model or any other file: In Version Manager, right-click the selected project and click Add File,
find the file and confirm Open. (See C.)
Related Topics
Version Manager Toolbar and OptionsIn Version Manager, the items are sorted this way:Projects
are listed alphabetically.Under projects, files are listed in the alphabetical order too. Under files,
their versions and revisions are displayed. Versions and revisions of files are sorted in the order
they were created. This sorting allows you to see what version precedes which one, what version
has been derived from which etc. No other sorting is available in Version Manager itself,
however you can sort the items also in the List of Versions and dock the List on Version
Manager.Tip: Searching in the tree of Version Manager: When you need to find a particular
project or file in Version Manager, simply expand the Version Manager item folders and start
typing the project/file name. - This function works for expanded folders (search will not go
through folders that are collapsed).Learn more about options in the Version Manager and its
items.Version Manager ToolbarIconCommandCheck OutCheck InLockUnlockSave Version
asThese options are active for versions/revisions and also file (if you click a file in Version
Manager, the options will relate to its latest version).Note: The options are described in the
Version Right-Click Options section below.Project Right-Click OptionsRight-click a project to
see the following options:OptionDescriptionLock ProjectLocks project not to be overwritten.
Note on the Lock option: Generally, there are two colors of padlock in Version Manager. Blue
padlock means that you are the person who locked the project/file/version, so only you can
modify it. Yellow padlock means that another person locked the project/file/version, so you are
not allowed to make any changes in it unless the project/file/version is unlocked by the
particular person again. Unlock Project Unlocks project.Add FileOpens a dialog where you
select a file that you want to add to the project. Via this option, you can add any file to the
project - Toad Data Modeler model(s) as well as any other files. Remove ProjectRemoves the
selected project including all its files, versions and revisions. If any version/revision is locked,
this option is disabled.Synchronize ProjectSynchronizes latest versions of files of selected project
with files saved on your local computer. (On the server, the latest versions of files will be found
and copied to your local disk.)PropertiesOpens the Project Properties dialog where you can edit a
project name, add a description on the project etc. List of FilesOpens a list of all files of the
project. Here, you can sort the files by name, date of creation, owner etc. File Right-Click
507
508
in the Application Window.If your file has an extension that does not associate with any
program, it will open in the Version Viewer dialog. On tab Content of Local File, you can see
the text.Add Version (2.0)Adds another version. Add Revision (1.1) Adds another revision.(If
you checked out a version and saved the changes to new a version or revision, the result would
be the same as if you used these options.)Remove VersionRemoves the selected version and all
its revisions.Exclude VersionExcludes only the selected version, its revisions will remain.Save
Version asSaves the selected version as a standard file (Toad Data Modeler models with
extension .txp or .txl).PropertiesOpens the Version Properties dialog. On tab Notes, you can
define notes on the version/revision.Related TopicsList of Projects, Files, Versions (page 1)
Version Manager Toolbar and Options
In Version Manager, the items are sorted this way:
l
Under projects, files are listed in the alphabetical order too. Under files, their versions and
revisions are displayed.
Versions and revisions of files are sorted in the order they were created. This sorting
allows you to see what version precedes which one, what version has been derived from
which etc. No other sorting is available in Version Manager itself, however you can sort
the items also in the List of Versions and dock the List on Version Manager.
Tip: Searching in the tree of Version Manager: When you need to find a particular project or file
in Version Manager, simply expand the Version Manager item folders and start typing the
project/file name. - This function works for expanded folders (search will not go through folders
that are collapsed).
Learn more about options in the Version Manager and its items.
Command
Check Out
Check In
Lock
Unlock
Save Version
as
These options are active for versions/revisions and also file (if you click a file in Version
Manager, the options will relate to its latest version).
Note: The options are described in the Version Right-Click Options section below.
Description
Lock
Project
Unlock
Project
Unlocks project.
Add File
Remove
Project
Synchronize
Project
Properties
List of Files
Opens a list of all files of the project. Here, you can sort
the files by name, date of creation, owner etc.
509
Description
Lock File
Unlock
File
Last
Version
Check-Out
Last
Version
Check-In
Add
Version
(2.0)
Remove
from
Project
Save
Version as
Properties
List of
Versions
510
Description
Lock
Version
Unlock
Version
Check Out
511
Option
Check In
Description
l
Show
Version
(only to
read)
Add
Version
(2.0)
Add
Revision
(1.1)
Remove
Version
512
513
Option
Description
Exclude
Version
Save
Version as
Properties
Related Topics
List of Projects, Files, Versions (page 513)
List of Projects, Files, Versions
The List displays information on items in Version Manager - projects, files and versions. Here,
you can sort the items by different conditions (by name, version number, date of creation etc.),
however you are not able to edit them.
The List opens together with Version Manager. You can dock it wherever you want. If you close
it, you can find it later in appropriate pop-up menus of items in Version Manager. E.g. Rightclick the server and select List of Projects
Tip: You don't have to close the List of Projects to open List of Files. To see all files of the
selected project, simply click the project in the Version Manager tree and the List of Projects
will change to List of Files automatically. To see all versions/revisions of a file, simply click a
file in Version Manager tree to display the List of Versions.
Click a column to sort the data by:
l
Owner
Locked - locked items will be moved at the beginning or at the end of the list
Description - items with description will be moved at the beginning or at the end
of the list
514
user_name the user name for the connection. This user must have been created on the
remote server, and must have suitable privileges to perform the required actions (SELECT,
INSERT, UPDATE etc.) on the remote table.
port_num (optional) the port number for the remote server. The default is 3306.
table_name the name of the remote table. The name of the local and the remote table
do not have to match.
Examples:
CONNECTION='mysql://username:password@hostname:port/database/tablename'
CONNECTION='mysql://username@hostname/database/tablename'
CONNECTION='mysql://username:password@hostname/database/tablename'
PostgreSQL
HOSTNAME=host_name;PORT=port_no;DATABASE=database_name;USERId=user_
name;PASSWORD=password;
515
Sybase ASE
SERVERNAME=server_name;DATABASE=database_name;USERId=user_
name;PASSWORD=password;
Rename
To rename your model name
Right-click the model name in Model Explorer (or Application View) and select
Rename.
Related Topics
Inplace Editor
Overview (navigator)
Move
516
All these functions are available in the View menu, or via icons on the toolbar. See "View
Menu" (page 50) for more information
Click
How to display related entities, which are far from each other, close to each other?
How to transparently display an entity that has a lot of relationships in your ER diagram?
Workspaces (WS) are similar to submodels. A model can have as many WS as you need. Each
WS can display different (or same) parts (objects) of your large model. Each WS can have a
517
different format or display view. On the Workspaces, you can manage your model objects
quickly, easily and comfortably.
To create a new WS, simply click
on the toolbar.
Designer displays a Workspace (WS). You can open as many Designers (tabs) for the selected
WS as you need. This allows you to display different parts of the same WS and also the same
objects of the WS in a different zoom.
See "Designer and Workspace" (page 39) for more information.
Scenario
Your model has one Workspace WS1. WS 1 represents main model and
is large. You need to work with two parts of the model concurrently.
1. Right-click Workspace1 item in the Application View or Model Explorer and select
Open Designer. -> Another tab of the same name - Workspace1 will open in the
Application Window. It displays the same objects.
Scenario: You're working in the second Designer and need to move fast to find the required
part/objects that you need to edit.
2. Click
on the toolbar.
In the Overview dialog, use drag&drop techniques to move the small frame in the
Overview dialog. -> You will move on the WS1 at the same time. Change size of the
frame at your convenience to zoom in or out the objects on the WS.
3. Find the required objects. (You can close the Overview dialog then.)
4. Now you can comfortably work in two places of the same WS at the same time.
- You can switch between the two Designers (tabs Workspace1).
- You can undock one of the Designers and see them in one screen, or move it to your
second monitor if you have any.
518
How to display related entities, which are far from each other, close to
each other?
Entity shortcut is another graphical representative of an entity. It's not a copy but the same object
with the same properties. You can create as many shortcuts of an entity as you need (and of
course, not only entities...).
See "Shortcuts of Objects" (page 72) for more information.
Scenario
Entity1 and Entity42 are related, however each is on a different page.
You want to see them closer to each other.
Scenario: Create a shortcut of the Entity 1 and place it next to the Entity 42. (You can also
create a shortcut of the Entity 42 and place it to the Entity 1.):
1. Find Entity 1 on the Workspace.
2. Find Entity 42 in Model Explorer.
3. Click the Entity 42 item and drag it to the WS where you want to add the shortcut, next
to the Entity1.
Scenario
Entity Film has five relationships leading from or to it. You want to
create a shortcut of this entity, place it next to it, and move two
relationships to it.
Scenario: Create an entity shortcut on the Workspace.
1. Click the Film entity on the WS and hold the mouse key down.
2. Press CTRL+SHIFT keys and hold them down.
3. Drag the Film entity on the WS.
4. Release the mouse button and then the keys.
Result: There are two shortcuts of the Film entity on the WS - Film : 1 and Film : 2.
Scenario: Create shortcuts of the two relationships of the Film entity.
519
Categories allow you to colorfully distinguish entities that logically go together. Each entity can
be assigned only to one category.
See "Categories" (page 381) for more information.
Scenario
You want to distinguish all entities that contain information on your
customers on the Workspace.
1. Right-click the Categories item in Model Explorer and click Add Category.
2. Double-click the new category.
3. Define properties of the category - its name ( Customer Info ) and select a color
(Money Green).
4. On tab Objects, select entities that you want to assign to the category.
5. Confirm OK.
Result: All the selected entities will have Money Green background color on all
Workspaces of the model.
Scenario: As you have many categories in your model, you want to display a caption of
categories on the Workspace.
6. Click
on the toolbar.
7. Click the work area where you want to place the caption.
520
Scenario: You want to display the entities of the category in Model Explorer (they will be
Money Green in Model Explorer).
8. Right-click the Model Explorer and select Settings.
9. Select the Use Colors of Category to Draw checkbox.
See "Caption of Categories and Shortcuts" (page 83) for more information.
Yes, you may try to print your ER diagram to PDF using "PDF printer". Note: not all PDF
printers are supported.
l
Yes. In the Page Format dialog, select the Fit to Page checkbox.
l
Yes. Disable graphical options. Either select Settings | Options | General, clear the Print
Gradients checkbox (it is disabled by default) or disable the graphical options Gradient Effect,
Graphical Display of Keys etc. in the Workspace Format dialog.
521
Select an entity on the Workspace, press SHIFT, hold it down and use the keyboard
arrows to change size of the entity box.
Click
Before you press CTRL + V to paste the objects, close the Model Explorer pane to
accomplish the operation much faster.
Note: The larger your model is, the more significant difference in speed you
will notice.
Print Models
l
In Settings | Options | General, clear the Print Gradients checkbox for much faster print
performance. (It is disabled by default.)
For large models, Frames - top menu or Frames - left menu options are recommended.
Note: Frameless report layout is not recommended as it uses Java script that goes
through all objects, which takes too much time if your model is large.
522
Scripts
Code written in JScript, VBScript or Internal script. Via scripting and using the scripts, you can
access plenty of objects in Toad Data Modeler, rename objects, merge models, customize
generated SQL code etc.
Scripts are accessible via Script Explorer.
523
Sample script:
function main()
{
var e, Entity;
for (e=0; e<Model.Entities.Count; e++)
{
Entity = Model.Entities.GetObject(e);
Log.Information(Entity.Name); // writes Entity Names to
Log.
}
}
Packages
A group of scripts, customized Form definitions, metamodels etc. Packages are accessible via
Package Explorer. In general, Package Explorer contains packages with scripts for supported
databases, particular model types and other functions such as reverse engineering, report
generation etc.
Script Editor
A place where you can edit a source code of your scripts.
To open Script Editor
Select a script in Script Explorer and double-click it (or right-click and select Edit
Source Code).
or
Open Package Explorer, select a script, right-click it and select Edit
Source Code.
524
525
Scripting Window
A place from where you can execute scripts without the necessity to store the code (similar to
MS Scripting window in Toad Data Modeler 2.x ).
To open Scripting Window
526
Metamodel
Graphical representation of objects (classes, properties, methods...) that belong to the selected
package. In metamodels, you can create new classes, properties, methods, associations,
generalizations... It is very similar to UML Class Diagram.
Other Notes
Script Modifications in Toad Data Modeler 3.x and in Toad Data
Modeler 2.x - Comparison
Generally, in Toad Data Modeler 2.x it was necessary to copy a system template to the user
defined section to be able to make some modifications. The user defined templates had higher
priority than system templates.
System packages and system scripts in Toad Data Modeler 3.x are accessible via the Script and
Package Explorers. They are marked as read-only and are locked by default. If you want to
modify a system script in Toad Data Modeler 3.x, you do not need to copy it anywhere. You
simply create a new script that you can modify at your convenience then. This way you can
extend functionality of the system script, change its behaviour etc.
Toad Data Modeler Priority Rules
1. Scripts and definitions stored in My Package.txg file have the highest priority.
527
2. Scripts and definitions stored in other user defined packages (distributed as add-ons, add-on
packages) have higher priority than scripts and definitions stored in system packages.
3. Scripts and definitions stored in system packages have the lowest priority.
Note: System scripts are contained in system packages that are read-only as well. Nevertheless,
it is possible to unlock them to be able to edit their source code - just change the attribute of
particular file on your disk. In any case, we do NOT recommend to modify source code of
system scripts.
Documentation - Toad Data Modeler Reference
More information about available classes, methods, properties is contained in the Toad Data
Modeler Reference document where you can find all objects defined in the application as well as
all objects defined in metamodels.
This document is available in the Expert Mode | Reference Guide menu (for Expert Mode on).
Related Topics
Expert Mode
MetamodelAbout Metamodel in Toad Data Modeler Toad Data Modeler supports metamodels.
Metamodels are available only in Expert Mode (via Package Explorer).Metamodel is a graphical
representative of objects (classes, properties, methods...) that belong to the selected package, or
references to objects defined in the application. In metamodels, you can create new classes,
properties, methods, associations, generalizations (it is very similar to UML Class Diagram).
Metamodels are available for creation or modifications of:ClassesPropertiesMethods (Functions
and Procedures)You can also model associations and generalizations, add notes and other logical
data to metamodels. Note: In your metamodel, it is recommended to use only ANSI code (A - B
without any special characters and numbers).Example: Oracle package metamodel (page 1)
Package Explorer (page 527)
Script Explorer (page 531)
Script Editor (page 535)
Package Explorer
Package Explorer displays structure of packages in Toad Data Modeler. Package Explorer
allows you to:
l
Manage objects saved in the packages (rename objects, move and copy them, open
metamodel for packages, open object Properties dialog etc.)
528
Particular supported databases (e.g. Oracle, MS SQL Server 2005, MySQL 5.0 etc.)
Physical ER models
Logical models
and other functions, such as e.g. SQL/DDL generation, reverse engineering etc.
You can edit only the packages/scripts that are not read-only.
Root folders contain packages that have various lists of objects, e.g.:
529
Forms Definitions - contain partial definitions with a list of changed visual components
of forms modified by user
External Class Definitions- contain classes and their members designed by user (see the
"Metamodel" topic)
Package Dependencies - show dependencies between the selected package and other
packages
and others.
Description
Load Package
Delete Package
Disallow
Package
Open
Metamodel
Extend with
New Package
Create
Dependent
Package
Properties
530
Command
Save Actual - saves changes to
actually active package
Save All - saves all changes
made in all modified packages
Creates a new user package.
Adds an existing package to the
Package Explorer.
Hides all system packages for
quicker search among packages.
Unlocked
Type of
Packag
e/State
Lo
ade
d
Loa
dedMo
difie
d
Locked
Unl
oade
d
Disall
owed
Lo
ade
d
Unl
oade
d
Disall
owed
System
Add-On
-
My
Packag
e
State
Description
Locked
Err
or
duri
ng
Loa
din
g
531
State
Description
*Note: All system packages are read-only by default.
However, in Expert mode it is possible to change the
lock/unlock property of the package (right-click the
package in Package Explorer | Properties.) Generally, in
Expert mode it is possible to lock/unlock system
packages and add-on packages.
Loaded
Loaded Modified
Unloaded
Disallowed
Error
during
Loading
Script Explorer
In Script Explorer, you can edit existing scripts, write your own scripts and more.
To open Script Explorer
1. Enable Expert mode: select Settings | Options | General | select the Expert
Mode checkbox.
2. Click
Script Explorer doesn't contain all data that you can find in Package Explorer, but only scripts
stored in folders.
Via the Script Explorer, you can:
l
Make petty modifications in user scripts - see option Edit Source Code(in New Window)
View source code of read-only scripts (via the Edit Source Code option as well), and
copy their parts to use them in new scripts
532
Extend functionality of existing scripts and modify them significantly - see option Add
New Script
See "Scripting in Script Editor" (page 537) for more informationome examples.
From the combo-box at the top, you can select a script for:
l
All Models
Metamodel
Logical Model
Example: See the screenshot above - item All Models have been selected. The scripts with
visibility All Models are displayed.
533
CSAO Class Definitions - scripts with class definitions, in majority of cases categorized
to folders by database names
Reverse engineering - contains scripts for loading a model via reverse engineering
Description
Add New
Script
Delete
Folder
Add New
Folder
Properties
General
Tab
Items Tab
Description
Delete
Script
Edit
Source
Code
Edit
Source
Code in
New
Window
User scripts that are not locked: You can edit the
source code of the script directly.
Properties
Script Properties
General
Tab
Description
Name
534
535
Caption
Category
Language
Script
Type
Package
Script
Folder
Visibility
Tab
Others
Tab
Notes Tab
Script Editor
In Script Editor, you can edit and view scripts. Script Editor is accessible from Script Explorer
or Package Explorer.
To open Script Editor
Right-click the selected script and select Edit Source Code or Edit Source Code
in New Window.
536
In the Application Window, a new tab Scripts will display. On this tab, you can manage all
scripts that you open either for edit or view.
Read-only scripts (system scripts and locked scripts) can be only viewed. Nevertheless, their parts
can be copied to new scripts.
Other scripts can be edited in their source code directly in the right window of the Script Editor.
Left Window of Script Editor
Commit
Rollback
Cancels changes.
Tips:
l
537
These are standard functions that can be used while working with scripts in Script Editor.
Convert
Internal Script
Convert
Internal Script
2
Note: If an error occurs and it is an error in script, the script will open in Script Editor and the
particular problematic line in the script will be highlighted. (Expert mode must be enabled.)
Related Topics
Scripting in Script Editor (page 537)
Select a script/folder in Script Explorer | right-click and select Create New Script.
538
Select a script/folder in Script Explorer | right-click and select Edit Source Code(in
New Window).
The particular script is locked and no other user can modify it.
Use Commit to save the changes and Rollback to cancel the changes in Script Editor. As
soon as you press any of these buttons, the script becomes available for other users (will
be unlocked automatically).
Note: After you click Commit, the changes you've made for the script will be
saved within the TDM application, however they will not be saved in particular
package on your disk (My Package). You can either save the package in Package
Explorer, or close the application - the changes will be saved in appropriate
package and on disk automatically.
JScript
Visual Basic
Internal Script -See "Internal Scripting" (page 539) for more information.
in Package
539
Internal Scripting
In Toad Data Modeler, the following scripts are supported:
l
JScript
Visual Basic
Internal Script
Use the internal script for writing more extensive texts where only few commands are contained.
The internal script is similar to markup languages such as XML, HTML etc.
Every sign that is not a text must be marked by this sign - "#".
Key Words
l
import
require
if
else
endif
script - Script function is generated. It allows users to define script type (e.g. JScript or
VBScript) where the content between script and endscript commands is written.
endscript
endproc -
"script" Command
Use this command to insert to the internal script another part of a scripting language.
#script language={Scripting language}
{Code of Scripting Language}
#endscript
Example:
#script language="Jscript"
function something() {
Log.Infomation(My Message);
}
#endscript
Example:
#proc
Greetings()
Hello
Buy
#endproc
540
541
"Call" Command
Use this command to call procedures defined by command "proc".
Example:
#call Greetings()
"forall" Command
Use this command if you want to execute iteration over a list. The result of the iteration should
be a text.
Command syntax is the following:
#forall LIST_NAME (PARAM1, PARAM2, PARAM3, PARAM4, PARAM5 );
Example:
#forall Model.tables('Create Table'+IterateItem.Name+'(','',GenerateColumns(),',',')' );
"@" Command
It is similar to "<% %>", however the difference is that after the @ sign, only one
expression follows.
Scripting Window
Scripting Window allows you to run simple scripts only. In the Scripting Window, you cannot
save scripts as they do not relate to any package.
To open Scripting Window
1. Enable Expert mode: select Settings | Options | General | select the Expert
Mode checkbox.
542
Command
Show windows
automatically
Show/hide Log
Show/hide Code
Explorer
Execute script
Stop script
Script type
selection box
Load script from
file
Save script to a
543
Icon
Command
file
Save script as
Minimize all
undocked forms
To display the Available Objects and the Selected Objects windows in Scripting Window
Reorder attributes/columns
Option 1:
Attributes.InitSort();
//set ordinal values as you need
var temp = Attr1.Ordinal;
Attr1.Ordinal = Attr2.Ordinal;
Attr2.Ordinal = temp;
Attributes.Sort(); //it will get ordered according to the ordinal
values set for individual items
Option 2:
Attributes.Move(2,0) //The first parameter is the Current
index in the list and the second is the index where an item
should move.
544
OR
//Create Relation without Shortcut
Model.AddLinkObject(2004, ParentEnt, ChildEnt);
545
546
547
Object type of PEREntity is 2002. More information can be found in the Reference document.
Click Help | Reference to open the Reference.
548
{
var prefix = "abc"; // defined prefix
var regular_expression_prefix = new RegExp(prefix+"_");
var app = System.GetInterface('Application');
var Model = app.Models.GetObject(0);
// Entities
for (e=0; e<Model.Entities.Count; e++)
{
Entity = Model.Entities.GetObject(e);
if (Entity.Name.search(regular_expression_prefix) == -1) // if prefix is
not used in name
{
Entity.Lock();
Entity.Name = prefix+"_"+Entity.Name;
Entity.UnLock();
Log.Information("Name of entity "+Entity.Name+" was changed.");
}
// Indexes
for (i=0; i<Entity.Indexes.Count; i++)
{
Index = Entity.Indexes.GetObject(i);
if (Index.Name.search(regular_expression_prefix) == -1) //if prefix is
not used in name
{
Index.Lock();
Index.Name = prefix+"_"+Index.Name;
Index.UnLock();
Log.Information("Name of index "+Index.Name+" in entity
"+Index.Owner.Name+" was changed.");
}
549
// Triggers
for (t=0; t<Entity.Triggers.Count; t++)
{
Trigger = Entity.Triggers.GetObject(t);
if (Trigger.Name.search(regular_expression_prefix) == -1) //if prefix
is not used in name
{
Trigger.Lock();
Trigger.Name = prefix+"_"+Trigger.Name;
Trigger.UnLock();
Log.Information("Name of trigger "+Trigger.Name+" in entity
"+Index.Owner.Name+" was changed.");
}
}
}
}
550
551
Customization - Sample
Expert Mode
Before you start customizing the application, you need to enable the Expert Mode option in
Toad Data Modeler.
After the Expert Mode is turned on, particular functions and options, hidden so far in Toad Data
Modeler, will become available.
1. Select the Settings menu | Options | General | Expert Mode.
552
553
Plus options for defining, loading and storing Object Types and Properties (OTPs)
in various forms and dialogs. More details on OTPs can be found in the Help file,
"OTPs" topic.
4. In this scenario, after you select the Expert Mode checkbox, take notice of the new
Expert Mode item in the Options dialog (above General). Here, you can see this option Save the definitions to the 'My Package'. Clear this checkbox.
Notes:
l
If you wanted to save all changes you made in the application (e.g.
while customizing a form) to My Package, you would leave this
checkbox selected.
If you wanted to save the changes you made to another package (e.g. new
add-on package that you created), you would clear this checkbox. - This is
what we will do in our Customization Sample. Follow the next topics.
Related Topics
Our Goal (page 554)
554
Our Goal
The following tutorial guides you through some of the customization options available in Toad
Data Modeler.
Read the goal definition below and go step by step to accomplish it (see the topics one by one
in this section).
During your work, you will use various tools (e.g. Package or Script Explorer etc.) and
features (e.g. form editing or setting default values etc.). To follow the point of the example
fluently and clearly without digressions, details on these features (their functionality and
options) are not described. For more information on them, please see the appropriate
topics/chapters in the Help file.
Our Goal Definition:
l
To be able to write Customer Notes to entity, but don't mix them with Comments or
Notes in Toad Data Modeler. Customer notes and developer notes must be differentiated.
Write a list of Confirmed and Not Confirmed entities to Message Explorer (Log). Just to
get a quick overview.
Generate modified HTML reports with both the entity status and notes from customer.
All for Oracle 10g only. Other models for other databases must remain untouched.
Think about how you could achieve this task in another application (Toad Data Modeler or any
other modeling tool), and then read the rest of this section to find out how easily you can
achieve this in Toad Data Modeler.
555
Before you start, see the following two screenshots for an inspiration:
1. There is no Customer Feedback tab in any standard Entity Properties form. This tab has
been added to the form by end-user - by YOU!
2. In generated HTML reports, there is no section Customer Feedback. As you can see
below, users may use the values defined on modified forms, and generate modified HTML
reports. The section Customer Feedback has been added to the reports by end-user - by
YOU! (And generated automatically, of course.)
556
Related Topics
Create Package (page 556)
Create Package
Why Do We Need a New Package?
Packages are containers for groups of scripts, customized Form definitions, metamodels etc. In
Toad Data Modeler, the following three types of packages may exist.
l
System packages - have the lowest priority (distributed with Toad Data Modeler
application).
Add-on packages - have higher priority than system packages (can be downloaded from
web site, shared among users etc. No add-on package exists after installation.).
My Package - has the highest priority (created automatically upon installation of Toad
Data Modeler).
All the packages exist as separate XML files with extension .TXG.
You can make your modification without the necessity to create a new package, but all scripts
and modifications you will ever make will be stored in the My Package.txg file. If you plan to
share your modifications with others, it's a good idea to create a new package for this purpose. In
this example, we will create a new package CustomerFeedback, and store all scripts used in this
tutorial, metamodel and form modifications into this package. It will give us the possibility to
share the CustomerFeedback.txg file with others.
557
558
Select packages on which the new package depends. In this example, the Customer Feedback
will not be dependent package. It will just extend existing packages.
Note: Example of dependent package: Package RE MS SQL Server 2005 depends on RE MS
SQL Server package and extends MS SQL Server 2005 package. (RE is abbreviation for
Reverse Engineering.)
Select packages you want to extend. In our example, we will be extending Database Oracle 10g
package and HTML Reports for Oracle 10g.
You can write description to the Description tab.
Newly created package will appear in the Package Explorer. You can also see package
extensions there. Custom packages have blue icon.
559
Just to compare, see My Package (where all modifications are stored if you don't use add-on
packages) - it has a green icon and is listed at the top.
Well, a new package exists, let's continue adding new properties.
Related Topics
Add New Properties in Metamodel (page 559)
Add New Properties in Metamodel
Properties and methods can be added visually, via Metamodel.
For our purpose, we will need two new properties.
l
ConfirmedByCustomer (boolean)
NotesFromCustomer (string)
This is where our values will be stored. The properties will be assigned to items that will appear
in Entity Properties form. The ConfirmedByCustomer property value will be assigned to a
checkbox, and the NotesFromCustomer value will be assigned to a text box.
How To Add New Properties
Right-click the CustomerFeedback package and select Open Metamodel.
560
Select class you want to extend. For our purpose, we need to extend PEREntityOR10 class.
PER - Physical Entity Relationship model.
Entity - Items must be accessible in the Entity Properties form.
OR10 - Modification will be made for Oracle 10g only.
Select the newly added class and right-click it. Select Edit.
561
562
Properties have been added to the metamodel. Now it's necessary to save the metamodel and
restart the application. Then we can continue modifying Entity Properties form.
Note: Metamodels are XML documents stored as .TXM files.
Related Topics
Modify Form (page 562)
Modify Form
Back to our Oracle 10 physical model.
Edit an entity to open standard Entity Properties form.
Right-click the form and select Customize Form as...
The following forms and palettes will appear. Note that the Entity Properties form has
dotted grid now.
In the Form Explorer, see that the form name is FmPEREntityEdit. We will need this
information later.
To add a new tab to the Entity form, right-click any tab in the form and select New Page.
563
564
Close the Entity Properties form by clicking the red X button at top of the form. Component
Inspector, Component palette, Form Explorer will disappear.
Then right-click the form and select Save Form to CustomerFeedback.
565
Related Topics
Set Default Values (page 565)
Set Default Values
How to Define Default Values
If you need to change the default value for new items, do the following:
Right-click the form (Entity Properties form in our example) and select Default Values
for Class.
We want the Confirmed by customer checkbox to be selected by default for new entities.
Select property name and click the Default Value column. Then press F2 to edit the value.
Select where the definition will be stored. In our example, we need to store it into the
CustomerFeedback package.
Click the dialog to confirm your selection in combo box and then confirm OK.
Done.
Related Topics
Add Events (page 566)
Add Events
The following events are available in Toad Data Modeler scripting:
l
OnCreate
OnCheck
OnChange
OnClick
OnClickSilent
OnClose
566
567
Let's add OnCheck event to the checkbox on the Customer Feedback tab of the Entity
Properties dialog. When the checkbox is selected, the text box with Notes from Customer will
be visible. When the checkbox is clear, the text box will disappear.
In Package Explorer, select the Script folder under the CustomerFeedback package. Right-click it
and select AddScript.
Set the script name to FmPEREntityEdit. - This is the name of the form we want to write the
script for. See the "Modifying a Form" topic to find out where the form name is defined.
Close the window, right-click the script again and select Edit Source Code.
Add there the event function.
568
569
Code:
function DataCheckBox1OnCheck()
{
if(DataCheckBox1.Checked == true)
DataMemo1.Visible = true;
else
DataMemo1.Visible = false;
}
DataCheckBox1 - name of item that has been added to the Entity form.
Both are names of items that were added to the Entity form. See "Modify Form" (page
562) for more information.
570
571
Related Topics
Access Property Values via Scripting Window (page 571)
Access Property Values via Scripting Window
You can write scripts inToad Data Modeler , save the scripts to packages, distribute the packages
etc. - This will be explained later. Now you will see how to work with Scripting Window that
allows you to run scripts at once, without the necessity to have them stored in packages.
Click Expert Mode | Scripting Window to open it. (Of course, Expert Mode has to be
turned on.)
The following dialog appears. If you don't see the upper part of the Scripting Window, select
View | Show Registered Objects.
On the left, you can see available models. Use the arrows to select model you want to work
with. In our example, we will execute script for Videorental model (for Oracle 10g).
In the Name in Script column, you can define name that will be used in the script. Our
OrigModel value will represent the selected Videorental model.
572
Code:
function main(){
var i, e;
var Ent;
var EntListConfirmed = new Array();
var EntListNotConfirmed = new Array();
Ent = OrigModel.Entities.GetObject(i);
if(Ent.ConfirmedByCustomer == true)
EntListConfirmed[EntListConfirmed.length] = Ent.Name; // add to list of
confirmed entities
573
else
EntListNotConfirmed[EntListNotConfirmed.length] = Ent.Name; // add to list
of not confirmed entities
}
574
Entities - we work with Physical Entity Relationship model, therefore we need to search
for PER object. Model is for Oracle 10g, let's find the PERModelOR10 object in the
Reference.
Count - represents a feature that is available for all List objects. On the screenshot above,
you can see that the Entities datatype is a List. Let's click the List link and see details of
the List class.
575
OrigModel.Entities.GetObject(i)
l
Ent.ConfirmedByCustomer
l
Ent - is a variable that holds assigned Entity objects (assigned earlier using the
OrigModel.Entities.GetObject(i)function).
Ent.Name
l
Ent - is a variable that holds assigned Entity objects (assigned earlier using the
OrigModel.Entities.GetObject(i)function).
Name - property of PEREntityOR10 object. We still work with PER model and now we
need to find property of Entity in Oracle 10g model. Let's see properties of the
PEREntityOR10 object.
576
Related Topics
Create Script (page 577)
577
Create Script
You know how to execute scripts from the Scripting Window. If you want to store the script and
call it from another form in the application, for example, do the following:
Create a new script WriteFeedbackToLog. See the "Adding Events" topic to find out how to
create new scripts.
578
Code
function WriteFeedback ()
{
var Log = System.CreateObject('Log');
var Application = System.GetInterface('Application');
var OrigModel;
OrigModel = Application.Models.GetObjectByID(Model.ID);
....
....
}
Explanation
The WriteFeedback function is almost identical to the Main function we were executing from the
Scripting Window.
The only difference is in the definition of OrigModel object. In the Scripting Window, we could
select Videorental and define the OrigName name.
However, now we have no means to select the object visually (and we do not need it, the
function will be executed for active model). Therefore we need to define the OrigModel object
via Application.Models.GetObjectByID method, with parameter Model.ID.
This way we can get the currently active model.
We also need to register object Log. (It is not necessary to register Log in the Scripting Window.
Log is registered in the Scripting Window automatically.)
The rest of the script is identical.
579
Related Topics
Call Existing Script from Model Properties Form (page 579)
Call Existing Script from Model Properties Form
Edit the Model Properties form. See the "Modify Form" topic to find out how to edit
existing form.
Add there a new button and remember the name of the form - FmPERModelEdit. The name can
be found in the Form Explorer.
Defined caption for the button - Write Customer Feedback To Log.
Set the name of the button to FeedbackButton.
Create a new script with the name of the Model Properties form - FmPERModelEdit.
Write event function to the script.
Code
function FeedbackButtonOnClick()
{
WriteFeedbackToLog.WriteFeedback()
}
Explanation
l
OnClick = event.
When you click the button, an output will be displayed in Message Explorer (Log).
Related Topics
Modify HTML Reports (page 579)
Modify HTML Reports
To modify HTML reports, we need to extend existing method. The first thing we need to do is to
find out what script should be extended.
580
581
582
Return back to the General tab. Click Reload. Script name and method name will appear there.
Add a prefix My to it (this will be changed in future, no manual modification will be required).
583
Code:
function ReportTableUserProperties(Document, Entity)
{
// Table definition
Table = Document.CreateTable(false,true);
Table.CreateColumn(20);
Table.CreateColumn(80);
var row = -1;
if (Entity.ConfirmedByCustomer == true)
{
Table.CreateCell(
++row,0,'Confirmed' );
Table.CreateCell(
row,1,'Yes' );
}
else if (Entity.ConfirmedByCustomer == false)
{
Table.CreateCell(
++row,0,'Confirmed' );
Table.CreateCell(
row,1,'No' );
}
584
585
else
{
Table.CreateCell(
++row,0,'Confirmed' );
Table.CreateCell(
row,1,'Undefined' );
}
if (Entity.NotesFromCustomer.length > 0)
{
Table.CreateCell(
row,1, Entity.NotesFromCustomer );
}
Instance.ReportTableUserProperties(Document, Entity);
};
Explanation
Table.CreateColumn(20) - the CreateColumn function belongs to the
HTMLReportTable class. All functions related to the Table object can be found in the
Toad Data Modeler Reference.
Entity.ConfirmedByCustomer - represents the variable we added earlier to the
CustomerFeedback metamodel.
Entity.NotesFromCustomer.length - standard JavaScript function that returns number of
586
Instance - using the Instance keyword, we can call existing function we extended. We
could copy and paste the content of the ReportTableUserProperties function defined in
the BasicHTMLPERReportOR script. However, if a change was made to the script later,
we would have to update our script too, which would be difficult to maintain. That's why
it's better to write code that will extend the existing functionality only, and call the rest
from existing script via the Instance keyword.
When you generate HTML reports now, you will see the following output. New section
Customer Feedback is generated on top, followed by the Table Properties part, as originally
defined in the ReportTableUserProperties function in script BasicHTMLPERReportOR.
587
Customize
Form
Customize
Form as
588
Component Inspector - list of properties of selected component in the form. Here, you can
edit properties
Forms of these three tools can be docked in Toad Data Modeler environment at your
convenience.
If you want to hide/show any of these tools permanently, you can clear/select
appropriate option in:
l
Close the form that you have just edited (click x in the right-hand corner, e.g. in the
Entity Properties form).
After you close the edited form, you need to save the changes to package.
Note: You will not finish editing the form by closing any of the tool forms (Inspector, Explorer
or Palette Component). If you close any of them, the Show option for the tool (Show Inspector,
Show Explorer...) will be automatically cleared. If you edit a form next time, the form of this tool
will not display. To display it again, you need to enable the Show option either in the Designer
Mode Options or in the Settings menu | Options | Editable Forms.
589
Description
Customize
Form
Customize
Form as
Load Form
Reloads a form.
Save Form
Save Form to
Designer Mode
Options
Here, you can hide/show the tools for next form edit.
Default Values
of Object
590
Note: To see how this function works, please read User Guide, "Customization Sample" chapter.
Related Topics
Component Inspector (page 590)
Component Palette (page 591)
Form Explorer (page 592)
Component Inspector
Component Inspector is a list of properties of the selected component in the form. Here, you can
edit properties.
591
Option
Description
Top
combo-box
Left
Column
Right
Column
Note: If you select components directly in the form you edit, you can
select more components using the SHIFT key. Then, only common
properties will be displayed in Component Inspector.
Right-click the Component Inspector form and select Properties.
Here you can edit colors of particular parts of the dialog, and select other options.
Component Palette
Component Palette is a list of components that you can add to a form. It is divided
into two parts:
l
Data - here you can find components that can follow up with already existing properties
Standard - other components that can be used for change of appearance or better
classification of components
592
Right-click the Component Palette form and select Properties | Small Buttons.
Form Explorer
Form Explorer displays tree structure of components in a form.
In Form Explorer, you can move components, select them for edit in Component Inspector (via
mouse), and delete them (Delete key).
593
Macros
Macros
Toad Data Modeler supports macros. You can use sample macros available in the Macros menu
or create your own macros. You can create a macro in Package Explorer or Script Explorer and
modify its properties to display the macro either in the main menu or pop-up menu (of particular
object or on the Workspace etc.). Visual components for creation of macros are also available
(User Forms).
To see or use the available sample macros
Sample macros:
594
The selected macro will be applied on all objects on all Workspaces of the model or all objects
of the active Workspace.
Sample macros:
l
The selected macro will be applied only on the selected objects on the currently active
Workspace.
Scenario
You want to create a macro Add Attribute to PK and add this macro to
pop-up menu of attributes in Model Explorer.
595
596
4. Define properties of the new macro. Remember to define its caption (macro name
that will be displayed), visibility on tab Visibility (if for all databases etc.).
597
5. On tab Others, you can define Undo options. It is recommended to keep the
default settings.
6. On tab Menu, you can define where you want to display the macro - in Main menu, popup menu or both.
598
7. On tab Object Types, select object types for which the macro will be available in their
pop-up menu.
599
600
8. Double-click the new macro to open the Script Editor. Modify the default code
at your convenience.
Related Topics
Script Explorer (page 531)
Script Editor (page 535)
601
You can create and use user forms to interact with Toad Data Modeler during script and
macro execution. You can enter input parameters or see some output information.
Function Main only creates and displays the user form. Other functionalities must be
implemented/added via form events or its controls. So, a form is not a dialog.
Create a Form
To create a form, use the object System that is registered in every script.
The method you need is called CreateForm and has four optional parameters:
Example:
var form = System.CreateForm(FormName, Form Caption, 200, 150);
1. First Parameter Name of form (it mustnt contain spaces and other invalid/not permitted
characters).
2. Second Parameter Caption that will be displayed in the heading of the form.
3. Third Parameter Width of the form.
4. Fourth Parameter Height of the form.
Functions of Form
AddControl(ControlName: widestring, ControlType: Integer): IDispatch;
l
- Edit Box
602
-2
- Check Box
-3
- Memo
-4
- Panel
-5
- Label
-6
- Group Box
-7
- Radio Button
-8
- Combo Box
-9
- List Box
- 10
- Button
This procedure adds a variable on the form. The variable is then accessible in events via calling
the Instance.VariableName. The variable is accessible across events. If you change a content of
the variable in one event, the changed status will be accessible in another event.
RegisterObject(AName: widestring, AObject: IDispatch)
l
603
ExecuteMethodName Name of method that should be executed when you press the
Execute button.
ExecuteScriptName Name of script for calling out the method when you click the
Execute button.
Note: If you dont want to use the button Execute, do not set up the properties
ExecuteMethodName and ExecuteScriptName. The button will not be visible on the form then.
EVENTS
To assign events, assign the component of particular event to properties of names
NameEventScriptName, NameEventMethodName with reference to particular service method.
Example:
Button.OnClickScriptName = MyScript;
Button.OnClickMethodName = DoOnClick;
CONTROL
Control is an ancestor from which all controls, including the form, inherit.
Properties of Control
Align Alignment of control. Possible values to use:
0 - No alignment
1 - Alignment - Top
2 - Alignment - Bottom
3 - Alignment - Left
4 - Alignment - Right
5 - Alignment Justify
AnchorTop, AnchorBottom, AnchorLeft, AnchorRight Determines the position of control.
Default place top left-hand corner.
Parent Control on which a control is placed. Default position of all controls is on the form and
this property is not set up.
Note: Description of value Align 0..5:
alNone - The control remains where it was placed. This is the default value.
604
alTop - The control moves to the top of its parent and resizes to fill the width of its parent. The
height of the control is not affected.
alBottom - The control moves to the bottom of its parent and resizes to fill the width of its
parent. The height of the control is not affected.
alLeft - The control moves to the left side of its parent and resizes to fill the height of its parent.
The width of the control is not affected.
alRight - The control moves to the right side of its parent and resizes to fill the height of its
parent. The width of the control is not affected.
alClient - The control resizes to fill the client area of its parent. If another control already
occupies part of the client area, the control resizes to fit within the remaining client area.
BUTTON
Event
OnClick Occurs when you click the button.
CHECKBOX
Event
OnClick Occurs when the check in checkbox is changed.
COMBO-BOX
Event
OnSelect - Occurs when combo box is selected.
EDIT
Event
OnChangeText Occurs when text in edit box is changed.
MEMO
Event
OnChangeText Occurs when text in memo is changed.
605
RADIO BUTTON
Event
OnClick Occurs when the button is selected.
For more properties, please read the Reference Guide (Help menu | Reference, Expert mode must
be selected). See objects: UserButton, IUserCheckBox, IUserComboBox, UserControl, UserEdit,
UserFormBasic, UserForm, UserGroupBox, IUserLabel, UserListBox, UserMemo, IUserPanel,
UserRadioButton, UserStrings.
Related Topics
MacrosMacrosToad Data Modeler supports macros. You can use sample macros available in the
Macros menu or create your own macros. You can create a macro in Package Explorer or Script
Explorer and modify its properties to display the macro either in the main menu or pop-up menu
(of particular object or on the Workspace etc.). Visual components for creation of macros are also
available (User Forms).To see or use the available sample macrosSelect Macros | All.Sample
macros:Convert Names to Lower CaseConvert Names to Upper CaseInfer Relationship - Macro
for automatic creation of relationships between identically named columns.Alphabetic
Autolayout - See "Autolayout" (page 1) for more information.The selected macro will be applied
on all objects on all Workspaces of the model or all objects of the active Workspace.Select
Macros | Selected Objects. Sample macros:Remove Spaces from NamesDisplay Entities Note on
WorkspaceInfer Relationships on Selected EntitiesThe selected macro will be applied only on
the selected objects on the currently active Workspace.Select Macros | Productivity to access
macros from Productivity PackSelect Macros | Rename to access macros from Rename Objects
PackScenarioYou want to create a macro Add Attribute to PK and add this macro to pop-up
menu of attributes in Model Explorer.To create your own macroOpen Script Explorer (Tools
menu, Expert mode must be enabled).Right-click the Macros item and select Add New
Macro.Right-click the newly created macro and select Properties.Define properties of the new
macro. Remember to define its caption (macro name that will be displayed), visibility on tab
Visibility (if for all databases etc.).On tab Others, you can define Undo options. It is
recommended to keep the default settings.On tab Menu, you can define where you want to
display the macro - in Main menu, pop-up menu or both.Select Add to Popup Menuand write the
path name.On tab Object Types, select object types for which the macro will be available in
their pop-up menu. Select Attribute and confirm OK.Double-click the new macro to open the
Script Editor. Modify the default code at your convenience.Confirm Commit and Save.The
Macros will be available accordingly.Related TopicsScript Explorer (page 1)Script Editor (page
1) (page 1)
Macro and User Forms - Use Case (page 605)
Macro and User Forms - Use Case
Scenario
You want to create a macro that will add a particular prefix to all
attributes in your model.
Solution: You will create a macro Add Prefix. The macro will be
available via right-click menu on the Workspace. You want to create a
user form where you will define the prefix and decide if you want to
apply the change in Caption of attributes too.
1. Open Script Explorer.
2. Right-click the Macros item and select Add New Macro.
3. Right-click the new item and select Properties.
4. On tab General, define properties of the macro.
Important! Name of macro mustnt contain spaces and other forbidden
characters. The name must start with a character (not number). Then you can
use characters, numbers or possibly '_'. The rules dont refer to caption.
Caption can be any title you want.
606
607
5. On tab Visibility, select where you want to apply the macro Physical Model.
6. On tab Menu, define whether you want to display the macro in:
l
Macro menu,
pop-up menu,
both places.
Parameter Path specifies position in main menu (or pop-up menu). Example:
'Test\My Items'.
In this example, you decide to display it only in pop-up menu.
Path box is empty as 'Macros' item is set as default.
7. On tab Object Types, select in which object pop-up menu you want to display it. Select
Workspace.
Confirm OK.
608
8. Double-click the macro in Script Explorer to open Script Editor. Modify the default code.
609
Productivity Pack
Productivity pack contains three macros.
l
Add Entities
Add Entities
Click Macros | Productivity | Add Entities to run the macro.
610
611
612
613
Note that if you enable Add to Key checkbox, the Not Null checkbox disappears.
In case you selected some entity, the attribute will be added to the selected entity. Otherwise the
following dialog opens.
Click Yes to add attribute to all entities.
Result:
614
Notes:
l
If you run the macro on entities with identically named attributes, the attribute will not
be added to the entity more than once.
615
If you specify Varchar(%p1 %p2) as the data type, you need to know whether the second
parameter is BYTEor CHAR. There is no verification for parameter values.
Result:
Notes:
l
Attribute will be added only to the entities which don't have an identically
named attribute.
616
Sources
You can find them in Package Explorer in section Productivity Pack | Macros.
Right click any macro and choose Edit Source Code to see JavaScript code.
Rename Relationships
617
618
When you execute the macro, key name and caption changes.
Notes:
l
If you select entity, the macro will modify primary key name and caption of the selected
entity only.
If you need to change the prefix or if you wish to use suffix, create a new macro and
modify its JavaScript code accordingly.
619
Rename Relationships
This macro renames relationship captions and names and modifies them to:
New caption: <parenttablecaption> - <childtablecaption>
New name: <parenttablename>_<childtablename>
By default, relationships are named as Relationship1, Relationship2 etc. When you execute the
macro, the following result is achieved:
Notes:
l
If you select relationship, the macro will modify only the selected relationship, otherwise
you will be asked if you wish to run the macro on all relationships.
If multiple relationships exist between two entities, a random number will be added at the
end of the relationship name.
620
After you execute the macro, check constraints will be renamed to CHK_<tablename>_<index>
and CHK_<columnname>_<index>.
Notes:
l
If you select an entity, the macro will modify check constraint names and captions of the
entity and its attributes.
If you need to change the prefix or if you wish to use suffix, create a new macro and
modify its JavaScript code accordingly.
Result:
621
Notes:
l
If you select a View relationship, the macro will modify only the selected View
relationship, otherwise you will be asked if you wish to run the macro on all View
relationships.
If multiple View relationships exist between two objects, a random number will be added
at the end of the View relationship name.
Metamodel
About Metamodel in Toad Data Modeler
Toad Data Modeler supports metamodels. Metamodels are available only in Expert Mode (via
Package Explorer).
Metamodel is a graphical representative of objects (classes, properties, methods...) that belong to
the selected package, or references to objects defined in the application.
In metamodels, you can create new classes, properties, methods, associations, generalizations (it
is very similar to UML Class Diagram).
Metamodels are available for creation or modifications of:
l
Classes
Properties
You can also model associations and generalizations, add notes and other logical data to
metamodels.
Note: In your metamodel, it is recommended to use only ANSI code (A - B without any special
characters and numbers).
Example: Oracle package metamodel
Open Metamodels
1. Open
2. Select a package.
3. Right-click the package and select Open Metamodel.
622
Classes
Add Existing Classes to Metamodel
1. Right-click the work area and select Add Class.
2. In the Class Selection dialog, select a class and define settings on tab Settings.
623
624
Result: The selected class will be added to your metamodel and you will be able to modify it.
Create Classes
Click Class
or
Select Model | Classes and click Add in the Classes dialog.
To add multiple classes on the Workspace
1. Press SHIFT and click the Class icon. A blue frame displays in the icon.
2. Click the work area as many times as many classes you want to add.
3. Right-click the work area (or click the Class icon again) to turn this function off.
To see all classes of your model
Select Model | Model Items |Classes. In the Classes dialog, you can add, edit classes,
edit their names (F2) and delete them.
Edit Classes
625
or
Edit the class in the Classes dialog (Model menu | Model Items | Classes | Edit).
General Tab
Description
Name
consists
of
Example:
PERSequenceOR
PER = Physical Entity Relationship model
Sequence = Sequence
OR = Oracle (all Oracle databases. OR10 stands for
Oracle 10g, OR9 is for Oracle 9i etc.)
Object Type
External
626
Default Name
Category
Properties
Tab
Methods Tab
Inherited
Properties
Tab
Inherited
Methods Tab
Description
Tab
Notes Tab
To Do Tab
Properties
Create Properties
1. In the Class Properties form, click the Properties tab.
2. Click Add.
3. Confirm Apply.
4. Edit the new item and define properties of the new property.
Edit Properties
Double-click a property or press Edit in the Class Properties dialog | Properties tab.
General Tab
Description
Name
Name of property
Data Type
Default value
External
Implementation
Area
Description
Get Script
Method and Set
Script Method
Package
Overridable
Dynamic
Read Only
Write Only
Attributes Tab
627
Methods
Create Methods
Edit Methods
Double-click a method or press Edit in the Class Properties dialog | Methods tab.
General Tab
Description
Name
Name of method
Result Data
Type
External
Implementation
Area
Description
Method
Package
Parameters
Tab
628
629
Generalizations
Generalization
Generalization is a link that defines a relation between two classes. Using generalizations, you
can model inheritance.
Child class has all properties and methods of parent class, plus it may add new behaviors. If you
create a new class (class name doesn't exist), then it will be necessary to define an inheritance to
more general classes from the core or its successors.
To create Generalization
1. Click
on the toolbar.
630
Edit Generalizations
Associations
Associations / Aggregations
Associations and aggregations represent a relationship between two classes. If one class owns
another class, then it's an aggregation. (Attribute has a Domain, Entity is owned by Model and
Model has a list or collection of Entities etc.)
To create Associations / Aggregations
1. Click
on the toolbar.
Edit Associations
General Tab
Description
Name
Advanced Tab
Description
Role
Aggregation
Many
External
Attributes1,
Attributes2
Tab
Script Samples
Creating New Objects
In this topic you can find information about how to create new objects via scripting.
Creating a new Entity
function main()
{
var app = System.GetInterface('Application');
var Model = app.Models.GetObject(0);
Model.Lock();
var Entity = Model.CreateNewObject(2002 ); // 2002 is object
type of PEREntity
Entity.Name = 'Customer';
Model.UnLock();
631
632
Model.RefreshModel();
}
More information about the Entity object can be found in the Reference. See PEREntity class or
PEREntityOR (for Oracle) class etc.
633
634
iterEntity.UnLock();
}
Model.UnLock();
Model.RefreshModel();
}
function main(){
var App = System.GetInterface("Application");
var Log = System.CreateObject("Log");
var Model = App.Models.GetObject(0);
Log.Information(App.ApplicationConfig.PackagePath);
}
If you need to find out the path to the folder where your model is stored, use the property
FilePath of the Model object (PERModel class):
function main(){
var App = System.GetInterface("Application");
var Log = System.CreateObject("Log");
var Model = App.Models.GetObject(0);
Log.Information(Model.FilePath);
}
635
Dialogs
Samples for Message Dialogs:
ShowMessageDialog
System.ShowMessageDialog(1004,'WarningDialog','Please select
shapes on your Workspace before running the macro.',2,4);
636
5 - yes/ok
6 - no/ok
7 - yes/no/ok
8 - cancel
9 - yes/cancel
10 - no/cancel
11 - yes/no/cancel.
ShowMessageDialogScript
This way you can create dialog with hyperlinks at the bottom.
if(System.ShowMessageDialogScript(DlgParams) != 6)
{
return;
637
function CreateFolder(folder)
{
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CreateFolder (folder);
}
638
639
Automation
How to call Toad Data Modeler from other applications
Toad Data Modelercan be called from other applications, for example by running
JavaScript code.
Benefits
l
Possibility to generate SQL, documentation or alter reports silently in scheduled time etc.
Samples
In this section you can find samples for better understanding how Automation can be used.
Generate SQLcode
This example show how to generate SQLcode.
Generate.js
//*****************************************************
function Generate(Model, Output)
{
640
}
//*****************************************************
var App;
App = new ActiveXObject("TDM.App");
var Model = App.OpenModelFromFile("C:\\Models\\Videorental.txp");
HTMLReport(Model, App.System, 'C:\\Reports\\' );
Convertor.Model2ToAlter = true;
Convertor.Converting = true; // Do not modify.
Convertor.Altering = false; // Do not modify.
Convertor.Model1Model = Model1;
Convertor.Model2Model = Model2;
Convertor.CreateDefaultAlterScriptSetting();
Convertor.InitSelectedOTPs();
Convertor.InitAvailableOTPs();
Convertor.SelectPhysicalPropertiesOnlyInSelectedOTPs();
Convertor.AlterFileName = Output;
var Stream = App.System.CreateObject('TextStream');
Convertor.SynchronizeModels();
Convertor.LoadAllDifferences();
641
Convertor.SelectAllModel1ToModel2(true, false);
Convertor.RunAlter();
Stream.Text = Convertor.AlterScript;
Stream.FileName = Convertor.AlterFileName;
Stream.SaveToFile();
Convertor.Delete();
Model1.Delete();
Model2.Delete();
}
//*****************************************************
var App;
App = new ActiveXObject("TDM.App");
AlterFiles(App,
"C:\\Models\\Videorental1.txp",
"C:\\Models\\Videorental2.txp",
"C:\\Alter.sql" );
Convertor.Model2ToAlter = false;
642
Convertor.Converting = true;
Convertor.Altering = false;
Convertor.Model1Model = Model1;
Convertor.Model2Model = Model2;
Convertor.CreateDefaultAlterScriptSetting();
Convertor.InitSelectedOTPs();
Convertor.InitAvailableOTPs();
Convertor.SynchronizeModels();
Convertor.LoadAllDifferences();
Convertor.SelectAllModel1ToModel2(true, false);
Convertor.Delete();
Model1.Delete();
Model2.Delete();
}
//*****************************************************
var App;
643
Convert to PostgreSQL
How to convert model to PostgreSQL model.
ConvertToPg.js
//*****************************************************
function Convert(Model, App)
{
var Convertor = Model.CreateNewObjectInternal(25000);
Convertor.Model2ToAlter = false;
Convertor.Model2ToConvert = true;
Convertor.Model2ModelTemp = true;
Convertor.Converting = true;
Convertor.Altering = false;
Convertor.Model1Model = Model;
var PM = App.System.GetInterface('PackageManager');
var DestinationMDef = PM.ModelDefs.GetObjectByName('PostgreSQL 9.0');
DestinationMDef.LoadPackages();
Convertor.Model2ModelDef = DestinationMDef;
Convertor.Model2Model = App.NewModel(2001, DestinationMDef, true, true);
//2001 = Physical ER Model (PERModel)
644
645
Convertor.CreateDefaultAlterScriptSetting();
Convertor.InitSelectedOTPs();
Convertor.InitAvailableOTPs();
Convertor.SynchronizeModels();
Convertor.LoadAllDifferences();
Convertor.SelectAllModel1ToModel2(true, false);
Convertor.RunConvert();
Generate(ModelPG, 'C:\\SQL\\script.sql');
// Delete only from memory.
ModelPG.Delete();
Model.Delete();
646
Alias.REDataMigrator.LoadObjects();
if (Alias.REStruct.Model!=null)
{
return Alias.REStruct.Model;
}
else
{
return null;
}
}
//*****************************************************
function RE(AliasName, App, AModelDefName)
{
var REManager = App.REManager;
//Load Packages
LoadPackagesByModelDefName(AModelDefName, App.System);
var Alias;
Alias = REManager.REAliases.GetObjectByName(AliasName);
if (Alias==null)
{
var AliasPath = App.ApplicationConfig.AliasesPath;
Alias = REManager.LoadREAliasFromFile(AliasPath+AliasName+'.txa');
}
return REByAlias(Alias);
}
//*********************************************************************
var App;
App = new ActiveXObject("TDM.App");
647
if (App.Application.SaveModelToFile(Model, 'C:\\test.txp'))
{
WScript.Echo("OK");
}
else
{
WScript.Echo("Error");
}
Alias.REDataMigrator.LoadObjects();
if (Alias.REStruct.Model!=null)
{
648
649
return Alias.REStruct.Model;
}
}
//*********************************************************************
function LoadPackagesByModelDefName(AName, System)
{
var PM = System.GetInterface('PackageManager');
var MDef = PM.ModelDefs.GetObjectByName(AName);
MDef.LoadPackages();
}
//*********************************************************************
function SetAliasParameters(REAlias)
{
var REDataProvider = REAlias.REDataProvider;
REDataProvider.SetConnectionParam('HostName', 'Localhost');
REDataProvider.SetConnectionParam('DatabaseName', 'Videorental');
REDataProvider.SetConnectionParamAsInt('Port', 0);
REDataProvider.SetConnectionParam('UserName', 'Scott');
REDataProvider.Password = 'Lion';
return REAlias;
}
//***************************************************************************
****************
var App = new ActiveXObject("TDM.App");
LoadPackagesByModelDefName('PostgreSQL 9.0', App.System);
var REManager = App.System.GetInterface('REManager');
var REAlias = REManager.CreateAlias('REDataSourceDBPG90',
'REDataProviderUniDACClientPG');
REAlias = SetAliasParameters(REAlias);
650
if (App.SaveModelToFile(Model, 'C:\\Models\\Videorental.txp'))
{
WScript.Echo("OK");
}
else
{
WScript.Echo("Error");
}
Possibility to define Toad for Oracle as a default editor for generated SQL scripts
Import of Toad for Oracle templates. See "Toad for Oracle TemplatesToad Data Modeler
allows you to import the templates you created in Toad for Oracle and refresh them at any
time you need.We do not recommend to modify these templates in Toad Data Modeler as
651
export of the templates to Toad for Oracle is not possible.Toad Data Modeler imports
Toad for Oracle templates of the following objects:Stored ProceduresFunctionsEntity
TriggersPackages (object in Oracle)To import Toad for Oracle template to Toad Data
ModelerOpen Template Editor - Select Settings | Template Editor.Click . The following
dialog displays:Confirm OK and take notice of new templates in Template Editor (e.g.
"Default" templates).Note: The Toad for Oracle templates are stored in TOAD.txg file at:
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation
name\Packages\{GUI}To refresh your existing Toad for Oracle templates in Toad Data
ModelerClick . Toad for Oracle Auto Replacement WordsToad Data Modeler allows you
to use Application Variables in your templates. See.Toad for Oracle templates can have
Auto Replacement Words.During import of Toad for Oracle templates, the Toad for
Oracle Auto Replacement Words are replaced by Toad Data Modeler Application
Variables. See how:Toad for Oracle Auto Replacement WordToad Data Modeler
Application
Variable%YourObjectName%<%FullName%>%Date%<%Date%>%SysDate%<%Date%
>%DateTime%<%DateTime%>%Time%<%Time%>%TableName%<%TableFullName%
>%UserName%'<%Author%>Note: Not all Toad for Oracle Auto Replacement Words are
supported." (page 1) for more information.
652
Notes:
1. Since Toad for Oracle 10.0, the list of installed programs is not saved to registry but to a
special file SettingsLocations.ini. What it means in reality: During start-up Toad Data
Modeler searches for all Toad for Oracle versions that you have on your computer. By
default Toad Data Modeler pairs with the last installed Toad for Oracle version. Once the
Toad for Oracle version is found, it is written in Config file of Toad Data Modeler.
If you want Toad Data Modeler to pair with another Toad for Oracle version, you have to
define it manually in Toad Data Modeler: Settings | Options | Toad for Oracle
Integration.
2. Toad for Oracle cannot auto-detect Toad Data Modeler. To detect Toad Data Modeler via
Toad for Oracle, select the Detect checkbox at the bottom in this window.
Note: Toad Data Modeler allows you to use Toad for Oracle aliases but it doesn't allow you to
save changes to these aliases.
653
Related Topics
Create New Model from Database - Reverse Engineering (page 255)
Open Object Explorer - Live Reverse Engineering (page 257)
4. After you are connected, you can select items from the Toad Project Manager and drag
them to the Workspace or Model Explorer of your model in Toad Data Modeler.
5. Right-click the connection and select Disconnect or simply close Toad Project
Manager.
Note: Tables that already exist in the model cannot be added to the model.
Related Topics
Command Line Parameters (page 379)
Import Toad for Oracle ER Diagrams (page 653)
2. From the Open dialog, select particular *.erd or *.erx file and click Open.
3. If you wish to use connection string stored in ERDfile, click Yes on the
following dialog window:
654
5. Result:
In the .erd file, there is only information on tables. Now it is necessary to connect
to database to load information on attributes and other items of the ER diagram. In
other words, reverse engineering has to be done to create a new model in Toad
Data Modeler. The reverse engineering should be completed automatically and the
only information you might need is password to your database connection.
Related Topics:
Command Line Parameters (page 379)
655
656
Click View | Icon Theme and select Toad for Oracle Icons. See the change on the
toolbar and Model Explorer.
657
658
Databases
Databases
Supported Databases
Supported Database
System
DB2 z/OS v. 10
DB2 z/OS v. 9
DB2 v. 10.1 (LUW)
DB2 v. 9.7 (LUW)
DB2 v. 9.5 (LUW)
DB2 v. 9 (LUW)
DB2 UDB v. 8
(LUW)
Greenplum 4.1
Greenplum 4.2
Ingres 10.0
Ingres 9.3
Microsoft Access
2007/2010
Microsoft Access
2000-2003
MicrosoftSQLAzure
Microsoft SQL
Server 2012
Microsoft SQL
Server 2008
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
659
Databases
Supported Database
System
Microsoft SQL
Server 2005
Microsoft SQL
Server 2000
MySQL 5.5
MySQL 5.1
MySQL 5.0
Oracle 11g R2
Oracle 11g R1
Oracle 10g
Oracle 9i
PostgreSQL 9.2
PostgreSQL 9.1
PostgreSQL 9.0
PostgreSQL 8.4
PostgreSQL 8.3
PostgreSQL 8.2
PostgreSQL 8.1
SQLite 3.7
Sybase ASE 15.7
Sybase ASE 15.5
Sybase ASE 15
Sybase ASE 12.5
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
660
Databases
Supported Database
System
Reverse
Engineering
Import
From SQL
File
Alter Script
Generation
SQL/DDL
Code
Generation
Sybase IQ 15.2
Sybase SQL
Anywhere 11
Teradata 13
Other databases
(Universal Model)
Learn details (reverse engineering, specifics, script generation etc.) about your particular database
version in chapter "Databases".
Support for latest versions of other database systems will be added to the product gradually.
Note: Toad Data Modeler includes also support of Universal DB/ANSI Models. See "Universal
DB/ANSI Model" (page 262) for more information.
661
662
Function
663
664
Procedure
665
Related Topics
Specifics - DB2 v. 9 (LUW) (page 668)
666
Sequences
Tablespaces
667
DB2 v. 9 (LUW)
Specifics - DB2 v. 9 (LUW)
Entity
668
Attribute
Data Types:
For Char, Long Varchar and Varchar data types, you can define For Bit Data.
For Blob(x), Clob(x) and DBClob(x) data types, you can define unit of length.
669
Relationship
670
Index
671
Check Constraint
672
Trigger
673
View
674
Materialized View
675
676
Dictionary Type
677
Synonyms
If you want to enter object that is not in the Object box, select Base Object is not in List
checkbox and enter the object in the new Base Object Name box.
Related Topics
Specifics - DB2 UDB v. 8 (LUW) (page 661)
678
Security Labels
Security Policies
Sequences
Tablespaces
679
Sequences
680
681
The Row Change Timestamp area is enabled only for Timestamp data type.
To enable the Implicitly Hidden Column, select the Row Change Timestamp checkbox.
682
Index
683
Dictionary Type
684
Security Labels
Security Policies
Sequences
Tablespaces
685
686
Index
687
Dictionary Type
688
689
Stored Procedure
690
691
Databases
Synonym
692
Security Labels
Security Policies
Sequences
Tablespaces
693
694
Databases
Security Labels
Security Policies
Sequences
Tablespaces
Index
Business Time Without Overlaps option added on General pane.
Example of SQL:
CREATE TABLE policy_info
(
policy_id CHAR(4) NOT NULL,
coverage INT NOT NULL,
bus_start DATE NOT NULL,
bus_end DATE NOT NULL,
PERIOD BUSINESS_TIME (bus_start, bus_end)
);
CREATE UNIQUE INDEX ix_policy
ON policy_info (policy_id, BUSINESS_TIME WITHOUT OVERLAPS);
695
Databases
Unique Constraint
Business Time Without Overlaps option added.
Example of SQL:
CREATE TABLE policy_info6
(
policy_id CHAR(4) NOT NULL,
coverage INT NOT NULL,
bus_start DATE NOT NULL,
bus_end DATE NOT NULL,
PERIOD BUSINESS_TIME (bus_start, bus_end),
PRIMARY KEY(policy_id, coverage, BUSINESS_TIME WITHOUT
OVERLAPS)
);
696
Databases
Example of SQL:
CREATE TABLE policy_info
(
policy_id CHAR(4) NOT NULL,
coverage INT NOT NULL,
bus_start DATE NOT NULL,
bus_end DATE NOT NULL,
PERIOD BUSINESS_TIME (bus_start, bus_end)
);
CREATE TABLE policy_info3
(
policy_id CHAR(4) NOT NULL,
coverage INT NOT NULL,
sys_start TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS ROW
BEGIN,
sys_end TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS ROW END,
ts_id TIMESTAMP(12) NOT NULL GENERATED ALWAYS AS TRANSACTION
START ID,
PERIOD SYSTEM_TIME (sys_start, sys_end)
)
Attribute
New data types - nchar, nvarchar, nclob
New pane Generated replaced former Identity/Identity and Row Change Timestamp.
Trigger
Trigger event allows OR option, set for generating SQL script in Extended Value, option Create
or Replace.
Type
Array Type allows BOOLEAN data type.
Example of SQL:
CREATE TYPE typarraybool AS BOOLEAN ARRAY[VARCHAR(8)]
DB2 z/OS v. 9
Extra Objects - DB2 z/OS v. 9
l
Sequences
Tablespaces
Databases
Sequences
697
Databases
698
699
Attribute
700
Relationship
701
Index
702
703
704
View
705
Materialized View
706
Stored Procedure
707
Function
708
Dictionary Type
709
Domain
710
Synonym
711
712
DB2z-OS v.10
Extra Objects - DB2 z/OS v. 10
See Extra Objects - DB2 z/OS v. 9
713
714
Attribute
715
Key
716
Relationship
717
Index
718
719
720
View
721
Materialized View
722
Stored Procedure
723
Function
724
725
Dictionary Type
726
Domain
727
Synonym
Greenplum 4.1
Extra Objects - Greenplum 4.1
l
Aggregate
Sequences
Rewrite Rules
External Tables
728
Resource Queue
(Trusted) Protocol
Filespace
729
Aggregate
730
Sequence
Rewrite Rules
See Extra Objects - PostgreSQL 8.2 (page 899) topic for PostgreSQL 8.2 database for more
information.
731
External Tables
Object specific for Greenplum db not present in PosgtreSQL 8.2.
732
733
Related Topics:
Extra Objects - PostgreSQL 8.2 (page 899)
734
735
Databases
DB Identification - in case Host Name is not recognized, though being correct, put in IP.
Related Topics
Create New Model from Database - Reverse Engineering (page 255)
Storage Parameters
736
737
Databases
Table Partitions
Define partitions/subpartitions textually
During reverse engineering, sub-tables of partitioned tables are filtered (the tables created
because of partitioned tables). Behavior can be influenced during setting reverse engineering,
checkbox Load Sub-Tables of Partitioned Tables.
Attribute
Array Type pane - Is Array Type checkbox, when selected, Array Dimension box is enabled
Dictionary Type/Domain
If internal is selected in Language combo box, Internal Lanaguage Parameters pane appears.
738
739
Databases
Greenplum 4.2
Extra Objects - Greenplum 4.2
Aggregate Function
Ordered Aggregate option added. If selected, Preliminary Aggregation Function is disabled and
when applied (OK/Apply), combo box is set to -- Not Specified -- value)
Specifics - Greenplum 4.2 (page 739)
ZLIB
QUICKLZ
RLE_TYPE
NONE
Attribute
Column Encoding - only in Column Oriented tables, cannot be combined with table's
compression parameters
l
Compress Level (0 to 9)
External Table
Format - new option CUSTOM
User Data Type
Base Type - new options added
l
Compress Level (0 to 9)
Function
General pane - new With Parameter (Describe Functions) option, only for generating and
reporting functions
Extra Objects - Greenplum 4.2 (page 739)
Ingres
Extra Objects - Ingres 9.3
See the extra object in Model Explorer:
l
Sequences
740
741
742
743
744
Databases
Select individual objects in Select tab you want to generate the script for and take advantage of
Filter if needed.
Synonyms
745
Entity / Index
746
747
Databases
'===
'===
'=== 5. Place your mouse cursor somewhere in the main procedure Main()
'=== 6. Run the module code (Click the "Run Sub/UserForm" button or press F5)
'=======================================================
748
749
750
Select the Linked Table checkbox and fill out the following boxes (name: filled_value):
Link Datasource: C:\Documents and Settings\mario\Documents\MSAccess\fileaccess.mdb
Link Provider String: MS Access;PWD=mypassword
Remote Table Name: TableName
751
752
Databases
Attribute
Select the AutoNumber LI data type to display the Auto Number Type box. From this box, you
can select Increment or Random.
Select the Byte, Currency, Decimal, Double, Integer, Long Integer, Single data type to display
the Number of Decimal Places box.
Select the Hyperlink, Memo, Text data type to displaythe Allow Zero Length and Compress
Unicode checkboxes.
Keys
753
Relationship
754
Index
755
756
Databases
View
757
758
Databases
Attribute
Computed Column Expression box Available for the Computed Column data type.
Persisted Computed Column checkbox Available for the Computed Column data type.
Collation for The Column box Available for data types Char(x), NChar(x), NText, NVarChar
(x), NVarChar(max), Text, VarChar(x), VarChar(max).
759
Databases
If a domain is selected in the Attribute Properties dialog, Domains box, and the domain has a
data type with selected Collation, the checkbox Override Collation Property is displayed in
the Attribute Properties dialog.
If a domain is selected in the Attribute Properties dialog, Domains box, the checkbox Override
Identity Property will be displayed on tab Identity.
Key
StatisticsNorecompute, Ignore_dup_key, IndexOptions, Clustered
Index
Predicate, StatisticsNorecompute, IndexOptions, IncludeCols, Ignore_dup_key
760
761
762
Databases
Include Columns List If it is necessary, column names divided by comma are written there.
It is possible to set up Ascending/Descending for particular items of the index.
763
Check Constraint
764
Relationship
765
766
Databases
Domain
Computed Column Expression box - Available for the Computed Column data type.
Persisted Computed Column checkbox - Available for the Computed Column data type.
Collation for The Column box Available for data types Char(x), NChar(x), NText, NVarChar
(x), NVarChar(max), Text, VarChar(x), VarChar(max).
See tab Identity for checkboxes Identity and boxes Identity Seed and Identity Increment.
Dictionary Type
767
768
Databases
769
Databases
Trigger Fire box For entities you can select AFTER or INSTEAD OF
Trigger Events box with checkboxes Delete, Insert, Update
Execute as box If 'user_name' is selected, a box where you can define the user name will
be displayed.
770
Databases
View
Tab Create Index - There is a box where you can write the complete command (or more)
CREATE INDEX with index definition for the particular view.
Tab View Comment There you can write comments that should be generated in DDL script
before command CREATE VIEW.
Example: -- comment on my view
771
Databases
Procedure
772
Databases
Function
Type of Function combo box It is possible to select Scalar Function and Tablevalued Function.
Execute as box - If 'user_name' is selected, a box where you can define the user name will
be displayed.
OnNULLCall Attribute combo box It is available only for Scalar Function.
Return Data Type box For Table-valued Function they are called Returns.
Tab Function Comment - There you can write comments that should be generated in DDL script
before command CREATE FUNCTION.
Example: -- comment on my function
773
Databases
Synonym
Base Object is not in List checkbox - If the checkbox is selected, the Base Object box will be
displayed. There you can write a name of object for which the synonym is defined. This option
is used if the object is not available in the box Object.
774
775
Databases
776
777
Databases
Note: To generate the table, column descriptions for SQL Server db in Toad Data Modeler,
schema/owner has to be defined. Please see the Entity Properties form | General tab and from
the Schema box select a schema or click the icon on the right to open the Schema dialog and
define a new schema, then select it for the entity.
Filegroups
778
779
Databases
Take notice of the Data Space area. If you click Filegroup, list of file groups will become
available and also appropriate options will display on the right. If you select Partition Scheme,
the options will change.
Description Tab
The description text is generated in final DDL script.
Note: To generate the table, column descriptions for SQL Server db in Toad Data Modeler,
schema/owner has to be defined. Please see the Entity Properties form | General tab and from
the Schema box select a schema or click the icon on the right to open the Schema dialog and
define a new schema, then select it for the entity.
Fulltext Index
780
781
Databases
Attribute
Data Types:
Char, NChar, NText, NVarChar, NVarChar(max), Text, VarChar, VarChar(max) - Select any of
these data types to display the Collation for the Column box.
Unique indentifier - Select this item to display the Row GUID Column checkbox.
XML - You can define details on xml attribute on tab XML Data Type Properties.
782
Databases
Computed Column - It is not a data type. Select this item if you want to set column as computed.
Default rule Is Default Object - Select this checkbox to bind default rule (known as default
object in MS SQL Server) to attribute.
Rule Object - Select a rule object that will be bound to attribute.
Example: See the Identity tab of attribute
Key
Take notice of the Data Space area. If you click Filegroup, list of file groups will become
available. If you select Partition Scheme, schemes will be available.
783
784
Relationship
785
Index
786
787
788
789
Databases
Trigger
CLR Trigger - If you select this checkbox, you can define CLR trigger on tab CLR Trigger.
790
Databases
Dictionary Type
791
Domain
Computed column expression (select Comuped Column item from Data Type box)
792
View
793
794
795
Databases
Procedure
Stored Procedure
For the selected type, appropriate tab will appear in the Stored Procedure Properties dialog.
Functions
Types of functions:
l
Scalar Function
CLR Table Valued Function - Appropriate tab will appear in the dialog.
Aggregate Function
796
Defaults
If you want to generate default as default object, you have to select Generate checkbox.
Synonym
If you want to enter object that is not in the Object box, select Base Object is not in List
checkbox and enter the object in the new Base Object box.
797
798
799
Databases
Note: To generate the table, column descriptions for SQL Server db in Toad Data Modeler,
schema/owner has to be defined. Please see the Entity Properties form | General tab and from
the Schema box select a schema or click the icon on the right to open the Schema dialog and
define a new schema, then select it for the entity.
Partition Functions
Partition Schemes
Filegroups
Fulltext Catalogs
Assemblies
800
801
Databases
Note: Filegroup and Path parameters are used only in Microsoft SQL Server 2005.
If you want to write complete DDL statement for fulltext catalog, select Generate SQL Only
checkbox and write the statement to SQL tab that will display then.
802
Databases
803
Databases
Load Permissions - Only permissions to views, tables, columns and functions are loaded during
reverse engineering. Permissions to users, schemas and user groups are not loaded (they can be
only generated in SQL script.)
Click Finish to confirm new database connection settings.
To test database connection
Click the Test Connection icon on toolbar.
804
Databases
Reverse Engineering
To create a new model
Select existing connection and click Create New Model from Database
Choose User/Schema and select items you wish to reverse engineer. Make sure you select Tables,
Views, Procedures and Functions (Types of objects can be defined during Connection creation).
805
Databases
Note: Comments on views and their columns are reversed. Comments on views are stored in the
View Properties dialog | Description tab. Comments on view columns are loaded to View
Properties dialog | After Script tab (if you want to create them during model creation, you need
to enter them manually - and in this form: --comment and/or /*comment*/.
806
Databases
Related Topics
Create New Model from Database - Reverse Engineering (page 255)
Description Tab
The description text is generated in final DDL script.
Note: To generate the table, column descriptions for SQL Server db in Toad Data Modeler,
schema/owner has to be defined. Please see the Entity Properties form | General tab and from
the Schema box select a schema or click the icon on the right to open the Schema dialog and
define a new schema, then select it for the entity.
807
808
809
Databases
Attribute
810
Databases
Note: Rowversion is generated instead of data type timestamp (they are synonyms and it is
recommended to use rowversion).
The Filestream checkbox is displayed only for data type varbinary(max).
The Sparse checkbox is not available for the following data types: geography, geometry, image,
ntext, text, timestamp, user-defined data types, computed column.
Default rule Is Default Object - Select this checkbox if you want to bind default rule (known as
default object in MS SQL Server) to attribute.
Rule Object - Select a rule object that will be bound to attribute.
Index
The FilestreamFilegroup box is available only for Clustered indexes - see the Data Space area.
In tables that are not partitioned, you can make selection from a new list FilestreamFilegroup.
In partitioned tables, you can make selection from a new list PartitionScheme.
811
Databases
Note: To be able to define Filestream Filegroup, the database requires columns with the
Filestream property in a table.
Possibility to define Filtered Index in the Expression for Filtered Index (WHERE) box.
Data Compression Tab
On this tab, you can set Data Compression either for all indexes (combo box "Compression
Type") or for particular partitions. (To accomplish this, it is necessary to select checkbox Set
Compression Type on Individual Partitions and fill out the box in the Set Compression Type
on Individual Partitions area. See the auxiliary combo box Compression Type for Partition,
box Partition Number and button Add to List).
812
813
Databases
Notes:
Now index can be generated as normal (relational) index, primary XML index, secondary XML
index and Spatial index. What index will be generated is selected automatically by the
following conditions (particularly by data type of particular attribute):
l
If index has only one column and this column is of XML type, XML index will be
generated. For the XML index it is searched whether the box "Primary XML index..." is
filled out. If it is filled out, then it is a secondary XML index. Otherwise it is a
primary XML index.
If index has only one column and this column is of Geometry or Geography type, Spatial
index will be generated then.
Database requires a primary key in a table if Spatial Index exists. User has to arrange
it on his own.
814
Databases
Key
Data Compression Tab
On the Data Compression tab, you can set Data Compression either for all key (combo box
Compression Type) or for particular partitions. (To accomplish this, it is necessary to select
checkbox Set Compression Type on Individual Partitions and fill out the box in the Set
Compression Type on Individual Partitions area. See the auxiliary combo box Compression
Type for Partition, box Partition Number and button Add to List).
Note: To load Data Compression defined in index during reverse engineering, it is necessary
to select the Load Index Options checkbox in the Reverse Engineering Wizard (it is selected
by default).
General tab - take notice of the Data Space area. If you click Filegroup, list of file groups will
become available. If you select Partition Scheme, schemes will be available.
Index Options tab - Detailed settings for index of the key should be defined here.
View
815
816
Databases
When you select TABLE type, the User-Defined Table Type Definition window will display.
Here, write the text that is defined in syntax in brackets after AS TABLE, for example "a int, b
int" (without the quotation marks).
Note: Although this type is available in attributes, it is not possible to use it there.
When you click the Generate SQL Only checkbox, the SQL tab will display.
817
Databases
Function
When you select the CLR Table-valued Function, the Order (List of Column Names) box will
become available. Here, you can define order (column names should be separated by commas).
When you select the Aggregate Function, you can write more input parameters separated by
comma to the List of Arguments box.
818
819
Databases
Filegroups
Partition Schemes
820
Databases
not generated and during reverse engineering the definition is not loaded either (only
names are loaded).
l
Stoplists - Similarly to Filegroups, Stoplists work in Toad Data Modeler 3.x only as a list.
During script generation, the Stoplist definition is not generated and during reverse
engineering the definition is not loaded either (only names are loaded).
Partition Functions
Fulltext Catalogs
Assemblies
If you want to write complete DDL statement for fulltext catalog, select Generate SQL Only
checkbox and write the statement to SQL tab that will display then.
821
Databases
Sequence
FileTable
Filegroups
Partition Schemes
Stoplists - Similarly to Filegroups, Stoplists work in Toad Data Modeler 3.x only as a list.
During script generation, the Stoplist definition is not generated and during reverse
engineering the definition is not loaded either (only names are loaded).
Partition Functions
Fulltext Catalogs
Assemblies
822
823
824
825
826
Databases
New Columnstore Index type available through a new combo box Type of Index. Options are
Relational, XML, Spatial, Columnstore and default/Not Specified.
For Columnstore indexes, many options are available, though they are not valid and they do not
get generated.
New Spatial Tessalation Scheme combo box with new options GEOMETRY_AUTO_GRID and
GEOGRAPHY_AUTO_GRID. Based on selection, further Bounding Box and Grids options are
enabled or disabled.
Cells Per Object default value changed to empty from 16.
With Append option is not available now and checkbox was removed from trigger.
827
828
Databases
Keys can be defined in text in the Keys tab (ALTER TABLE tablename ADD
UNIQUE (attr)).
Indexes can be defined in text in the Indexes tab (CREATE INDEX ...).
Triggers can be defined in text in the Triggers tab (CREATE TRIGGER ...).
In case the user wants to define checkconstraints in text, AfterScript tab can be used.
In case the user wants to define foreign keys in text, AfterScript tab can be used.
829
830
Databases
Sequence
MySQL 5.0
Extra Objects - MySQL 5.0
See the extra object in Model Explorer:
l
Databases
831
832
Databases
For Row Format item, it's possible to select some of these options:
l
Default
Dynamic
Fixed
Compressed
Redundant
Compact
Properties Character Set and Collation must be identical for parent and child tables provided
that at least one parent attribute is of a text data type. If the properties are not identical, a
warning message is returned during model verification.
833
Databases
Comment Tab
The text written on this tab is generated in final DDL script.
Attribute
Comment Tab
The text is generated in final DDL script.
Key
Relationship
Foreign keys are supported only by tables of the InnoDB type.
834
Index
Default
BTREE
HASH
835
Trigger
INSERT
UPDATE
DELETE
BEFORE
AFTER
836
837
Databases
Other Notes
In MySQL 5, User Data Types and Dictionary types are not available.
See the property Definer on tab What to Generate, under Entities/Triggers, Views,
Procedures, Functions.
During reverse engineering, the Definer property is loaded. Nevertheless, if user does not have
particular permissions, the generated DDL script with the Definer property would not work. Now
it is possible to deselect this property for the DDL script generation.
Important note:
838
Databases
In new MySQL models created in Toad Data Modeler 3.5.10, the Definer property
is selected.
If you open your MySQL model created in any older Toad Data Modeler version, the
Definer property will be unselected in the DDL Script Generation dialog and therefore
will not be generated in DDL script.
MySQL 5.1
Extra Objects - MySQL 5.1
See the extra object in Model Explorer:
l
Databases
839
Databases
On the Partition Options tab, you can write SQL code to create partition. The partition will be
generated in SQL code as well as in reports.
See the SQL Preview tab:
840
841
Databases
Properties Character Set and Collation must be identical for parent and child tables provided
that at least one parent attribute is of a text data type. If the properties are not identical, a
warning message is returned during model verification.
842
Databases
See the property Definer on tab What to Generate, under Entities/Triggers, Views,
Procedures, Functions.
During reverse engineering, the Definer property is loaded. Nevertheless, if user does not have
particular permissions, the generated DDL script with the Definer property would not work. Now
it is possible to deselect this property for the DDL script generation.
Important note:
l
In new MySQL models created in Toad Data Modeler 3.5.10, the Definer property
is selected.
If you open your MySQL model created in any older Toad Data Modeler version, the
Definer property will be unselected in the DDL Script Generation dialog and therefore
will not be generated in DDL script.
MySQL 5.5
Extra Objects - MySQL 5.5
See the extra object in Model Explorer:
l
Databases
843
844
Databases
845
Reverse Engineering
To create a new model
Select existing connection and click Create New Model from Database
846
847
Databases
Select items you wish to reverse engineer. Make sure you select Tables, Views, Procedures and
Functions (Types of objects can be defined during Connection creation).
Result:
Support for Index Comments (tab Comments added in the Index Properties dialog)
Oracle 9i
Extra Objects - Oracle 9i
See the extra object in Model Explorer:
l
Tablespaces
Java
848
849
Databases
Specifics - Oracle 9i
See "Specifics - Oracle 10g" (page 863) for more information. The specifics of these two
databases are similar.
This trigger is generated provided that the Triggers item is selected in the DDL Script
Generation dialog | What to Generate tab. Now it is NOT necessary to select also the
Entity item.
In the past, this trigger was generated only provided that the Entities item was selected (the
Triggers item was not taken into consideration).
Oracle 10g
Extra Objects - Oracle 10g
See the extra object in Model Explorer:
l
Sequences
Packages
Directories
Tablespaces
ExtraObjects
Java
850
851
852
853
Databases
Java
854
Databases
855
856
857
858
Databases
Notes:
l
Oracle Instant Clients support- TDM can load all registry entries of Oracle
clients (both 32-bit and 64-bit), if there is any installed.
In case a user isn't installing the client but only copying the client's folder,
then the user has to insert a path to the client (OCl.dll) into windows
variable PATH.
If this path is the first of all the available clients, TDM will find it.
Reverse Engineering
To create a new model
Select existing connection and click Create New Model from Database
Choose User/Schema and select items you wish to reverse engineer. Make sure you select Tables,
Views, Procedures and Functions (Types of objects can be defined during Connection creation).
859
Notes:
1. If the following error message occurs in the Log area: "Unable to reverse
users, roles and permissions. You haven't assigned the SELECT_
CATALOG_ROLE role!", it means you have not all the necessary rights to
load users, roles and permissions.
2. To load these items successfully, you need to have the SELECT_
CATALOG_ROLE role assigned or need to set a right for user to
SELECT tables DBA_USERS, DBA_ROLES, DBA_ROLE_PRIVS,
DBA_TAB_PRIVS.
3. Information on system tables to which user does not have access or
SELECT privilege will be written out in the Log area of the RE Wizard.
There can be one of the following outputs:
a. Missing access to system table ALL_TABLES.
b. Missing privilege SELECT on system table ALL_TABLES.
860
What to Generate tab - For Entities and Materialized Views the following checkboxes are
available:
861
862
Databases
Clear the Physical Properties checkbox not to generate content of tab Physical Properties of
entities and materialized views. (For entities, content of tab External Table Properties will not
be generated either.)
Clear the Table Properties/ Materialized View Properties checkbox not to generate the content
of these tabs in entity and materialized view dialogs.
863
864
Databases
External tables are supported. On tab Physical Properties, select the External Table
(Organization External) checkbox. The External Table Properties tab will occur on the form.
865
Attribute
Data Types:
For Char and Varchar2 data types, you can define Column Length in.
For User data type, you can define REF options.
Note:
866
867
Databases
Change for CHAR/BYTE of attributes: Previously, it was necessary to select CHAR or BYTE for
Char(x) and Varchar(x) data types of attribute (domain) in Column Length in combo box. Now
there is a new item "Default" that is selected by default.
Reverse engineering: During RE TDM finds out what is the default item in the Oracle database.
Example: BYTE is a default item in Oracle database.
- Previous behavior: BYTE was loaded for the attribute.
- Current behavior: Default item is shown for the attribute. BYTE will be shown in Model
Properties dialog | Database Parameters tab | Length Semantics box (it is not used during script
generation).
If you want to preserve the previous behavior of TDM, select the "Load CHAR/BYTE to
Attributes Regardless Database Default Settings" checkbox in the RE Wizard.
Used Sequence (trigger) - From this box, you can select a sequence that you want to use for the
attribute. (A new trigger will be created in SQL script.)
Encryption Specification - Here, you can write e.g. USING 'AES192' NO SALT.
Note: If Not Null checkbox is selected, properties of Not Null constraint can be defined on tab
Not Null Constraint.
Keys
868
869
Databases
Relationship
Create Index to Foreign Key - Select this checkbox to display a new tab Index to Foreign Key
in the dialog.
Index
Example of Expression index:
870
871
Trigger
872
873
874
Databases
When you select Varray Type or Nested Table Type, a new tab displays (Varray Type tab or
Nested Table Type tab). There, you can see new boxes* where you write appropriate values.
Click Create Definition and the definition will be written in the memobox.
*Note: The content of the boxes is not saved and is not used for reverse engineering, script or
report generation.
Tip: Hints in memoboxes for User Data Types are shown.
View
875
876
Materialized View
877
878
Procedure
879
880
Function
881
882
Synonym
Other Notes
l
See "User Data Types" (page 141) for more information on user data types in
Oracle model.
883
Sequences
Packages
Directories
Tablespaces
ExtraObjects
Java
884
Virtual Column area - If you want the column to be virtual column, select the Is Virtual
Column checkbox and fill out the Expression box (e.g. Attribute2 * Attribute3) and set
appropriate data type.
885
Index
886
887
Databases
Trigger (Entity)
Trigger (View)
From the Trigger Fire box, you can select items COMPOUND or INSTEAD OF.
Other Notes
Dictionary types are not supported for Oracle models.
888
Edition
Sequences
Packages
Directories
Tablespaces
ExtraObjects
Java
Edition
889
890
Databases
The Edition object can be generated in DDL script and also loaded during reverse engineering.
The following objects can refer to the extra object Edition:
Synonym, View, Function, Procedure, Package, Type, Trigger. See their Properties dialog and
the new tab Edition | In Edition box.
Edition - Reverse Engineering
RE Wizard | page Options| checkbox Load Objects* Only from Selected Edition: and a box
where you can type name of the Edition from which you want to load objects. During RE, all
objects to which the defined edition refers are loaded. In the reversed model, the Edition is
written on tab Edition in the Properties dialogs of these objects that have been newly defined or
modified in the database for the Edition typed in the box.
Edition - DDLScript Generation
DDLScript Generation dialog | Detail Settings tab | checkbox Generate Change of Edition in
Session. Select this checkbox if you want Toad Data Modeler to take into account for the script
generation an edition defined on tab Edition in Properties dialog of particular object.
Example of what will be generated in DDL script:
Before object definition:
ALTER SESSION SET EDITION = object_edition
After object definition:
ALTER SESSION SET EDITION = ora$base
Note: This is an example of default edition ora$base. Default edition is defined in Model |
Model Properties dialog | Database Parameters tab | Default Edition Name box.
891
892
Databases
What to Generate tab - For Entities and Materialized Views the following checkboxes are
available:
l
Clear the Physical Properties checkbox not to generate content of tab Physical Properties of
entities and materialized views. (For entities, content of tab External Table Properties will not
be generated either.)
Clear the Table Properties/ Materialized View Properties checkbox not to generate the content
of these tabs in entity and materialized view dialogs.
On tab What to Generate see the Editions object.
User Data Types - Click the Extended Values column and see option CREATE OR
REPLACE ... FORCE.
Note: The option is used for CREATE OR REPLACE type. It permits to overwrite a type on
which another type depends. If only CREATE OR REPLACE is selected, it leads to error
notification.
893
Databases
Detail Settings tab | checkbox Generate Change of Edition in Session. Select this checkbox if
you want Toad Data Modeler to take into account for the script generation an edition defined on
tab Edition in Properties dialog of particular object.
Example of what will be generated in DDL script:
Before object definition:
ALTER SESSION SET EDITION = object_edition
After object definition:
ALTER SESSION SET EDITION = ora$base
Note: This is an example of default edition ora$base. Default edition is defined in Model |
Model Properties dialog | Database Parameters tab | Default Edition Name box.
894
895
Databases
896
Databases
Trigger (Entity)
897
Databases
Trigger (View)
From the Trigger Fire box, you can select items COMPOUND, INSTEAD OF, BEFORE
and AFTER.
Column List edit box is available when Update checkbox is selected in Trigger Events section
and Trigger Fire option is set to either COMPOUND, AFTER or BEFORE.
For Each Row checkbox and When Condition edit box are enabled based on Trigger Fire
option selected.
898
Databases
PostgreSQL 8.1
Extra Objects - PostgreSQL 8.1
See the extra object in Model Explorer:
l
Tablespaces
Aggregates
Sequences
Rewrite Rules
PostgreSQL 8.2
Extra Objects - PostgreSQL 8.2
See the extra object in Model Explorer:
899
Tablespaces
Aggregates
Sequences
Rewrite Rules
Aggregate
900
Sequence
901
902
Databases
Rewrite Rule
In the Rule Properties dialog, you can select whether the rule relates to view or entity.
In reports, Rewrite Rules will be generated for entities and views provided that the Rewrite
Rules, Entities and/or Views checkboxes are all selected in OTPs (page What to Report in the
Report Wizard).
During reverse engineering only those Rewrite Rules that relate to the loaded entities and views
will be reversed.
903
Attribute
904
Key
905
Relationship
906
Index
btree
hash
gist
gin
907
Trigger
908
Dictionary Type
909
910
911
Function
912
913
Schema
Other Notes
In PostgreSQL database, Users are not supported (only User Groups). To User Groups, roles
should be written.
914
PostgreSQL 8.3
Extra Objects - PostgreSQL 8.3
See the extra object in Model Explorer:
l
Tablespaces
Aggregates
915
Sequences
Rewrite Rules
For more info see Extra Objects - PostgreSQL 8.2 (page 899)
916
917
Databases
PK Attributes of type Array: Information on Array type migrates together with the PK attribute
during creation of relationship.
918
Databases
Function
Parameters Cost, Rows, Set. Set parameter can be defined by the ALTER FUNCTION command
written to After Script section. Here it will be also loaded during reverse engineering. Example
of ALTER FUNCTION:
ALTER FUNCTION myfunc(integer, integer) SET DateStyle=postgres, dmy;
Notes:
1. During script generation, default values of parameters Cost and Rows are not generated
(default for Rows is 1000, default for Cost is 1 for c/internal language and 100 for other
languages).
2. Note from a manual: Rows is only allowed when the function is declared to return a set.
919
Databases
Possibility to define Enumerated Type - see the new data type in the Type box and new tab
Enumerated Type where this data type should be defined (example: 'item1', 'item2', 'item3').
Note: In previous version, it was possible to define only Composite Type and Base Type.
User Data Types of the Base Type tab (User-defined type in manual) can have (for example
while using attributes) modifiers - e.g. user_type(20,5). In previous version, modifiers could have
only inbuilt/basic data types (types varchar(40) or number(20,5)).
Notes:
920
Databases
1. When you select the Base Type from the Type box, new boxes Name of Parameter and
Default Value of Parameter will display. Name of Parameter - when you select an
attribute with selected User Data Type, a box with an option to define parameters will
display. Default Value of Parameter is just an instrument and is not generated.
2. When there is a possibility to define more modifiers for a Base Type, such User Data
Type used in an attribute will be written to appropriate parameter in the Attribute
Properties dialog e.g. as: "30,20,5". During reverse engineering only Typmod will be
loaded. Typmod is a number where the parameters are coded. If user needs to decode the
Typmode during reverse engineering, function ParseTypmod(Length, format_type) in
script REDataMigratorDBPG83 should be overwritten. If one modifier is used during
reverse engineering, everything will be loaded properly.
3. Modifiers of Base Type can be used in: attributes, composite type attributes, dictionary
types (in PostgreSQL called Domains) and in TDM domains.
921
Databases
The Base Type tab - two new parameters "Type Modifier Input Function" and "Type Modifier
Output Function" for support of modifiers. (Thanks to these new parameters, Base Types can also
use modifiers.)
PostgreSQL 8.4
Extra Objects - PostgreSQL 8.4
See the extra object in Model Explorer:
l
Tablespaces
Aggregates
Sequences
Rewrite Rules
For more info see Extra Objects - PostgreSQL 8.2 (page 899)
922
923
Databases
On tab Storage Parameters you can define new storage parameters for property Autovacuum.
Other parameters for Toast tables can be defined on tab Toast Storage Parameters.
On this tab select the Use Toast Storage Parameters checkbox to activate this tab and to use
the properties defined there.
Entity Properties form | Permissions tab - New permission TRUNCATE.
924
Databases
Attribute
Data Types Interval and Interval(x) - New box Fields in Attribute, Domain and Dictionary Type
Properties dialogs.
Index
New storage parameter FASTUPDATE that can be set up via checkbox Fast Update.
From the Index Access Method box, select gin to display the Fast Update checkbox.
925
Trigger
926
927
Databases
Base Type (set up in User Data Type) - Parameters CATEGORY and PREFERRED
Open the User Data Type Properties dialog | Base Type tab | see the box Category Code and
checkbox Preferred Type.
928
Databases
Function
New TABLE function is taken into consideration - see the renamed box Return Data
Type / TABLE function.
929
930
Databases
Entity
New combo boxTable Type available on Entity Properties dialog, tab General. WhenTyped
Tableoption is selected, new combo boxSelect Composite Type appears below the Table Type
combo box.Select Composite Type combo box lists all existing User Data Types.
Note: Make sure you select Composite type table from the combo box or run verification, which
will return an Error message in case a wrong type is used.
Key Properties
931
932
Databases
Trigger
NewColumn List field available for trigger event Update (Update checkbox must be checked) in
Trigger Properties dialog.
Note: Use comma (,) as a separator.
NewWhen Condition field available on Trigger Properties dialog, tab General.
Tablespaces
Aggregates
Sequences
Rewrite Rules
For more info see Extra Objects - PostgreSQL 8.2 (page 899)
933
934
Databases
New combo boxTable Type available on Entity Properties dialog, tab General. WhenTyped
Tableoption is selected, new combo boxSelect Composite Type appears below the Table Type
combo box.Select Composite Type combo box lists all existing User Data Types.
Note: Make sure you select Composite type table from the combo box or run verification, which
will return an Error message in case a wrong type is used.
Key Properties
935
936
Databases
Trigger
NewColumn List field available for trigger event Update (Update checkbox must be checked) in
Trigger Properties dialog.
Note: Use comma (,) as a separator.
NewWhen Condition field available on Trigger Properties dialog, tab General.
PostgreSQL 9.1
Extra Objects - PostgreSQL 9.1
See the extra object in Model Explorer:
l
Tablespaces
Aggregates
Sequences
Rewrite Rules
Collations
Foreign Tables
Foreign Servers
937
Collation
Foreign Table
938
939
Databases
For more info see Extra Objects - PostgreSQL 8.2 (page 899) and Specifics - PostgreSQL
9.1 (page 941)
940
941
Databases
Name
Schema
Attributes list
Comment
Permission
Name
Data Type
Null
Foreign Server
942
Collation
943
944
Databases
The Collation combobox is visible only when Collation feature is enabled for the used
Data Type.
In case of:
l
Dictionary Typeif correct Data Type or User Data Type is selected (see above)
945
946
Databases
COLLATE collation definition can be used for every attribute to set its Collation. To set
Collation, manually write COLLATE collation expression in Composite Type tab right after
"attributename datatypename" definition (see the screenshot above). Toad Data Modeler
947
Index
948
Relationship
949
950
Databases
951
Databases
PostgreSQL 9.2
Extra Objects - PostgreSQL 9.2
No extra objects are implemented for PostgreSQL 9.2.
For more info see Extra Objects - PostgreSQL 8.2 (page 899), Specifics - PostgreSQL 9.1 (page
941) and Specifics - PostgreSQL 9.2 (page 956).
952
953
954
Databases
Reverse Engineering
To create a new model
Select existing connection and click Create New Model from Database
Select items you wish to reverse engineer. Make sure you select Tables, Views, Procedures and
Functions (Types of objects can be defined during Connection creation).
955
Resulting in:
CREATE FOREIGN TABLE "postgres"."T_CUSTOMER"(
"customer_id" Integer NOT NULL,
"name" Character varying(24) OPTIONS (columndelimiter ':'),
"address" Text
)
956
Functions
Leakproof checkbox on General pane .
Generated SQL:
create function add4 (integer, integer) RETURNS integer
AS 'select $1 + $2;'
LANGUAGE SQL
LEAKPROOF
RETURNS NULL ON NULL INPUT;
Index
- option spgist added in Index Access Method.
- gist index has Buffering parameter option
957
Generated SQL:
create table distributors2
(
did integer,
name varchar (40),
CONSTRAINT con1_noinh_table CHECK (did > 100 AND name <> '') NO
958
INHERIT
)
SQLite 3.7
Extra Objects - SQLite 3.7
See the extra object in Model Explorer:
l
Database
Virtual Tables
Database
959
960
Databases
Virtual Table
During Reverse Engineering, virtual table is loaded as text - CREATE VIRTUAL TABLE.
961
962
963
964
Databases
965
Databases
Entity
Inner Script tabe.g. for defining constraint in text. Code in Inner Script is generated in the
body of CREATE TABLE command, at the end after all attributes and constraints. During
Reverse Engineering, foreign key constraint definitions which are not possible to visualize by
relationship are loaded here.
966
Databases
Attribute
Autoincrement Data Type must be set to INTEGER and the particular attribute must be in a
single-attribute primary key. Note that in SQLite syntax, Autoincrement is defined as a part of
a column constraint of a primary key statement, but in Toad Data Modeler it is set directly in
the Attribute.
967
968
Databases
Relationship
Property MATCH is available in syntax but it is not used and therefore not supported in Toad
Data Modeler.
Relationships can be defined only by CREATE TABLE command.
It is not possible to have relationships between entities from different databases.
If a foreign key is created, it can contain a reference to a non-existing table/name. During
Reverse Engineering, thus foreign key is loaded in the Inner Script tab of the particular entity.
969
Databases
Note: By default, foreign keys are not supported in SQLite; they can be created but are disabled.
They can be enabled by command PRAGMA foreign_keys=ON;, but default value after SQLite
start is OFF!
Key
Index
970
New tab Items Properties define Collation for individual attributes of the index here.
971
Trigger
972
View Trigger has Trigger Fire combobox disabled with INSTEAD OF set.
973
View
974
975
Databases
Content of a new Limit tab is generated in script only if Generate SQL Only and SELECT in
Views as Text are not selected.
Virtual Table
976
Databases
During import of Sybase ASE database from Toad Data Modeler 2.x , only models of
Sybase ASE 12.5.4 and Sybase ASE 15 can be imported. Toad Data Modeler 2.x models
of Sybase ASE 12.5 cannot be imported.
Toad Data Modeler supports only Sybase ASE 12.5.1 and the following (next) versions.
Encrypted Column area for Sybase ASE 12.5 model is available only for version Sybase
ASE 12.5.3 and next versions.
Segments
Sybase ASE 15
Specifics - Sybase ASE 15
Entity
977
978
Databases
Attribute
Computed Column - It is not a data type. Select this item from Data Type box if you want to set
column as computed.
Default rule Is Default Object - Select this checkbox if you want to bind default rule (known as
default object in Sybase ASE) to attribute.
Rule Object - Select a rule object that will be bound to attribute.
979
Databases
Encrypted Column area for Sybase ASE 15 model is available only for version Sybase ASE 15.0
ESD #2 and next versions.
Key
Relationship
980
Index
981
Trigger
982
983
Databases
Dictionary Types
Views
984
985
986
Databases
Procedures
Stored
Extended
For the selected type, appropriate tab will display in the Stored Procedure Properties dialog.
987
Functions
988
989
Databases
Defaults
If you want to generate default as default object, you have to select Generate checkbox.
Other Notes
l
During import of Sybase ASE database Toad Data Modeler 2.x, only models of Sybase
ASE 12.5.4 and Sybase ASE 15 can be imported. Models of Sybase ASE 12.5 cannot
be imported.
990
Databases
Toad Data Modeler supports only Sybase ASE 12.5.1 and the following (next) versions.
See "Script Generation - Sybase ASE 15.5" (page 991) for more information.
Segments
Segments
Encryption Key
Web Service
991
992
Entity
993
Trigger
994
995
996
Databases
Attribute
New combo box Encryption Key (formerly edit box) and new edit box Decrypt Default.
Computed Column - It is not a data type. Select this item from Data Type box if you want to set
column as computed.
Default rule Is Default Object - Select this checkbox if you want to bind default rule (known as
default object in Sybase ASE) to attribute.
Encryption Keys
997
998
Databases
Web services
See Specifics - Sybase ASE 15 for more information on general specifics of Sybase
ASE databases.
Segments
Encryption Key
Web Service
999
1000
Entity
Examples:
Table Compression
1001
Column Compressed
create table tab03 (a text not compressed)
1002
Example:
1003
1004
Databases
See Sybase ASE 15 - Specifics for more information on general specifics of Sybase
ASE databases.
Sybase IQ 15.2
Extra Objects - Sybase IQ 15
Text Configuration Object
1005
1006
1007
1008
1009
1010
Databases
Attribute
Key
1011
1012
Databases
Relationship
It is not possible to load FOR OLAP WORKLOAD statements during reverse engineering.
Index
1013
1014
Domain
1015
1016
View
1017
Procedure
1018
Function
1019
1020
1021
1022
Databases
1023
Databases
4. From the DSN box, select the defined data source. To define a new ODBC data source,
click Property Data Link and define the settings. Type User Name and Password and
click Next.
1024
1025
1026
Databases
6. Select what to reverse. A list of Object Types and Properties is displayed here.
(OTP)
1027
Databases
7. Select options.
8. Click Save to save your settings and options under a new Alias Name. Then click Next
on the RE wizard.
1028
Databases
9. Select Owner objects that you want to load. You can select the objects from the
Owner box and take advantage of Filter.
10. Click Execute. Confirm OK in the following message after the RE is finished
successfully.
Related Topics
Create New Model from Database - Reverse Engineering (page 255)
1029
1030
Databases
Attribute
Key
1031
1032
Databases
Relationship
Box Match Type with options Default, SIMPLE, FULL, UNIQUE SIMPLE, UNIQUE FULL.
It is not possible to reload FOR OLAP WORKLOAD during reverse engineering.
Index
1033
1034
Domain
1035
1036
1037
Databases
View
1038
Materialized View
1039
Procedure
1040
Function
1041
1042
1043
Teradata 13
Extra Objects - Teradata 13
Images
Related Topics:
Reverse Engineering - Teradata 13
Create New Model from Database - Reverse Engineering (page 255)
Script Generation - Teradata 13 (page 1045)
Specifics - Teradata 13 (page 1049)
1044
1045
1046
1047
Related Topics:
SQL/DDL Script Generation
1048
Specifics - Teradata 13
Entity
1049
Attribute
1050
Relationship
Index
Primary Index is generated only as an inside create table statement.
1051
1052
1053
1054
View
1055
Materialized View
1056
Procedure
1057
Function
Related Topics:
Extra Objects - Teradata 13 (page 1044)
Reverse Engineering - Teradata 13
1058
1059
Databases
View the Global Support Guide for a detailed explanation of support programs, online services,
contact information, policies and procedures. The guide is available at: www.quest.com/support.
info@quest.com
Quest Software, Inc.
World Headquarters
5 Polaris Way
Aliso Viejo, CA 92656
USA
Web site
www.quest.com
See our web site for regional and international office information.
1061
Getting Help
Established in 1987, Quest Software (Nasdaq: QSFT) provides simple and innovative IT
management solutions that enable more than 100,000 global customers to save time and money
across physical and virtual environments. Quest products solve complex IT challenges ranging
from database management, data protection, identity and access management, monitoring, user
workspace management to Windows management. For more information, visit www.quest.com.
ansi model
Index
reverse 262
A
access
specifics 747, 751
sql script 746-747
active template 480
activeX 639
application view 33
application window 38
aggregates 900
AK attribute
assemblies 800
objects 67
color 110
self relationship 100, 297
copy 112
align objects 335
create - ler model 297
alter reports 455
create - per model 101
alter script
create in PER Model 207
preserve data 450
data type 108
temporary tables 450
delete 116
alter script settings 464
edit - LER model 298
alter scripts 443
edit - PER model 105
alternate keys 117, 121, 224
move 114
1063
Index
order 111
select 464
class 624
sort
color
attributes 110
key attributes 110
attribute AK, PK
keys 116
columns
auto complete 63
create 297
edit 298
autolayout 333
com 639
automation 639
insert 81
B
benefits 17, 84
C
call 639
caption of categories 83
cardinality 155, 167, 306
categories 83, 339, 381
character replacement 362
check constraint rules 197
check constraints 133, 227
check in 512
company logo
1064
Index
db2 9.5
specifics 681
db2 9.7
convert model
specifics 686
db2 udb8
specifics 661
copy entities 93
db2 v9
specifics 668
db2 z/os v9
databases 698
inheritance 307
1065
Index
definer 842
attribute 116
edit menu 49
key 121
object 70
edition 889
designer 39
ending of lines 81
dictionaries 483
delete 70
directories 850
right-click
copy 93
dockable forms 42
create 87
docking 42
move 96
right-click
PER model 99
ER diagram
logical 288
physical 84
expert mode 464, 551
1066
Index
package 527
Lock Format 64
script 531
formatting 62
objects 62
extensions 483
relationships 337
forms 586
file menu 48
frames 586
filegroups 800
filter
ddl script generation 269
find 384, 414, 416, 517
G
gallery 386
generalizations 629-630
create 629
edit 630
fk mapping 128
generate checkbox 91
format
glossaries 358
physical objects 86
format lines 81
remove 70
graphics 464
1067
Index
create 307
edit 307
group 202
inplace editing 46
help menu 56
integration 650
hot keys 43
java 850
javascript 639
K
key 120-121
create 117
delete 121
edit 120
image on workspace 81
fk mapping 128
parent key 121
key attributes
color 110
key features 17
color 116
display 116
1068
Index
L
layers
properties 593
sample macros 593
lines 81
menu
linking method 121, 218, 302
edit 49
list 513
file 48
live reverse engineering 257
help 56
load model from script 261
macros 53
log.txt 391
model 52
logical data model 288
objects 51
logical ER diagram 288
settings 55
logical model 289
tools 53
logical only 294
view 50
logical view 346
merge models 457-458
logo 81
simple model merge 461
loupe 351
message explorer 389
M
metamodel 621
m
add existing class 623
n relationship
create association/aggregation 630
LER - PER conversion 311
create class 624
m:n relationship 162, 311
create generalization 629
macro 594, 610, 617, 640
create methods 628
user forms use case 605
create property 626
macros 594
open metamodel 622
create macros 593
methods 628
menu 53
create 628
1069
Index
edit 628
model
logical 288
physical 84
mysql 5.0
specifics 832
sql script 837
mysql 5.1
renaming 515
specifics 839
model conversion
simple model conversion 434
model explorer 68, 74, 95, 114-115, 384,
391, 414
model import 421
model information 399
model menu 52
model merge 457, 461
simple model merge 461
model properties 397
model synchronization 435
model update 451
N
naming conventions 354
basic operations 355
glossary 358
properties 358
rules 358
use cases 366
valid characters 362
verify 368
non-identifying relationship 160, 163, 211
not null and mandatory parent 127
modeling
note 80
note line 80
physical ER diagram 84
move 515
attributes 114
entities 96
objects 69
1070
Index
objects
format
Lock Points in Right Angled
Mode 63
rename 515
objects menu
LER model 292
object menu 51
PER model 85
odbc 288
one instance 464
open tdm v2 model 421
options 464
P
alphabetic order of attributes 469
attribute propagation 469
general page 464
save passwords with aliases 464
package 556
tutorial - create package 556
package explorer 527, 622
page format 329
wordwrap 469
oracle
partiality 214
OCl.dll 858
tnsnames.ora 858
paths 464
oracle 10g
reverse engineering 853
pdf report
use references inside report 322
specifics 863
PDF/HTML/RTF 319
oracle 11g R1
specifics 885
1071
Index
physical ER diagram 84
physical model 84
Buffering 957
No Inherit 958
Data Type 959
Foreign Table 956
Options 956
Leakproof 957
reverse engineering 951
specifics 903
spgist 957
postgreslq 8.3
specifics 917
sql script 921
postgreslq 8.4
Type
Range 959
preserve data
alter script 450
specifics 922
preview 330
PostgreSQL 9.0
specifics
compare 190
projects 57
Projects 57
1072
Index
redo 420
refactor 352
relationship 121, 126, 128, 155, 160, 163164, 171, 211, 302-303, 311
1073
Index
workspace 39
scripts 531
rolenames 222
rollback 536
select objects 64
rtf report
assign 353
script 577
tutorial - create script 577
settings 464
settings menu 55
shortcuts 72
create shortcuts 74
edit shortcuts 76
1074
Index
remove shortcuts 77
sequence 821
specifics 824
sqlite 3.7
collation 964
snippet 386
sql
snippets 386
sql 741, 746-747, 774, 776, 798, 818, 821,
837, 842, 848-849, 861, 884, 891,
899, 914, 921, 929, 933, 940, 956,
961, 976, 990-991, 999, 1007, 1042,
1045
sql azure
specifics 757
sql script 774
sql preview in script generator 270
sql script generation 266
sql server 2000
sql script 776
sql server 2005
specifics 779
sql script 798
sql server 2008
reverse engineering 801
specifics 806
sql script 818
sql server 2012
extra object
filetable 821
search property list 821
1075
Index
script generating
create 479
default 480
delete 481
introduction 473
location 478
specifics 1029
synchronization
teradata 1044
aliases 652
templates 473
active 480
er diagrams 379
body 477
icons 656
complete 478
projects 653
1076
Index
templates 481
valid characters 362
tools menu 53
syntax 365
verify 244
undo 420
1077