The Data Definition Register contains metadata, i.e. data about the data. This data is defined in SAP Sybase Powerdesigner and partly in our application, and details the following core concepts and its subtypes:
Architecture layerAttribute with the following subtypes
Auto Number AttributeComputed AttributedApplication Computed AttributeRDBMS Computed AttributedDefault Value AttributeAttribute Type with the following subtypes
Atomic TypeTemporal Atomic TypeEnumerationConstraint is a generalization with the following hyponyms
Attribute Value Constraint, Attribute Mandatory Constraint, Attribute Enumeration Constraint, Attribute Datatype ConstraintEntity set, Entity recordPrimary key, Alternate keyParent relationship exists, Child relationship existsEntitywith the folllowing subtypes
Base EntityDerived EntityHelper EntityInterfaceNamespaceRelationshipRelationship Join with the following subtypes
Temporal Relationship JoinTemporal Point in Time Relationship JoinKey with the following subtypes
Non Unique KeyUnique KeyKey Attribute{info} The
Data Definition Registerhas also some auxiliary tables related to:
- an entity:
Applicable Entity Class,Entity Classification- an attribute:
Attribute Classification,Applicable Attribute Class- a relationship:
Relationship Classification- a constraint:
Applicable Constraint Violation Action,Constraint Classification,Constraint Violation Action
To retrieve the current state of each element, i.e., all the metadata related to that element, you can use the i-refactory REST API or the views available in the Data Definition Register.
For each element, subtype of auxiliary table, there is a view called [acm_datadef].[element_name], where element_name is the name of the element. There is a 1 to 1 correspondence between the list of elements, subtypes and auxiliary tables and the GDAL views.
For example, there is a view called [acm_datadef].[architecture_layer] that gives all the metadata associated with the Architecture layers.
Metadata about i-refactory elements is described using the following attributes:
| Attribute | Definition |
|---|---|
applicable_attribute_class |
This provides the identifier of the type of the attribute |
applicable_constraint_violation_action_id |
The identifier of [acm_datadef].[applicable_constraint_violation_action] |
applicable_entity_class |
This is the identifier of the applicable_entity_class, which provides the entity classification |
attribute_type_id |
This provides the datatype for each attribute as it is implemented on the database |
code |
This is the database name of the element. It tends to be similar with the Name column where no spaces are allowed. |
constraint_classification_id |
The identifier of [acm_datadef].[constraint_classification] |
data_type_code |
Data type (I: integer, SI: smallint, VA: varchar, VAMAX: varchar(max), D: date, DT: datetime, LI: bigint, VMBT: nvarchar, A: char, BL: bit, DC: decimal) |
data_type_expr |
The SQL Server data type |
description |
The description of an element |
entity_id |
This is the identifier of the entity to which an element belongs |
enumeration_id |
This is the id of [acm_datadef].[enumeration] |
hyponym_entity_id |
This is the entity id of the hyponym. For example the attribute value constraint ([acm_datadef].[attribute_value_constraint]) has the hypoym_entity_id 113 as shown in that table as acm_entity_id |
hyponym_id |
This is the id of of the hyponym. For example the id of [acm_datadef].[attribute_value_constraint] |
id |
This is the identifier of the element (for example, the id of an entity or the id of an attribute) |
interface_id |
The identifier of the interface to which an element belongs |
is_delta_helper_entity |
Boolean value |
is_mandatory |
Indication if the attribute allows NULLs |
is_ordered |
Boolean value |
is_persistent |
It is a boolean 0 or 1 that describes whether the entity is 'stored' in the database. BR helpers and the entities in the GDAL layer are not persistent (they are represented as db views) |
is_start_of_timeline |
Boolean value |
key_id_primary |
This is the identifier of the primary key as it can be found on the id column on [ACME].[acm_datadef].[key] |
length |
The length of a data type |
name |
The name of the element |
namespace_id |
This is the identifier of the schema (as it is referred in SQL Server) assigned to an element |
ordinal_nbr |
This is the sequence number of the attribute for a given element on the database or the position of an enumeration value |
precision |
It describes the decimal of the decimal data type |
query_expr |
The query expression that defines the element |
scale |
Scale is the number of digits to the right of the decimal point in a number. For other data types, it is the length of the data type |
threshold_absolute |
This the threshold of constraint violation that is allowed before a delivery is rejected |
timeline_interval_type |
Timeline interval type |
timeline_type |
TT (Transactional timeline) or VT (Valid timeline) |
transactional_consistent_filter |
LEAST or GREATEST, read more here |
-- Select details of entities available in TSTGIN layer
SELECT
entity.id
, entity.interface_id
, entity.namespace_id
, entity.code
, entity.applicable_entity_class_id
, entity.name
, entity.description
, entity.is_persistent
, entity.query_expr
, entity.execute_rowcount
, entity.entity_update_id_last
, entity.key_id_primary
, entity.execute_rowcount_conclusion
, entity.acm_exists_ind
, entity.acm_last_created_dt
, entity.acm_start_dt
, entity.acm_end_dt
, entity.acm_record_ind
, entity.acm_modifier_id
, entity.acm_entity_id
FROM ACME.acm_datadef.entity entity
JOIN ACME.acm_datadef.interface interface
ON entity.interface_id = interface.id
JOIN ACME.acm_datadef.architecture_layer architecture_layer
ON interface.architecture_layer_id = architecture_layer.id
WHERE
architecture_layer.code = 'TSTGIN'
;