Vector Property Tables
The M0 schema also contains one table for each type of property that has a vector data type, excluding properties flagged as Tag_Is_Internal. In these tables, each row represents a single value in an instance of the property.
There are three columns present on each instance of this type of table. The following table describes the columns found on all Vector Property type tables:
Column Name |
Data Type |
Description |
---|---|---|
ID@ |
INTEGER |
The ID of the object holding the property. |
SEQUENCE_NUMBER@ |
INTEGER |
The zero-based index of the value in the property's vector. |
VALUE@ |
See Description |
This column will contain the value. The data type of this column will depend upon the data type of the underlying property (see the previous table that describes the data types exposed using the ODBC interface). |
For example, a Subject_Area object holds a vector property that contains the IDs of all Entity objects that are members. This property has a class name of Referenced_Entities_Ref, which becomes the REFERENCED_ENTITIES_REF table. You can use the following query to see the names and types of all members of the Movie subject area in the eMovies.ERWIN model:
SELECT SA.NAME AS 'SUBJECT AREA', E.NAME AS 'MEMBER'
FROM M0.USER_ATTACHED_OBJECTS_REF RE
INNER JOIN M0.SUBJECT_AREA SA ON RE.ID@ = SA.ID@
INNER JOIN M0.ENTITY E ON RE.VALUE@ = E.ID@
UNION
SELECT SA.NAME, V.NAME
FROM M0.USER_ATTACHED_OBJECTS_REF RE
INNER JOIN M0.SUBJECT_AREA SA ON RE.ID@ = SA.ID@
INNER JOIN M0.VIEW V ON RE.VALUE@ = V.ID@
UNION
SELECT SA.NAME, CV.NAME
FROM M0.USER_ATTACHED_OBJECTS_REF RE
INNER JOIN M0.SUBJECT_AREA SA ON RE.ID@ = SA.ID@
INNER JOIN M0.CACHED_VIEW CV ON RE.VALUE@ = CV.ID@
ORDER BY 1, 2
Copyright © 2018 erwin, Inc.
All rights reserved.
|
|