Forwarding: Common settings for PowerDesigner (reference learning to draw class diagrams, er diagrams, etc.)

Source: Internet
Author: User
Tags sybase powerdesigner

1. Error (Oracle) occurs when a field exceeds 15 characters when generating a table script from PDM
The reason is unknown, the solution is to open the PDM, the database will appear in the menu bar, into the Database-edit current Dbms-script-objects-column-maxlen, the value is adjusted to large (formerly 30), For example, change to 60. This error can be found in the length of the table or other object, and the corresponding objects may be changed in this way!
Or use the following method:
Generate a table script will pop up the database generation prompt box: The Options-checkmodel small hook to remove, is not to check (not recommended)!
Or you can modify the C:\Program files\sybase\powerdesigner Trial 11\resourcefiles\dbms\oracl9i2.xdb file
When the CDM is changed to PDM, select "Copy the DBMS definition Inmodel" to copy the resource file into the model.

2. How do I remove the double quotes of the object in the generated build table script?

Open the CDM case, enter Tools-model options-namingconvention, set the name and code of the label Charctercase option to uppercase or lowercase, as long as it is not mixed Case on the line!
Or choose Database->edit Currentdatabase->script->sql->format, there is a casesensitivityusingquote, it's comment for " Determines if the case sensitivity for identifiers ismanaged using Doublequotes ", indicates whether double quotation marks are used to specify the casing of the identifier, you can see the values on the right of the default value of" YES ", instead of" No "!
Or in the case of turning on PDM, go to Tools-model options-namingconvention and set the charcter case option for name and code to uppercase!

3. Why a existence ofindex warning is detected when a table is established

A table should contain at least one column, one index, one Key,and one reference.
You can not check existence of index This, there is no such warning error!
It means that the table is not indexed, and a table generally has at least one index, this is a warning, no tube is not related!

4, create a table when modifying the field, a change in the name of the content, code also changes, how to let code does not change with the name

There is a button "=" on the right side of name and code, so if you need to get out of sync, just pop the button up.
Tools->generaloptions->dialog->name to Codemirroring (remove)

5. Auto-generated foreign key renaming when PDM is generated by CDM

PDM Generation options->detail->fkindexnames Default is%REFR%_FK, change to fk_%refrcode%, where%refrcode% Refers to the code! of relationship in CDM In addition, the rules for automatically generated parent fields are set in PDM generationoptions->detail->fk column nametemplate, which is%.3:parent%_%column% by default and can be changed to par% column% represents the parent field!

6, how to prevent a one-to-two relationship to generate two references (foreign key)

To define the dominant direction of the relationship, the dominant entity (with the D flag) becomes the parent table.
Double-click on one-to-one relationship in CDM->detail->dominantrole select dominance Relationship

7, modify the definition of some terms in the report template

i.e. file: C:\Program files\sybase\powerdesigner Trial 11\resourcefiles\report languages\chinese.xrl
Tools-resources-report languages-Select chinese-Click Properties or double-click the target
Modify the name of some objects: Object attributes\physical Data model\column\
ForeignKey: Foreign key
Mandatory: Empty
Primary: Primary Key
Table: Tables
Replace "table" with "tables" with Find and replace
Modify the contents of the display to something else: valuesmapping\lists\standard, add true conversion column Yes, false conversion column empty
In addition Report-title page can set the title information

8. Modify SQL script formatIf necessary, you can change the format of the script by modifying the template (Database-edit current Database). For example:
Add a line "--%colnname%" to the beginning of the value of Script-objects-column-add to display the columns in the script in both Chinese and English9, double quotation mark problemFor case insensitive Database(such as Oracle), Powerdesign automatically adds double quotation marks to the table name and field name when creating the script, obtaining case sensitivity in a "strong string" form, which makes it a lot of trouble to write SQL statements. Remove this add-on function:
Database-〉edit Current DBMS-〉script.-〉sql-〉format-〉casesensitivityusingquote
Right panel parameter values value Select No10. Allow different entities to have the same name attributeIn the model options, remove the unique code for the data item and allow two options for reuse.Otherwise, the same name attribute in different entities is considered to be the same data object, and another change will follow. This feature is not required in most cases, but it can cause trouble. However, if you allow different tables to have the same field names, you will need to specify aliases for the duplicate field names when creating the view. The pros and cons ah. 11. The CDM-designed entity does not generate tables in PDMIn the general option of the entity, remove the Generate option, and do not know if this is the case in PDM, which needs to be verified.12. Very many tables associated with a tableIn the physical model, for a table with very many associations, you can use Ctrl+m to create multiple shortcuts to the table, and then use CTRL + Mouse to drag the existing join spear points.13. Type very many objects at onceIf you need to add more than one object of the same type at a time, you can right-click the model name in the left-hand window and select the list of objects you want to include, so you can use the DOWN ARROW key in a list, or you can easily copy and paste. Using the function of the model check, you can The dynamic check model has some problems, and can choose the automatic correction operation. Sometimes the PowerDesigner automatically generated unique constraint key will repeat, and the duplicate key can sometimes not be checked out all, need to manually modify.14. Edit View Delete useless fieldsWhen you edit a view, you cannot delete useless fields in the Column tab, you can only go to the SQLQuery page for editing, and the order of changing fields on the column page cannot take effect in the actual SQL. When using the as syntax in the SQLQuery field list, Sometimes changing the column name after the as is not synchronized in the column page, causing the actual column name in the CREATE view to be inconsistent with the one you want. You can check the preview tab to see if this happens, and when there are inconsistencies, the SQL in preview uses this format: Create or Replace View v1 (column1, Column2, ..., columnn) as.../If there is no inconsistency, the parentheses are not generated.15. The order in which views are created in the databaseThe defined views may have referential relationships with each other and must be created in a strict order of precedence, otherwise there will be an error, but PowerDesigner cannot specify the order in which the view SQL is generated, and the build order is scheduled with the view name. If you are in Oracle, you can specify the properties of the View force True so that objects that create a view reference do not have an error if they do not exist.16, change the display format of diagramIn diagram tables, display Preferences->object view, Schematools, select Owner. By default, this only changes the current diagram if you want a To change other established diagrams, click the ApplyTo button in the lower left corner and select the diagrams you wish to change. If you want this change to be valid for all new diagram, click button Set Asdefault. The default references lines are hard to see tools, Display Preferences->format, Reference, click Modify,line style.-> Corners, Select the second or third polyline format, OK to exit. There are too many columns in the table, resulting in diagram objects too long tools, Display Preferences->object view, table, Tablecolumns,uncheck all Columns, Select Limit, with a value of 10 or 20. You can also choose the PK Columns only show primary keys, or select Key Columns only show primary keys, foreign keys, Altkeys and other keys. Export the entire diagram or part as a drawing file select the object to export (with shift multiple selection, or the mouse is highlighted multiple), if you export the entire diagram Ctrl + A, and then edit-> export Image, file type select JPEG or PNG, Save. Modify multiple object formats at the same time if you use the SHIFT key to select more than one, and then right-->format, multiple objects are not modified at the same time. However, when multiple is selected, you can use the Ctrl+t shortcut key. Set the naming transformation settings conceptual model entry only show primary key settings allow Relationship code duplicate name setting the change surface model allows the data item Reusedata item to appear to be a feature of version 11, The original version of the 9.5 model does not have this option to reuse Data Item (Column) between different tables, allowing for a modification to take place everywhere. Reused Data Item, the non-null constraint is modified in one table and is not reflected to other tables.

You can delete duplicate items in the list of Data item view.

Forwarding: Common settings for PowerDesigner (reference learning to draw class diagrams, er diagrams, etc.)

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.