Chat now with support
Chat with Support

Toad Data Modeler 7.2 - 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

Display Keys in Model

To display keys in your ER diagram

From the Display Level dropdown menu on the Display Toolbar, select Primary Keys or PK and FK Keys or All Keys.


To define display level for a specificWorkspace

Right-click the work area  | Workspace Format | Entity tab | Display Level.

To display keys graphically in your ER diagram

Right-click the work area | Workspace Format | Entity tab | check the Display Keys Graphically checkbox.

To change the default key attributes color

Select Settings | Options | Model section | Physical Model | Entity tab | Attribute Colors area.

To highlight key attributes on your Workspace

Point your cursor at a relationship line.

TIP: When you point your mouse cursor at a relationship line, parent and child attributes are highlighted on the Workspace. You can set the color at: Settings | Options | Graphics | Colors area | Highlight Color.

Create Keys

An entity can have a primary key and many alternate keys. The keys are stored in the Keys tab in the Entity Properties form.

To create a key

  • Right-click an entity on the Workspace and select Add | Key. The Key Properties dialog opens.

To create a PK (unique) attribute

  1. Right-click an entity on the Workspace and select Add | Attribute. The Attribute Properties dialog opens.
  2. On tab General, select the Primary Key (Unique) checkbox.

To assign an attribute to key

  • In the Entity Properties dialog, Attributes tab, double-click the empty space in the Key column next to the selected attribute.


  • In the Key Properties dialog | Attributes tab.


  • Primary keys are graphically marked by red key by default.
  • A primary key can be added to more attributes.
  • It is possible to delete primary keys. It is not possible to delete alternate keys of unique attributes.

NotNull Property for PK and AK Attributes

Toad Data Modeler allows you to check/uncheck the NotNull property for PK and AK attributes.This is possible only if the Allow Null Attributes in Keys checkbox is selected (unchecked by default).

To select this checkbox

Select Settings | Options | Physical Model and select the checkbox.

If this checkbox is not selected, Toad Data Modeler doesn’t allow you to uncheck 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, 10, 11 n/a n/a
DB2 v. 8, 9.x, 10.x n/a n/a
Greenplum n/a available
Ingres 9.3, 10 n/a n/a
Microsoft Access available available
Microsoft Azure SQL Database n/a available
SQL Server 2000 n/a n/a
SQL Server 2005 n/a available
SQL Server 2008 n/a available
SQL Server 2012 n/a available
SQL Server 2014 n/a available
MySQL 5.x n/a available
Oracle available available
PostgreSQL n/a available
SQLite 3.7 available available
Sybase ASE, Sybase IQ n/a n/a
Sybase SQL Anywhere n/a n/a
Teradata n/a n/a

If the Allow Null Attributes in Keys checkbox is selected:

  • When you assign an attribute to a key (PK, AK), the Not Null checkbox of the attribute will be checked. (But you are able to uncheck it)
  • During propagation of the key via the identifying relationship, the Not Null property in child attribute is inherited from the parent attribute. The only exception is when a database doesn't support Null value in primary key, which would be created via the propagation.
  • During Model Conversion, different settings of the Not Null property and its support in different databases are taken into consideration.
  • 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.
  • 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 for more information.

Edit Keys

  • In the Entity Properties dialog | Keys tab | double-click the key.


  • Find the key in Model Explorer | EntityName folder | Keys | Double-click (or right-click and select Edit).
Attributes Tab Description


A list of all non-assigned attributes of the entity


Attribute(s) that have been assigned the key.

Assigns selected attribute to the key.

Tip: - For multiple selection of attributes, use SHIFT or CTRL.

Removes the selected attribute from the key.

Tip: - For multiple selection of attributes, use SHIFT or CTRL.

Assigns all attributes at once.

Removes all attributes from the key at once.

Notes Tab

You can write notes related to the key you are editing.

Using Index Properties Tab

Definition of other Key properties, dependent on the database platform and version you are using.

Delete Keys

  • In the Entity Properties form | Keys tab, select a key and click the Delete button.


  • Find the key in Model Explorer | EntityName folder | Keys | right-click the key and select Delete Item.

Note: It is possible to delete a primary key. It's not possible to delete an alternate key of unique attribute.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating