Using Auto Column
Auto Column provides you with a quick way in creating entities in ERD. Just by entering the name of a column when you create it, its type, nullable and default value will be specified, based on the pre-defined column schema.
Configuring Auto Column
You need to configure the auto columns in order to use them in ERD. To configure auto columns:
- Select Window > Application Options from the toolbar.
- In the Application Options window, open Diagramming > ERD & ORM.
- Click Add....
Add an auto column
- Define the auto column by entering its name, type, nullable and default value. When you create columns by using the name specified, the type, nullable and default value will follow the definition here. Note that you can specify the length of datatype when specifying Type.
Defining an auto column
- Click OK to confirm.
- Click OK again to close the Application Options window.
Pattern matching using wildcard
Sometimes, columns are named based on the entities they are in. For example, for entity, Teacher, there may be a column named TeacherID and for entity, Student, there may be another column named StudentID. Although these columns are named differently, they may share the same type, nullable and default values. In such case, you can make use of pattern matching in defining an auto column.
When naming an auto column, you can use the '%' character to indicate the occurrence of ANY character. For example, naming an auto column %Name will result in causing TeacherName and StudentName apply the definition specified.
|Using pattern matching in defining an auto column
Adding a column to entity with Auto Column
When you create a column in entity, give it a name that follows an Auto Column defined. When you confirm editing, the type, nullable and default values will be automatically set for you. Note that if you enter a type yourself, Auto Column will NOT function.
|Naming a column
The following resources may help you to learn more about the topic discussed in this page.
|5. Applying Default Schema on ERD||Table of Contents||7. Entering Sample Table Records for Entities|