Tips for powerdesigner

Source: Internet
Author: User
Tags powerdesigner

1. Install PD v11.0

2. When the table creation script is generated by pdm, an error occurs when the field exceeds 15 characters (oracle)
The cause is unknown. The solution is to open the PDM and the menu bar of the Database appears. Go to Database-Edit Current DBMS.
-Script-objects-column-maxlen: Increase the value (Originally 30), for example, to 60. The length of a table or other objects is also incorrect.
You can select the corresponding objects to change this method!

Or use the following method:
When the table creation script is generated, the Database generation prompt box will pop up: remove the options-check model, that is, do not check (not recommended )!
Alternatively, you can modify the C: Program FilesSybasePowerDesigner Trial 11 Resource filesdbms1_l9i2. xdb file.
After modification, when cdm is converted to pdm, select "Copy the DBMS definition in model" to Copy the resource file to the model.

3. How do I remove the double quotation marks of an object from the generated table creation script?
When cdm is enabled, go to Tools-Model Options-Naming Convention and set the Charcter case option of the Name and Code labels to Uppercase or Lowercase, as long as it is not a Mixed Case!
Or choose Database-> Edit current.
Database-> Script-> SQL-> Format, there is a CaseSensitivityUsingQuote, its
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 the identifier. You can see that the default value of values on the right is" YES "and change it to" No!
Alternatively, when pdm is enabled, go to Tools-Model Options-Naming Convention and set the Charcter case option of the Name and Code labels to Uppercase!

4. 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!

5. When creating a table to modify a field, the code of the table changes as soon as the name is changed. How can I keep the code unchanged?
There is a button "=" on the right side of the Name and Code. If you do not need to synchronize, you can just pop up the button.
Tools-> General Options-> Dialog-> Name to Code sorting (remove)

6. When PDM is generated by CDM, the automatically generated foreign key is renamed.
PDM Generation Options-> Detail-> FK index
By default, names is % REFR % _ FK and changed to FK _ % REFRCODE %. % REFRCODE % indicates the Relationship code in CDM!
In addition, the rule for automatically generated parent fields is PDM Generation Options-> Detail-> FK column name.
The default value set in the template is %. 3: parent % _ % column %. You can change it to PAR % column % to indicate the parent field!

7. How to Prevent one-to-one relationship from generating two references (Foreign keys)
To define the dominant direction of the link, the dominant entity (with the d sign) becomes the parent table.
Double-click the one-to-one relationship in CDM-> detail-> dominant role to select the dominant relationship

8. modify the definition of some terms in the Report Template
That is, file: C: Program filessybasepowerdesigner trial 11 Resource filesreport extends ageschinese. XRL
Tools-resources-Report languages ages-select Chinese-click Properties or double-click the target
Modify the name of some objects: Object attributesphysical data modelcolumn
Foreignkey: foreign key
Mandatory: NULL
Primary: Primary Key
Table: Table
Replace "table" with "table" with "Search"
Modify the displayed content to another value: Values mappinglistsstandard. Add the true conversion column as yes, and the false conversion column as null.
In addition, you can set the title information in the report-title page.

 

========================================================== ====================================

 

Powerdesign is mainly used for DBMS configuration.
1. Modify the table creation script generation rules. If each table has the same field, you can modify it as follows:
Database-> edit current DBMS expand script-> Object-> table-> Create to see the value in the lower right corner. You can directly modify the value as follows:/* tablename: % tname % */
Create Table [% qualifier %] % table % (
% Tabldefn %
TS char (19) null default convert (char (19), getdate (), 20 ),
Dr smallint null default 0
)
[% Options %]

The Ts and Dr columns are automatically inserted into each table when an SQL script is generated, the % tname % variable adds a name value comment to the SQL statement of each table.

2. Modify the field generation rules. To add a comment for each field, expand the value of script-> Object-> column-> Add in the same window:

% 20: column % [% compute %? As (% compute %): % 20: datatype % [% identity %? % Identity %: [% null %] [% notnull %] [Default % default %]
[[Constraint % constname %] Check (% constraint %)]/* % colnname % */

% Colnname % indicates the column name value (which can be Chinese)

3. Modify the foreign key naming rules. Choose database> edit current DBMS.
Select Scripts-> Objects-> Reference-> ConstName
The Value on the right is:

FK _ %. U8: CHILD % _ %. U9: REFR % _ %. U8: PARENT %

It can be seen that the naming method is: 'fk _ '+ 8-seat table name + 9-digit Reference name + 8-digit parent table name. You can customize the following mode:

FK _ %. U7: CHILD % _ RELATIONS _ %. U7: PARENT %,

You can change the FK name to FK_TABLE_2_RELATIONS_TABLE_1.
After mastering this method, you can modify it according to your own ideas.

The header comment in the SQL file of the Database creation script is annoying. You can select the Options card in the Databse-> Generate Database (Ctrl + G) window and remove the Usage Title hook option.

4. Add a foreign key
Model-> References: Create a foreign key and double-click it to enter the foreign key attribute. In the "Joins" card, select the foreign key field of the sub-table.

5. Remove the double quotation marks of the generated SQL Script: ORACLE 8I2: Script/SQL/Format/CaseSensitivityUsingQuote to No. The default value is Yes, so there will be double quotation marks.

When changing the name, the code value will change, which is inconvenient. Modification Method: Modify the Options menu in PowerDesign, in [Tool] -->
[General Options]-> [Dialog]-> [Operating modes]-> [Name to Code
Caching ing]. By default, the name and code are synchronized. just remove the check box above.

6. solutions to the problem of the same name in the Powerdesgner Data Model Design
By default, PowerDesigner does not have entity attributes with the same name in CDM. This is also due to possible name conflicts such as primary key foreign keys.
Timing, the same data item may be used multiple times to facilitate understanding of each object. Therefore, you need to change the settings of PowerDesigner. The default value is DataItem.
You must perform the following operations to reuse (duplicate names:

Select Tools-> Model Options. In the Model Setting directory, deselect the Unique Code under Data Item. By default, Unique Code and Allow Reuse are selected.

 

========================================================== ====================================

At the same time, this setting is intended for a specific model, that is, it is valid for the current model. If you want this setting to be available in other models, you need to reset it. But in Check
If you select "Check all" for "Model", an error message with the same DataItem name will still be reported. If you want to manually Check and confirm that the data item is correct, you can select an incorrect one.
DataItem is not checked, and various data types match each other (only common corresponding types in SQL Server are provided here, and other DBMS can use similar processing)

1. How to create an index under PowerDesigner
2. How to create an auto-increment column under PowerDesigner
3. How to check the design model under PowerDesigner

1. How to create an index under PowerDesigner
1. Double-click the Table design drawing and click "Table Properties". On the Tab page, select "Indexes ".

2. Click the attribute of the new index. Indexex Properties is displayed.

3. Add an index Field

2. How to create an auto-increment column under PowerDesigner
Use the following statements in the SQL Server database to complete
In the table creation statement, add the following
IDENTITY (1, 1)
You can also use the following statement to reset the auto-incrementing seed.
Dbcc checkident (ConfigSys, reseed, 0 );

3. How to check the design model under PowerDesigner
1. Select Tools-Check Model in the menu bar, as shown in figure

2. Select each setting to be checked.

3. Confirm and check the summary of the results.

 

Source: http://hi.baidu.com/3zrj/blog/item/d399652ff7738b574fc226f8.html

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.