PowerDesigner practical tips (3)

Source: Internet
Author: User
1. How does PD enable the primary key id to use the MySQL auto_increment? ◇ Solution: Open the tableproperties window → columns → select the id column → open the columnsproperties window → Select identity. Note that this option is not available for conceptual models.

1. How does PD enable the primary key id to use the MySQL auto_increment? ◇ Solution: Open the tableproperties window → columns → select the id column → open the columnsproperties window → Select identity. Note that this option is not available for conceptual models.

1. PowerDesigner uses MySQL auto_increment
◇ Problem description:
How does PD enable primary key id to use MySQL auto_increment?
◇ Solution:
Open the tableproperties window → columns → select the id column → open the columnsproperties window → Select identity
Note: This option is not available for conceptual models.


2. Remove double quotation marks in SQL scripts from PowerDesigner
◇ Problem description:
When PD generates an Oracle database table creation SQL statement, double quotation marks are added to the table name and field name by default. How can we remove the double quotation marks in the SQL script?
◇ Solution:
Choose Database-> Edit current database-> Script-> SQL-> Format. There is a CaseSensitivityUsingQuote whose comment is "Determines if the case sensitivity for identifiers is managed using double quotes ", indicates whether double quotation marks are used to specify the case sensitivity of identifiers. You can see that the default value of values on the right is "YES" and changed to "No!


3. Domain is not used when PowerDesigner generates s ql statements.
◇ Problem description:
If Domain is used in PD, the SQL script of the database that generates SQLServer uses the custom data type corresponding to Domain instead of the SQL server data type, how can we allow PD to use SQLServer's own database type when generating SQL statements, instead of the custom data type corresponding to Domain?
◇ Solution:
Set Database → EditCurrentDBMS → General → Script → Objects → Domain → Enable to NO.


4. Set the default font of Entity in PowerDesigner
◇ Problem description:
When you create an Entity object, if the default PD font is not suitable for your personal habits, it is very troublesome to modify the font of the object every time you create an object, is there a way to change once and for all?
◇ Solution:
Tools → DisplayPreferences... → Format → Entity → Modity... → Font → modify and Save settings → SetAsDefault


5. Set Entity in PowerDesigner to automatically adjust the size
◇ Problem description:
When a field or other modification is added to Entity, the display size of Entiry is not automatically adjusted. How can this problem be solved?
◇ Solution:


6. Set table attribute preview in PowerDesigner
◇ Problem description:
How can I modify the SQL statements generated by clicking table attribute preview?
◇ Solution:
Right-click the selected table, click properties... menu item, select physicaloptions, and click applyto in the lower left corner.
In the top toolbar of the preview options, click showgenerationoptions to set the syntax format of other production SQL statements.

7. After creating a table, why does the warning of Existence of index appear?

A table shoshould contain at least one column, one index, one key, and one reference.
This warning error does not occur if you do not check the Existence of index!
This means that no index is created for the table, and at least one index is required for a table. This is a warning and it doesn't matter if you don't care!

8. When PDM is generated by CDM, the automatically generated foreign key is renamed.

PDM Generation Options-> Detail-> FK index names: % REFR % _ FK by default, changed to FK _ % REFRCODE %,

% REFRCODE % indicates the Relationship code in CDM! In addition, the automatically generated parent field rules are:

The default value set in PDM Generation Options> Detail> FK column name template is %. 3: PARENT % _ % COLUMN %,

You can change it to Par % COLUMN %, which indicates the parent field!


9. An error is reported when PowerDesigner generates an SQL statement.

◇ Problem description:
The SQL generation method is Database --> Generate Database (Ctrl + G), but the prompt is displayed.

Cocould not load VBScript engine.
Check VBScript installation.

Generation aborted due to errors detected during the verification of the model.

◇ Solution:
After checking for a long time, I found that I can remove the check model! Where,

Whether one file on needs to generate multiple SQL statements according to the table (optional by default, that is, not required)
Odbc generation SQL is directly generated into the database
Automatic archive generates an SQL statement and generates an apm file at the same time.

Check model

Powerdesigner defines the maximum length of table names, field names, and other names of each database. This length is used by powerdesigner for checking model, but the length of this definition

The actual allowed length of the database is not necessarily the same. If you want to pass the pd check, you can modify the settings in the pd. (The pd conventions for different databases are actually stored in an xml file.

, Extension:. xdb )! Or you can choose not to check the model when generating the database.
It is estimated that the default name length provided by pd is less than the allowed length of the database, which is a naming convention. The name should not be too long.

10. ModifyReportsDefinition of some terms in the template

