Lead your team forward
OCT 24 / 9AM ET Register nowImporting a Logical Model
This article describes the steps needed to import a logical Instance Layer or Master Data Layer model from an existing PowerDesigner model.
For best results, read through the requirements first.
Other importing options are:
-
Import from XML
-
Import Database Schema
PowerDesigner logical and physical model prerequisites
-
Entity type is derived from the entity stereotype:
-
instance: Entity will be imported as an Instance Entity on both the Instance and Master Layers.
-
dictionary: Entity will be imported as a Dictionary Entity on the Instance Layer and as an Instance Entity on Master Layers.
-
master: Entity will be imported as a Master Entity on the Master Layer.
-
<none>: Entity will be imported as an Instance Entity on the Instance Layer and as a Master Entity on Master Layers.
-
-
Relationship import is driven by the relationship stereotype:
-
instance: Relationship will be imported on both the Instance and Master Layers.
-
master: Relationship will be imported on the Master Layer.
-
master2instance: Relationship will be imported on the Master Layer.
-
<none>: Relationship will be always imported on both the Instance and Master Layers.
-
-
Attribute names should follow these patterns:
-
source_id: Should be used as the primary key (PK) of an instance or dictionary entity, and it is used as the parent column in an instance relationship (only if a single-value PK is used).
-
<parent>_source_id: Should be used as a foreign key (FK) of an instance entity, and it is used as a child column in an instance relationship (only if a single-value PK is used).
-
master_id: Should be used as a FK of an instance table and it is used as a child column in a master2instance relationship.
-
id: Should be used as a PK of a master table, and it is used as the parent column in master and master2instance relationships.
-
<parent>_id: Should be used as a FK of a master table, and it is used as a child column in a master relationship.
-
-
Behavior of imported columns is determined by extended attributes (Boolean):
-
isSRC, isSTD, isCIO, isEXP, isSCO (Instance Layer).
-
isCMO (Master Layer).
All Boolean values have to be set as true
by default, otherwise import will not be correct.
-
-
Oracle 11g DBMS is required for the Physical model to support the imported data type.
The following diagram shows the PowerDesigner logical model (includes both instance and master entities and relationships):
During export, all data types are converted to ONE Runtime data types: long , long_int , string , day , datetime , float , integer , boolean .
|
Only the logical subset of information is imported from the physical model. |
XSD requirements
In order to import a model from an XSD file, a series of transformations is applied in the background by the engine. As such, the XSD file must have a specific structure.
Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{4B64AB40-AE61-4C65-8BC1-96C2AC948C26}" Label="" LastModificationDate="1409230090" Name="MDM" Objects="206" Symbols="19" Target="ORACLE Version 11g" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="15.3.0.3248"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
<o:RootObject Id="o1">
<c:Children>
<o:Model Id="o2">
<a:ObjectID>4B64AB40-AE61-4C65-8BC1-96C2AC948C26</a:ObjectID>
<a:Name>MDC</a:Name>
<a:Code>MDC</a:Code>
<a:CreationDate>1409229736</a:CreationDate>
<a:Creator>tomas.vytiska</a:Creator>
<a:ModificationDate>1409230090</a:ModificationDate>
<a:Modifier>tomas.vytiska</a:Modifier>
<a:History>ORG {7BB85C56-2415-475F-812E-D080FDCBCADD}
DAT 1409230090
ATT FOPT</a:History>
<a:PackageOptionsText>[FolderOptions]
In case the XSD file uses another format, a custom transformation must be created.
Import procedure
Follow these steps to import a logical model into MDM. The steps are provided for importing both into the instance and master data layers (the images show both options).
-
For the Instance Layer, open Logical Model > Instance Layer (right-click) > Import Logical/Physical PowerDesigner Model.
For a Master Data Layer, open Logical Model > Master Data Layers > [layer] (right-click) > Import Logical/Physical PowerDesigner Model.
To create a particular Master Layer, see Creating a Master Data Layer Model, section Add a Master Data Layer. -
Browse the imported file, select Entities, Attributes, and Relationships as needed, and select Next. Exclude instance2instance relationships on the Master Data Layer. Alternatively, delete them after the import (see step 4d).
-
The comparison view is now shown. Adjust actions (add, remove) on objects and select Next.
-
Take note of the validation messages on the Properties tab of the Status Panel and adjust the imported entities:
-
Instance Layer: Enable matching if the corresponding entity exists on the Master Layer.
-
Master Layer: Set up a related instance entity and change the data type for all PK and FK attributes to long_int for Master Entities.
-
Set up other non-imported elements, such as Reference Data, Description, and so on.
-
Delete the instance2instance type of relationships on the Master Layer, otherwise, MDM Web App will not work (relationships will be looped).
-
-
Take note of the validation messages on the Properties tab of the Status Panel and adjust the imported relationships.
-
Master Layer: In case of compound keys between two instance entities, set up an appropriate alias key.
-
Check the elements that are not imported, such as Relationship type, Roles, and so on.
-
-
Define other features according to Creating an Instance Layer Model, section Add an instance entity (starting from step 7) and Creating a Master Data Layer Model, section Add a master entity (starting from step 3).
-
Define Copy Columns according to Creating an Instance Layer Model, section Add a relationship between instance entities (starting from step 3).
Was this page useful?