Concrete Object Tables
The M0 schema also contains a table for every concrete type of object that can be created in erwin DM, excluding types that are marked as Tag_Is_Internal. For example, there will be an ENTITY table that holds rows describing Entity objects in the model, an ATTRIBUTE table that holds rows describing Attribute objects, and so on.
In these tables, each row represents an instance of an object of that type in the model. There are three columns that are present on each instance of this type of table:
Column Name |
Data Type |
Description |
---|---|---|
ID@ |
INTEGER |
The ID of the object in the model. |
TYPE@ |
INTEGER |
The class ID of the object. |
OWNER@ |
INTEGER |
The ID of the owning object. |
There is also a column for each possible property on the object that has a scalar data type and is not flagged as Tag_Is_Internal. For example, there will be a NAME column, a LONG_ID column, and so on. The data types of these columns will depend upon the underlying data types of the properties represented.
The following table maps the property data types to those exposed using the ODBC interface:
Property Data Type |
Column Data Type |
Comments |
---|---|---|
Integer |
INTEGER |
(None) |
String |
VARCHAR |
(None) |
Long Id |
CHAR(67) |
The string will be formatted with the standard Long Id formatting. For example: {51A4D991-46CE-4530-AC4F-63757E46A494}+00000000 |
Binary |
LONG VARBINARY |
(None) |
Time |
TIMESTAMP |
(None) |
Boolean |
CHAR(1) |
The value will be set to T or F. Many Boolean properties in erwin DM are actually three-state: True, False, or Not Set. If the property is Not Set, it will appear as a NULL. |
Point |
CHAR(23) |
The string will be formatted as the X and Y components, separated by a period. For example: -2134.898 |
Rectangle |
CHAR(47) |
The string will be formatted as the Left, Top, Right, and Bottom components, separated by periods. For example: -2134.898.1394839.193839 |
Resource |
CHAR(23) |
The string will be formatted as the Id and Resource Selector, separated by a comma. For example: 1,0c138988 |
64-bit Integer |
INTEGER |
(None) |
Short Id |
INTEGER |
(None) |
Size |
CHAR(23) |
The string will be formatted as the width and height components, separated by a period. For example: 20.30 |
To illustrate this, the ATTRIBUTE table would have columns such as NAME, DEFINITION, DATATYPE, NULL_OPTION, and so on. You can use a query similar to the following to determine the names of all the Attribute objects in your model:
SELECT E.NAME AS 'TABLE', A.NAME AS 'COLUMN'
FROM M0.ENTITY E INNER JOIN M0.ATTRIBUTE A
ON E.ID@ = A.OWNER@
ORDER BY 1,2
Copyright © 2025 Quest Software, Inc. |