That is, the file: C: \ Program Files \ Sybase \ PowerDesigner Trial 11 \ Resource Files \ Report documents ages \ Chinese. xrl
Tools-Resources-Report Languages ages-select Chinese-click Properties or double-click the target
Modify the names of some objects: Object Attributes \ Physical Data Model \ Column \
ForeignKey: foreign key
Mandatory: NULL
Primary: Primary Key
Table: Table
Replace "table" with "table" with "Search"
Modify the displayed content to another value: Values Mapping \ Lists \ Standard. Add the TRUE conversion column as yes, and the FALSE conversion column as null.
In addition, you can set the Title information in Report-Title Page.

11. ModifySQLScript format

If necessary, you can change the script format by modifying the template (Database-Edit Current DataBase. For example:
Add a line "-- % COLNNAME %" in the Value of Script-Objects-Column-Add to show the Chinese and English comparisons of columns in the Script.

12. allow different entities to have attributes with the same name

In model options, remove the unique code of the data item and allow reuse. Otherwise, attributes of the same name in different entities are considered to be the same data object,

Another change will also be followed. In most cases, this feature is not required. On the contrary, it will cause troubles. However, if different tables are allowed to have the same field name,

When creating a view, you must specify an alias for the repeated field names. There are advantages and disadvantages.

13. Do not create a table in the PDM.

Remove the Generate option from the General option of the object. Do not know if the same is true in PDM. You need to verify it.

14. A table is associated with many tables.

In the physical model, you can use Ctrl + M to create multiple shortcuts for a table with many associations, and then use Ctrl + mouse to drag the existing connection spear points.

15. Enter a large number of objects at a time.

To add multiple objects of the same type at a time, right-click the model name in the left-side window and select the object to be added in List.

The table is added with the downward key. You can also copy and paste conveniently.

By using the model check function, you can automatically check some problems in the model and select the automatic correction operation.

Sometimes the unique constraint keys automatically generated by PowerDesigner are repeated, and the duplicate keys cannot be checked out. You need to modify them manually.

16. Edit the view to delete useless Fields

It cannot take effect in the actual SQL statement.

When the as syntax is used in the field list of SQL Query, the Column names after the as cannot be synchronized on the Column page.

Create or replace view v1 (column1, column2,..., columnN)

...

/

If no inconsistency exists, the brackets are not generated.

17. Order of view creation in the database

The defined views may reference each other and must be created in strict order. Otherwise, errors may occur. However, powerDesigner cannot specify

The order of generation is arranged by view name.

In oracle, you can specify the view attribute force to true. In this way, no error is reported even if the referenced object in the created view does not exist.

18. Change the display format of digoal

Show Schema in digoal tables

Tools-> Display Preferences-> Object view-> Table, select the Owner.

By default, this only changes the current digrams. If you want To change other existing diagrams together, click Apply To in the lower left corner and select

Diagrams to be changed. If you want this change to be valid for all newly created Divs, click Set As Default.

The default References line is ugly

Tools-> Display Preferences-> Format-> Reference, click Modify, Line Style.-> Corners, select the second or

The third line format, OK exit. Too many columns in the table, resulting in too long objects in digoal

Tools-> Display Preferences-> Object view-> Table Columns, uncheck All Columns, select Limit,

The value is 10 or 20. You can also select PK Columns to show only primary keys, or select Key Columns to show only primary keys,

Foreign keys, alt keys, and other keys. Export the entire digoal or part of it as a graphic file

Select the object to be exported (select multiple objects with shift or highlight multiple objects with the mouse). If you Export the entire digoal, Ctrl + A and then Edit-> Export Image,

Select jpeg or png as the file type to save.

Modify Multiple object formats at the same time

If you select multiple objects by using the shift key and right-click the object and choose Format from the shortcut menu, multiple objects are not modified at the same time. However, you can use the Ctrl + T shortcut after selecting multiple keys.

Set Name Conversion

Set the conceptual model Entry to display only the primary key

Set to allow duplicate Relationship Codes

Set the surface modification model to allow Data Item Reuse

Data Item

It seems to be a feature of version 11. The model of version 9.5 does not have this option.

You can Reuse Data Item (Column) between different tables to implement one modification and take effect everywhere.

Reused Data Item. Modifying non-null constraints in one table is not reflected in other tables.

You can delete duplicate projects in the List Of Data items view.

19. How does PowerDesigner display comment options in the table during design?
Right-click an edited table and choose Properties> Columns> Customize Columns and Filter (or press Ctrl + U directly)> Comment (check in front)> OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.