Astah User's Guide

ER Diagram (Entity-Relationship Diagram)

You can create ER Diagrams (Entity-Relationship Diagrams) in two notations, IDEF1X or IE.
Also you can auto-generate ER diagrams by reversing from your database. All models are stored in one place and can be converted to other models like UML Class diagram models and vice versa.

ER Diagram

Create ER Diagram

  1. Go to [Diagram] - [ER Diagram] from Main Menu.
    create ER Diagram
  2. In the tree view, Domain and ER Diagram will be created under the [ER Model] package.
    create ER Diagram

Auto-generate ER Diagrams

You can genarate ER Diagrams after importing database tables with DB Reverse Plug-in.

  1. Right-click on the target ER Model in the Tree and select [Auto Create ER Diagram].
    Generating ER Diagrams
  2. Generated ER Diagram will open automatically.
    Generating ER Diagrams

Switch Logical Name and Physical Name

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

Logical Name and Physical Name
There are three ways to switch the name.
  1. Right-click on the diagram and select [Diagram Model Type] from its 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 name in the Tree
To switch model name between logical and physical in the tree, 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. Right-click on the ER diagram and click [Diagram Notation] from its pop-up menu.
    Switch ER Notation
  2. Switch from ER Diagram's Property View.
    Switch ER Notation

ER Diagram Tool Palatte

ER Diagram Items for IDEF1X notation

ER Diagram Items for IE notation
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
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.


Create Entity

You can directly double-click on the ER Diagram to create an 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
1. While either is selected, hitting [Enter] key can create another.
Create Entity Table continously, Attribute
2. You can drag it to other Entity or within the Entity.
Drag Domain to another
For more, check out the Shortcut key for ER Diargam.

Change display level

There are three ways to display the ER Entity.

Visibility Level

You can change the display level of ER Entities from [Display Level] menu.
Visibility Level

Further detailed visibility setting

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

Visibility Level

TIPS: Export a list of Entities to HTML
By adding Export ER models to HTML Plug-in, you can export a list of Entities to HTML.
Export HTML
Export HTML


Add Domains

You can add a domain one by one from [Add Domain] menu in the tree.

Add Domain
Add multiple domains once

If you want to add more than one domain, click Add ER Domains.

Add multiple domains

Speify the domain data in the list.

Add multiple domains

Add Domain to an ER Entity

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

Add Domain to an ER Entity


Create Relationships

Select Identifying Relationship, Non-Identifying Relationship or Many-tomany Relationships from the Tool palette and click two Entities to connect.

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

  1. Choose which type of relationship you want to create.
    ERD Relationship
  2. Click two Entities.
    ERD Relationship
  3. Relationship is now created. Foreign keys would be automaticall added depending on the relationship type.
    ERD Relationship

Add related Entities

If there are no related Entities showing on a diagram. Click [Show Dependent Entities] from the Entity's Pop-up menu. This adds all the related Entities on the diagram. Very helpful when you add an Entity by dragging it from the tree.

Add Related Entities

To see a list of related Entities, click [Show Hidden Relationship] from the Entity's Pop-up menu.
List of related Entities
A dialogue with a list of related entities and its relations appears. You can choose which to add on the diagram.
List of related Entities

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

TIPS: Export Entity Definition as a comment
You can export Entity's definition as a comment by configuring so in the [Option] menu.
Export Entity Definition as a comment

Add ER Data Type

  1. Go to [Tools] - [ER Diagram] - [Set ER Data Type] from main menu.
    ER Data Type
  2. Click [Add] button to add new ER Data type.
    ER Data type
  3. Enter the new Data Type in this dialogue and click [OK].
    ER Data Type

TIPS: Set Default Data Type
You can set Default Data type for an Entity attribute by marking it at [Default Type].
Set Default Type for Data type

Export Entity Definition Report

You can export a list of ER Domains, Entities and each Entity's detailed information to Excel file.

  1. Go to [Tools] - [ER Diagram] - [Export Entity Definition Report].
    Export Entity Definition Report
  2. A list of domains, entities and each entity information woul be exported.
    Entity Definition Report
  3. Enter the new Data Type in this dialogue and click [OK].
    Entity Definition Report
    Entity Definition Report

Export format of Attributes and its TaggedValues

Logical Name of Attribute$each.entity.each.attribute.logical_name
Physical Name of Attribute$each.entity.each.attribute.physical_name
Domain Name of Attribute$each.entity.each.attribute.domain
Primary Key Flag of Attribute$
Foreign Key Flag of Attribute$
NotNull Flag of Attribute$each.entity.each.attribute.notnull
Reference of Attribute$each.entity.each.attribute.ref
Datatype of Attribute$each.entity.each.attribute.type
Length/Precision of Attribute$each.entity.each.attribute.length_precision
Initial Value of Attribute$each.entity.each.attribute.initial_value
TaggedValue of Attribute$each.entity.each.attribute.initial_value

TIPS: Customize template
You can customize a template for Entity Definition Report by clicking [New Template] button.
Entity Definition Report

Initial Setting

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

ER Diagram System Properties