Astah User's Guide

ER Diagram

In Astah Professional, ER Diagrams (Entity-Relationship Diagrams) can be drawn in two notations, IDEF1X or IE. Categories for Entity, Resource, Event and Summary can all be set. Show Domains hierarchically and you can drag-and-drop Domains into Entities directly to add them. DB Reverse and Entity-import via Excel are available by using free Plug-ins.


ERD

Create ER Diagram

  • Go to [Diagram] - [ER Diagram].
    create ER Diagram
  • In the tree view, Domain and ER Diagram will be created under the [ER Model] package.
  • create ER Diagram

Switch Logical Name and Physical Name

Each model has two fields for its name - Logical one and Physical one.

Logical Name and Physical Name
There are three ways to switch the name.
  1. Click [Diagram Model Type] from ER's pop-up menu.
    ER Diagram Model Type
  2. Click [Diagram Model Type] in the Structure Tree.
    Switch logical and physical
  3. Switch from ER Diagrams's Property View
    Switch logical and physical
TIPS: Set Default model Type
You can set the default type in the System Properties.


TIPS: Switch logical/physical names in the Structure Tree.
To switch model name between logical one and physical one, select it from [Tree Model Type] on ER Models' pop-up menu.
Switch Logical Name to Physical Name



Switch Notations

You can switch the diagram notation between [IDEF1X] and [IE]. There are two ways to switch the notation.

  1. Select [Diagram Notation] from pop-up menu on ER Diagram or in the Structure Tree.
    Switch ER Notation
  2. Switch from ER Diagram's Property View.
    Switch ER Notation

ER Diagram Tool Palatte


IDEF1X
ER Diagram Items for IDEF1X notation

IE
ER Diagram Items for IE notation
IDEF1XIEButton
EREntity Entity. You can choose "Resource Entity", "Summary Entity" and "Event Entity" from the dropdown list.
relationidentifyrelationidentify ieIdentifying Relationship
relationnonidentifyrelationnonidentify ieNon-Identifying Relationship
relationmanyrelationmanyieMany-to-many Relationship
subtypeSubtypeSubtype
See Common tools for the others.
Highlight EREntity Attributes Highlighter. When you select an attribute, its related attributes and relationships will be highlighted, while this mode is on.


Entity

Create Entity

Double click on an ER Diagram to create an Entity.

ER Entity

Add Primary keys/Attributes

You can add Primary keys and Attributes from ER Entity's Pop-up menu or clicking the diamond icons that appear when you have your mouse over an ER Entity.


Primary Key, Attribute
TIPS: What you can do with Primary Key/Attributes on the diagram
1. While either is selected, hit [Enter] key to create another.
2. [Shift+Enter] key can also add another Primary key/Attribute.
3. You can drag them to other Entity or within the Entity.
For more details, check out the Shortcut key for ER Diargam.


Add hidden models

You can add all the hidden model by clicking [Show Hidden Relationship] from the pop-up menu of ER Diagram.

Show hidden relatinships

Change display level

You can change the display level of ER Entities from [Entity Display Level] from the pop-up menu of ER Diagram.

Visibility Level
There are three ways to display the ER Entity. Visibility Level

Further detailed vsibility setting

You can configure more detailed visibility settings from ER Entity's pop-up menu.

Visibility Level


Domain

Add Domains

You can add Domain one by one or more than one at all once.

Add Domain
Add multiple domains once

Click [Add], specify the domains and click [Add checked items] to add new domains to your project.

Add multiple domains

Add Domain to an ER Entity

You can drag Domain from the Structure Tree to an ER Entity on the diagram.

Add Domain to an ER Entity


Relationship

Create Relationships

Select Identifying Relationship, Non-Identifying Relationship or Many-tomany Relationships from the Tool palette and click models.


IDEF1XIEModel
relationidentifyrelationidentify ieIdentifying Relationship
relationnonidentifyrelationnonidentify ieNon-Identifying Relationship
relationmanyrelationmanyieMany-to-many Relationship

SQL Export




Export SQL

You can export ER Entities into SQL (SQL-92).

  1. Go to [Tools] - [ER Diagram] - [SQL Export], then select Entities you want to export.
    SQL Export
  2. [SQL Export] Diglog opens. Specfy the location where you want to export to.
    export sql_dialog
  3. In the [Option], you can specify more detailed settings.
    sql export_optionmenu

SQL Export Options


LabelDefault SettingDefinition
Model TypePhysical ModelSelect which model type to export SQL.
Enclose name with...OFFSpecify what to use to enclose the name.
Export Create Table statement with constraintsOFFSelect if it exports the Create Table statement with constraints not.
Export Drop Table statementOFFSelect if it exports Drop Table Statement or not.
Export Foreign KeyONSelect if it exports Foreign Key or not.
DROP TABLE-Select the Drop Table.
Unique Index-Select the Unique Index.
Non Unique IndexONSelect if it exports Non Unique Index or not.
SeparatorOFFSelect the separator.
Comment - Entity/AttributeOFFSelect how you want to export Comment.
CommentOFFChoose what to export as comment from [None], [Definition], [Logical Name] or [Physical Name] of Entity and Attributes.
Charset of exported files<default></default>Select the charset to use on exporting SQL


Add ER Data Type

  1. Go to [Tools] - [ER Diagram] - [Set ER Data Type]. Then you will get the window below.
    ER Data Type
  2. Click [Add] button to add new ER Data type.
    ER Data type

Initial Setting

You can set your preferences for ER Diagram in the System Properties.

ER Diagram System Properties