In this section, you can find how to do reverse engineer from a data source to create a technical model. Reverse engineering is the process of reconstructing a physical and/or Entity Relationship (ER) model from an existing data source. The purpose of reverse engineering is to avoid manual work as much as possible. It is important that the technical interface with which the data provided delivers the data is in accordance with the technical specification.
Before you begin, make sure that you have an active connection to the source database that you want to do the reverse engineer.
To do the reverse engineer:
Database > Update Model from Database
.
Using a data source
. If the data source is correct, go to step 7. If it is not correct, go to step 3.
Connect to data source
icon.Configure
.
To make sure your model is complete, you have to do some post-processing activities.
Make sure to check if the uppercase/lowercase of the names and the codes in PowerDesigner matches the source system. It is a known bug in PowerDesigner when re-engineering models from databases.
To change to uppercase or lowercase:
Tools > Model Options > Naming conventions > Other objects
.Make sure the schema is filled. It is a known bug in PowerDesigner that this data gets lost in some cases. You can even “mass change” data of tables in your models.
{info} In PowerDesigner a
schema
is sometimes calledowner
.
To complete the information about the schema:
Model > Tables
.Owner
.In some databases, the entities of one project has to be in a specific filegroup. In this instruction you will set a default filegroup for a physical data model. You have to set this once for each physical data model.
Database > Default Physical Options
.
Default Physical Options
appears. The tab Table
is open. Click on the plus sign next to on
, to expand the tree. The option <filegroup>("DEFAULT")
appears
<filegroup>("DEFAULT")
and click on the button with the >>
symbol. This will bring the option to the right side of the window.<filegroup> =
. Make sure the text is without quotes. If you put quotes in it, this will lead to three quotes in the script, which lead to an error while running the script.
PRIMARY
.
{info} The filegroup applies to every new entity you make.
Apply to
. A window appears where you can select the existing entities. Put a checkmark next to the entities you want to apply the setting to, and click on OK
.
Table Properties
appears.Preview
to check the generated script.
Now you have completed the initial set-up of your technical model.
The main purpose of the Logical Validation Layer (LVL) is to transform the data received from external data sources to fit into the logical data model structure. It is also responsible for validating deliveries. The Logical Validation Layer is also known as the Historical Staging In (HSTGIN) Layer.
A schema is a set of database objects, such as tables, views, triggers, stored procedures, etc. In some databases a schema is called a namespace
. A schema always belongs to one database. However, a database may have one or multiple schema's. A database administrator (DBA) can set different user permissions for each schema.
Each database represents tables internally as <schema_name>.<table_name>
, for example tpc_h.customer
. A schema helps to distinguish between tables belonging to different data sources. For example, two tables in two schema's can share the same name: tpc_h.customer
and complaints.customer
.
A Physical Data Model (PDM) represents how data will be implemented in a specific database.
{note} The i-refactory uses four PDMs: technical staging model, logical validation model, central facts model and generic access model. Each one of these models is implemented as an additional database, which is used to store data from external and internal data sources.