1. Home
  2. Docs
  3. Chapter 14. Database Design & Engineering
  4. 2. Database Designer’s Guide
  5. Using auto column

Using auto column

Download PDF

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:

  1. Select Window > Application Options from the toolbar.
  2. In the Application Options window, open Diagramming > ERD & ORM.
  3. Click Add….
    Add an auto column
  4. 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
  5. Click OK to confirm.
  6. 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