PowerDesigner use suggestions

xiaoxiao2021-03-06  87

1.1 Business rules (Business Rule)

For some business logic, it may appear in multiple data tables, it is recommended to encapsulate business rule, so that the business logic is reused, it is also convenient for business logic maintenance.

To facilitate maintenance of business logic, you can consider combining business rule and domains. Apply Business Business Rule to Domains and then apply Domains to the fields of the data table.

For example, in the demolition project, the demolition business part, the management parameter business part, the listing of the list, and the data sheet in the demolition contract part has the floor, so a business rule, then define a Domain, thus corresponding data sheet This Domain can be used in the field.

1.2. Custom Data Types (Domains)

Oralce provides a number of built-in data types, but users can define custom data types based on the needs of the business.

Package business logic in the custom data type.

As the home floor above, we can define a separate data type (Domain) maintenance, then in related data tables

This custom data type is used on the field.

Generally defined in the Oracle's basic type of Oracle, you can add some Standard Check or Business Rules.

For example: In the demolition item, the area category This field has appeared in many data tables, which can be maintained as a separate data type class, define a "area category" Domains (included: 0 --- House area, 1 --- Using the area, 2 --- unit area, 3 --- total building area, 4 --- distribution area). And due to the provision of PowerDesigner, so that it is easy to query those objects that are affected quickly when business logic changes.

1.3 Serial Number (SEQUENCE)

In the PowerSigner's model, you define a pile of Sequence, which is the next thing to associate them with the relevant fields of the data table, especially those for multiple data table fields.

One data sheet only allows a field to use Sequence, and before the field of the data table uses Sequence, you should add this Sequence to the extended DependenCies of the data table.

If a data table has 2 fields or more fields that use Sequence, the model checks will give the prompt information.

The rules used are typically only applied to the primary key field of the data table.

Primary key field suggestion is data table "ID" or "numbered" configuration.

For example: "House Integrated Area" data table, its primary key field = housing integrated area number, corresponding sequence is

SEQ_ housing integrated area. Other data sheets may also use this Sequence, which also needs to set a reference relationship before use.

(Setting a reference relationship on the extended DepENCIES of the data table)

1.4 Oracle Package

In Oracle Package, you can set some ProCedure, but what are the database objects referenced by the Oracle package, which is recommended to manually maintain it. In particular, Oracle Package uses which data sheets, views, and Oracle Packag and other information suggested.

1.5 package

PowerDesigner's packages are equivalent to folders. Users can treat it as a container that maintains business logic. The PowerDesigner package is generally recommended in accordance with the business module. If the module needs to be subdivided, consider establishing a PowerDesigner sub-package to complete.

It is recommended to save the shortcut to the model object in the container. Original information is recommended not to put it in the container. This way information may not be maintained because of the mode of the PowerDesigner's model, in the container, in the container. PHYSICALDIAGRAM below PowerDesigner is recommended to organize the object contained in a topic or business perspective as a topic or business perspective, so that each PhysicalDiaGram is clear.

1.6. View (View)

The view is typically established on a data sheet or view (of course, a stored procedure may also be referenced). The reference information of the data source of the view should be maintained in the model of the general view.

In our current project, the database model does not maintain the view, which requires PowerDesigner in the creation view.

model.

I can't get a view (view) script in the PowerDesigner9.5 environment, by modifying the relevant

Set the parameters or not to get the script.

The script of the view (view) can be obtained by the following 2 method.

Method 1: Use the reverse engineering of PowerDesigner 8.0 to get the script of the view, then view it in PowerDesigner9.5

The model of the figure comes in, so you can maintain the view.

Method 2: Use erwin reverse engineering to get the Erwin model of the view, then save the model as an ERX type file

Import this file in PowerDesigner9.5, then make a merge model.

The view model of PowerDesigner is relatively poor, and it is not possible to maintain the dependency of the view (which is the dependence of the view to the data source). This is not as good as Erwin.

1.7. Synonym (SYNONYM)

Synonyms are equivalent to an alias for database objects, providing the independence of location and data. When accessing an object across database users, you can consider establishing synonyms to combine permission assignments, simplifying database objects.

1.8. Data table

Annotation of the note statement of the data sheet.

Business background:

In our project, the annotated statement of the data table in the Erwin model is not synchronized to the Oracle database. Now you need a comment statement of a data table in a database.

Implementation method that may be taken:

