Description:
In erwin there are three different orders for Attributes/Columns. What is their relevance?
Solution:
There are three different orders in erwin as follows:
- Attribute or Logical Order
- Column Order
- Physical/Database Order
Attribute/Logical Column Physical
Here is the explanation of the three orders:
- Logical Order – This is the order of the Attributes in the logical side. The two physical orders initially inherit their orders from the logical order. This order can be used to manage the Attributes in any order for the sake of convenience, e.g. alphabetical. This order is not used in Forward Engineering.
- Column Order – This order has a dividing line separating key and non-key Columns. The key Columns above the line are also reflective of the Primary Key (PK) Index order. So, the PK Index member order will always be in the same order as the Column order and changing one will also change the other.
- Physical Order – In this order, the table column order can be different than the Primary Key (PK) constraint and Foreign Key (FK) constraint Column order. This helps when the order of the columns in ‘Create Table…’ and ‘Create PK index …’ are not the same.
Here is the purpose of having two separate Column and Physical orders:
In the database, the member order of the Primary Key (PK) Constraint MUST match the member order of the Foreign Key (FK) Constraint. If you use the Column Order, the PK Constraint member order is the same as in the Create Table... syntax and so will be the FK Constraint member order. In situations where the Create Table... syntax needs to have a different order than its PK Constraint member order, you will need the Physical Order. In Forward Engineering, there is an option to use either Column Order or Physical Order.
Checking Physical Order in the screen shot above will use Physical Order whereas keeping it unchecked will use Column Order.
Comments
0 comments
Please sign in to leave a comment.