With Astah Professional, you can create ER Diagrams (Entity-Relationship Diagrams) using either IDEF1X or IE notations. You can also auto-generate ER diagrams by reversing tables from your database.
All models are stored centrally, making it easy to convert ER models into other models like UML Class diagrams.

ER Diagram Sample

section divider

Creating ER Diagram

  1. Go to [Diagram] – [ER Diagram] from Main Menu.
    Diagram Create Menu

  2. An ER Diagram will be created under the [ER Model] package in the Tree View.
    ER Diagram in Structure Tree
section divider

Auto-generate ER Diagram


You can generate ER Diagrams automatically by importing database tables using the DB Reverse Plug-in.

  1. Right-click the target ER Model in the Tree and select [Auto Create ER Diagram].
    Auto Create ER Diagram Menu

  2. The diagram will be created and opened automatically.
    ER Diagram Sample
section divider

Logical and Physical name

Astah allows you to manage both Logical and Physical names for entities. You can switch between these two types using:
Physical Name and Logical Name

There are three ways to switch the display of names logical or physical.

1. Right-click on the diagram and select [Diagram Model Type] from its pop-up menu.
Switch logical and physical name

2. Click [Diagram Model Type] in the Structure Tree.
Switch ER Model Notation

3. Switch from the ER Diagrams’ Property View (bottom-left pane).
Switch Logical and Physical name


https://astah.net/wp-content/uploads/2022/06/ER-diagram-system-properties.svg

TIPS – Set default name type

TIP: You can set the default name type in [Tools] → [System Properties] → [ER Diagram].

section divider

Switching Notations  – (IDEF1X and IE)

You can switch between IDEF1X and IE notations for ER diagrams.

1. Right-click on the ER diagram and select [Diagram Notation].
Switch ERD Notation

2. Alternatively, switch from theER Diagram’s Property View.
Switch ERD Notation

section divider

ER Entity

Creating an ER Entities

Astah provides several ways to create ER Entities in the Diagram Editor page.

ER Entity

Add Primary keys and Attributes

There are a few ways to add Primary keys and Attributes to ER Entities.
One is using “Suggest Feature”. When you have a mouse over an ER Entity, a few mini icons will appear. To add a Primary key, click the red button and to add an Attribute, click the orange one.
Add Primary Keys

Once you add one, you can create another by hitting the [Enter] key.
Adding Attributes to ER Entities
Since version 8.5, you are able to add Primary keys and Attributes by pasting text.

Add Attributes by text

Display Level of ER Entities

There are three display levels for ER Entities. Entity, Primary key and Attribute.
ER Entity DIsplay Level

You can change it from ER Entities pop-up menu – [Display Level].
ER-Entity Display Leval Menu

section divider

Managing Domains

Add a single ER Domain

You can create ER Domains from pop-up menu of [Domain] in the tree view.
Add ER Domains

Add plural ER Domains

You can also add more than one ER Domain at once.
1. Click [Add ER Domains] in the tree view or go to [Tools] – [ER Diagram] – [Add ER Domains].
Add ER Domains

2. Specify the domain data in the list.
Add Multiple Domains to ER Diagram

section divider

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 ER Entity

section divider

Relationships

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

IDEF1X

IE

Relationship type

Identifying RelationshipIdentifying RelationshipIdentifying Relationship
Non-Identifying RelationshipNon-Identifying RelationshipNon-Identifying Relationship
Many-to-many RelationshipMany-to-many RelationshipMany-to-many Relationship
  1. Choose which type of relationship you want to create.
    Create a relationship

  2. Click two Entities.
    Create ER Entities

  3. The relationship is now created. Foreign keys would be automatically added depending on the relationship type.
    Create Relationship
section divider

SQL Export

  1. You can export ER Entities into SQL (SQL-92). To export, go to [Tools] – [ER Diagram] – [SQL Export], then select Entities you want to export.

  2. [SQL Export] Dialog opens. Specify the location where you want to export to.
    SQL-Export

  3. In the [Option], you can specify more detailed settings.
    SQL Export box

TIPS: Export Entity Definition as a comment

You can export the Entity’s definition as a comment by configuring so in the [Option] menu.
SQL Export Option

section divider

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 a new ER Data type.
    Add ER Data Type


  3. Enter the new Data Type in this dialogue and click [OK].
    Set ER Data Type

TIPS: Set Default Data Type

You can set the default Data type for an Entity attribute by marking it at [Default Type].
Setting Default ER Data Type

section divider

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 ER Table

2. A list of domains, entities and each entity information would be exported.
Export Entity Definition Report

3. Enter the new Data Type in this dialogue and click [OK].
ER Entity in Excel

section divider

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$each.entity.each.attribute.pk
Foreign Key Flag of Attribute$each.entity.each.attribute.fk
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