立即与支持人员聊天
与支持团队交流

Toad Data Modeler 7.3 - User Guide

Introduction User Interface Models and Model Objects
Physical Data Model
Entity Relationship Diagram Objects Basic Database Design Advanced Database Design
Universal Data Model Logical Data Model Working with Model Objects
Features and Tools
Application Variables Export/Import DDL Script Generation Graphics Model Actions Print Create New Project Reports Reverse Engineering Scripting and Customization About Templates Tips and Tricks Toad for Oracle Integration Toad Intelligence Central (TIC) Integration Tools Version Control
Options and Configuration Databases
Amazon Redshift 1.0 IBM DB2 LUW 9.5 IBM DB2 LUW 9.7 IBM DB2 LUW 10.1 IBM DB2 LUW 10.5 IBM DB2 LUW 11.1 IBM DB2 z/OS 10 IBM DB2 z/OS 11 Greenplum 4.1 Greenplum 4.2 Ingres 9.3 Ingres 10.0 EDB Postgres Advanced Server 10 Microsoft Access 2007/2010 Microsoft Azure SQL Database V12 Microsoft SQL Server 2005 Microsoft SQL Server 2008 Microsoft SQL Server 2012 Microsoft SQL Server 2014 Microsoft SQL Server 2016 Microsoft SQL Server 2017 Microsoft SQL Server 2019 MySQL 5.0 MySQL 5.1 MySQL 5.5 MySQL 5.6 MySQL 5.7 MySQL 8.0 Oracle 10g Oracle 11g Release 1 Oracle 11g Release 2 Oracle 12c Release 1 Oracle 12c Release 2 Oracle 18c Oracle 19c PostgreSQL 9.0 PostgreSQL 9.1 PostgreSQL 9.2 PostgreSQL 9.3 PostgreSQL 9.4 PostgreSQL 9.5 PostgreSQL 10 PostgreSQL 11 PostgreSQL 12 SQLite 3.7 Sybase ASE 15.5 Sybase ASE 15.7 SAP ASE 16.0 Sybase IQ 15.2 Sybase SQL Anywhere 11 SAP SQL Anywhere 17 Teradata 13 Vertica Database 8.0
Copyright Legal Notices

Create Associations

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.
  2. Move your mouse cursor over the work area.
  3. Click the first class and then the target class.

Edit Associations

Double-click the association line on the Workspace.
or
Edit the association in the Associations dialog (Model menu | Model Items |Associations).

 

General Tab

Description

Name

Name of the association/aggregation

Advanced Tab

Description

Role

Name of property that will be added to class

Aggregation

Represents an owner of the second class.

Many

Property created in the second class will not be of the Dispatch type but the List type, and will work as a collection.

External

External associations create new properties in the selected class. Uncheck the External checkbox not to create the properties. In both cases, a relationship with information about linkages is created.  

Attributes1, Attributes2 Tab

Represent attributes that can be assigned to classes on both sides of the association or aggregation. Names of properties are defined on tab Advanced in the Role box. Every attribute may change class behavior.

A list of attributes is accessible via Model menu | Attributes.

 

About Templates

Toad Data Modeler allows you to:

  • Use pre-defined templates for properties that contain SQL code in your model (SQL, Before Script, After Script etc.).
  • Create your own user templates for these properties.
  • Set a default template for each property.
  • Import Toad for Oracle templates.

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 used (according to the database). You don’t have to write the code manually for every new created trigger.

To select another than default template in object Properties dialog

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 Shows all active templates for this object.
Inserts the selected template.
Opens the Template Editor.

All templates are available in Template Editor.

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.

Template Editor

To open Template Editor

Select Settings | Templates.

To display templates for particular database or database version

  1. From the Model Type box, select the database or particular database version.
  2. Click Load Templates.

Note: This option is available only if packages with the templates for selected database haven’t been loaded so far.

Option Description
Commit

Confirms changes made in the Template Editor and saves them to particular packages.

Note: Packages are not saved to your hard disk.

Commit and Save Confirms changes made in the Template Editor and saves them to particular packages (.txg files). The packages are saved to your hard disk.
Rollback Cancels changes made in Template Editor.
Import Toad for Oracle Templates

Imports templates from Toad for Oracle to the Toad Data Modeler Template Editor.

Note: This option is available only if you have Toad for Oracle installed on your computer.

Model Type

Select a database or particular database version for which you want to display the templates.

TIP: Feel free to open Templates Editor for different database platforms or versions, dock the windows, compare the templates.

Creates a new template.
Deletes the selected template. Click Commit to confirm the deletion.
Opens the Template Properties dialog.
Object Category List of objects (entities, attributes, triggers, check constraints, views, procedures etc.) with list of available SQL properties (SQL, Before Script , After Script etc.).
Parent Information on parent object
Template Name Specify any name for your template to distinguish it from others.
Default Select this checkbox to set the template as default. The template will be pre-defined in the object Properties dialog.
Active

Select this checkbox to display the template in the Templates box in the object Properties dialog.

Template Provides a quick view on the body of the SQL code.
Template body for template

Write the SQL code to this window.

Note: Remember to save the changes Commit or Commit and Save.

Available Pre-defined Templates

There are two pre-defined templates – Body and Complete. Both relate to the Generate SQL Only checkbox on tab General of object Properties dialog.

  • Body – The Generate SQL Only checkbox is deselected.

Example of default code for trigger:

BEGIN

/*trigger_body*/

END

  • 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 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 pre-defined 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.)

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级