Method 1: Erwin directly forwards the project, but directly from Erwin directly in the comment statement, the update will fail.

Method 2: If the Erwin model is converted into the Note statement of the PowerDesigner model to update the data sheet, it can avoid the problem of the carriage return symbol, which is available in normal case, but due to the logic model and physical model in the erwin model. Inconsistent, even the order they appear inconsistent, so that the PowerDesigner model is incorrect, the buffer of the generated modified database is not correct.

Actual method:

Convert ERWIN model to the PowerDesigner model Save as ERX type in erwin, then import models in PowerDesigner), and save files as PDM type (XML format), delete views in the model, Domains, Business Rule, Reference, etc. Leave information about the relevant data table itself, then modify the XML of the model file, and use XMLSPY to generate the DTD file of this file, and use Java to write a SAX-based program to parse the XML file, put each data table and field Note Where the statement is extracted, then update the annotation statement of the data sheet and field in the database, so it is possible.

1.9. Erwin Upgrade to PowerDesigner 1.9.1 Domain upgrade

When upgrading from Erwin 3.52 to PowerDesigner9.5, the association relationship between Domain information and data sheets will be lost, and you need to manually re-add relationship between 2 people. Of course, the model file of PowerDesigner can be modified by programming, and the association relationship between 2 is added. The general PowerDesigner model file is large, as long as there is a dozens of data sheets affirmation model files have 1MB, it is recommended to add information in SAX.

Note: Time to add Domain used by the data table field, you need to set the data sheet to Domain's reference relationship (also extended Dependencies).

1.9.2 Business Rule Upgrade

Upgrade from Erwin 3.52 to PowerDesigner9.5, Business Rule's expression (script) needs to be modified, put all

@COLUMN in the expression of Business Rule modifies into% column%

Specific implementation, you can modify directly in PowerDesigner9.5; or save the model as an XML format (file class is .pdm), modify it through tools such as UltraEdit or Xmlspy, a lookup replacement. Of course

You can only modify the contents of , otherwise some places that should not be modified should be modified.

Like Domain, when upgrading from ERWIN 3.52 to PowerDesigner9.5, the association between business information and data sheets will also be lost. If Business Rule is not too much to manually modify the model file.

1.9.3.SEquence upgrade

.SEQUENCE upgrade suggestions use and domain's way, programming implementation.

1.9.4. Upgrade of physical graph

Upgrade from Erwin 3.52 to PowerDesigner9.5, physical diagram can also pour into PowerDesigner 9.5, but PowerDesigner 9.5 upgrade features Some issues: Some problems in the data table in the generated physical figure: data table in the physical figure The field is displayed incomplete, and many times the type of data table field cannot be displayed. I use Java to parse the upgraded model file, then regenerate the location information of the data table in the physical graph (2 coordinates of the data table: the upper left corner coordinate, the lower right corner coordinate); Your own PowerDesigner9.5 package and can create physical graphs, add the data sheet to the physical map.

1.9.5. Other instructions

Upgrade from Erwin 3.52 to PowerDesigner9.5, I wrote some Java programs to solve related problems, if a similar problem encountered

Can communicate.

2. Change management of data structures in PowerDesigner

Some suggestions are made in the foundation of the data structure in the demolition project. Some suggestions are proposed in the foundation of the concept of the PowerDesigner package.

2.1. The data structure is maintained according to the business module.

All data structures in the model are in one file, and each business module in the top folder is a shortcut to data structures.

2.2. The data structure is managed in its life cycle.

The following packages are established under the package of each business module:

2.2.1 Temporary Test Data Structure:

It is some data structure used in some current business module test, which can be deleted at any time.

2.2.2 Discussion Data Structure:

It is that the data structure is in the discussion and has not been determined.

2.2.3 The data structure that needs to be updated:

The data structure has been determined, but it has not been updated to the database. 2.2.4 Formal data structure:

Data structure used in the database is used in the database

2.2.5 Data structure in the invalidation:

It has been used normally in the database, and now it is no longer used, but it has not been carried out.

The data of the data in the invalidated data sheet is not completely invalidated. If you want to invade these data structures,

Data migration is required, as well as other related processing.

2.2.6 The data structure that has been invisible:

The relevant data migration has been completed in the database that is no longer used, but the data table has not been deleted.

The relevant document is not updated.

转载请注明原文地址:https://www.9cbs.com/read-105543.html

New Post(0)