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

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

Macro and User Forms - Use Case

Scenario

You want to create a macro that will add a 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 mustn’t 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 don’t refer to caption. Caption can be any title you want.

  1. On tab Visibility, select where you want to apply the macro – Physical Model.
  2. On tab Menu, define whether you want to display the macro in:
  • 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.

  1. On tab Object Types, select in which object pop-up menu you want to display it. Select Workspace.
    Confirm OK.

  1. Double-click the macro in Script Explorer to open Script Editor. Modify the default code.

  1. Click Commit and Save.
  2. Right-click the Workspace |Macros |Add Prefix to open the user form.

About Metamodel

Toad Data Modeler implements the concept of metamodels. Metamodels are accessible only in Expert Mode (via Package Explorer).

Metamodel is a graphical representation of objects, classes, methods and relationships between them in a specific Package.

Using metamodels, you can create your own classes, methods and properties and define relationships between those items and items that are created in the application by default.

Important: It is recommended to only use lower and uppercase letters for naming your objects in metamodels (no numbers and special characters).

 

Example: The metamodel of Oracle package

 

Open Metamodels

  1. Open (or select Expert Mode Menu | Customization | Package Explorer).
  2. Select a package.
  3. Right-click the package and select Open Metamodel.

 

Classes

Toad Data Modeler implements the concept of metamodels. Metamodels are accessible only in Expert Mode (via Package Explorer).

Metamodel is a graphical representation of objects, classes, methods and relationships between them in a specific Package.

Using metamodels, you can create your own classes, methods and properties and define relationships between those items and items that are created in the application by default.

Important: It is recommended to only use lower and uppercase letters for naming your objects in metamodels (no numbers and special characters).

 

Example: The metamodel of Oracle package

 

Open Metamodels

  1. Open (or select Expert Mode Menu | Customization | Package Explorer).
  2. Select a package.
  3. Right-click the package and select Open Metamodel.

 

Add Existing Classes

  1. Right-click the work area and select Add Class.
  1. In the Class Selection dialog, select a class and define settings on tab Settings.

Result: The selected class will be added to your metamodel and you will be able to modify it.

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级