Document directory
- 1. Cracking and Installation
- 2. Reverse Engineering the database
- 3. modify Database Information
- 4. Report Generation Environment
- 5. Create and modify databases from PDM
- 6. Problems
- 7. Other skills
- 8. Disadvantages
1. Cracking and Installation
Address 1: http://www.99d.com/down/173/486854.html
Address 2: http://club.topsage.com/thread-2073507-1-1.html
1. Install Sysbase PowerDesigner 15.1.
2. Copy pdflm15.dll to the installation directory.
3. restart the computer.
Chinese (optional)
1. Back up the files to be written in the root directory.
2. Copy the Chinese files to the installation directory.
For existing PD database files, see step 1.
2. Reverse Engineering the database to create a PDM (Physical Data Model ).
1. Select New Model to open the Model creation option window, for example:
2. Select Model types, select Physical Data Model in the Model types list, and finally select Physical digoal. In the Model Name field, enter the PDM Name. In the DBMS field, select "Share the DBMS definition ."
3. Click OK to complete the PDM creation process.
Establish Database Connection
Menu "Database" à "Connect ...", The following page is displayed:
If no ODBC data source exists, configure the data source.
(Note in SQL2005) When configuring ODBC, after two "Next" buttons are connected, select the "change default database as" check box on the 3rd page, this problem occurs when you select the database you want to Reverse from the Database List. If you cancel the selected status of the "change default database to" check box, the problem is solved !!!
Select MSSQL2000 and specify the default database.
Select "ODBC machine data source" and click "Configure" (configuration process omitted)
Reverse engineering databases
After the Database connection is established, select "Database" à "Update Model from Database ..."
Click OK.
In MSSQL2005, because no default database exists, you need to select a database.
In this dialog box, select the desired view, trigger, and stored procedure.
Click "OK" to reverse engineer the database.
3. modify Database Information Database
Double-click PDM on the left. The following dialog box is displayed to modify the database information.
Data Table
Field
Set the Primary key (Primary). In the Custom column information, select Primary.
SET Index)
Set Key)
Modify Field Default Value
In, select the column for which you want to modify the Default value, click the first small icon (Properties), and enter the Default value on the Standard Checks page.
Custom column information
In, click customize Column and Filter ).
4. Report Generation Environment
There are two ways to generate a report. We use the second method to output the report.
Create a report
Menu Report -- à Report...
Click the second icon New Report.
Enter the report name, select Simplified Chinese in the language bar, and click OK to design the new report.
4. for example, in the left and right sections and in the Aavailable area, select the item you want to display in the Word document. Here we select List of Tables and List of Table Columns [data Table information]. you can also add other elements.
Save the report.
In the main window menu, select Report -- à Generate Report...
Set the corresponding settings and click OK.
Then a Chinese design document for the RTF database is generated.
Create a report from a Report Template
Copy the Report template MyReportTemp. rtp to the \ Resource Files \ Report Templates directory under the installation path. Choose Report> Generate Report> Report Template, select a Report Template, set the Template, and click OK.
5. Create and modify databases from PDM
Create a database
Menu Database -- à Generater Database.
Note: In the Option page, remove the User selection box. (Because the Default User dbo already exists and cannot be deleted)
Modify Database
Menu Database -- à Update Model Change to Database...
Select the number, generate a database modification script, and execute the script to modify the database.
6. Problems
Garbled text in the output of the Chinese Report Template
Select a Chinese Template, right-click Properties, and select None for the Template on the RTF Format page.
PD does not support SQL Server 2005. What should I do?
I encountered a strange problem when I tried PD12 two days ago. I don't know if it's a PD12 BUG. The process is as follows:
The background database is upgraded from SQL2000 to SQL Server 2005 (Simplified Chinese Version). Because PD11 does not support SQL2005, the trial version of PD12 is downloaded from Sybase. It is found that PD12 cannot Reverse the database!
PD can be used for Reverse engineering. There are two parts: (1) File-Reverse Engineer-Database. This function is mainly used to convert the Reverse engineering of the Database structure into a PDM design document, which is generally used only once, later design changes will be made directly on PDM. (2) open a PDM and click Database-Reverse Engineer Database in the menu. This function is mainly used to compare the structural differences between the PDM document and the actual Database, so as to facilitate synchronization between the two.
Now the database is changed to SQL2005, PD is changed to V12 (there are two versions on the Sybase website, 12.0 and 12.1. I have tried them and they all have the same problem ), the prompt "Unable to list Tables" is displayed during Reverse, and the user Tables in SQL2005 cannot be listed! The direct consequence is that the structure difference between the PDM design document and the SQL2005 database cannot be compared!
Fat Liu
2006.10.16
========================================================== ======================================
In a coincidence, I found a solution to the problem.
How did the above problem come about?
When configuring ODBC, after two "Next" buttons are connected, select the "change default database to" check box on the 3rd page, this problem occurs when you select the database you want to Reverse from the Database List.
If you cancel the selected status of the "change default database to" check box, the problem is solved !!!
The same operation can be performed in the PD11 and SQL2000 environments. Therefore, when the partner is upgraded to PD12 and SQL2005, errors may occur if the partner still follows the previous habits. It's not a BUG !!!
Share your lessons with you.
Fat Liu
2006.10.16
7. Other skills
Cancel name and code Association
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 signing ing], by default, the name and code are synchronized. just remove the check box above.
Association between Name and Comment
When PowerDesigner is used to design conceptual and physical models for databases, it generally writes Chinese in NAME or Comment and English in Code. Name is used for display. Code is used in Code, but the text in Comment is saved to the database Table or Column Comment. It is very troublesome to write Comment again when Name already exists, you can use the following code to solve this problem:
·Code 1: COPY the characters in Name to Comment
·'************************************** ****************************************
'* File: name2comment. vbs
'* Purpose: Database generation cannot use object names anymore
'In version 7 and above.
'It always uses the object codes.
'
'In case the object codes are not aligned with your
'Object names in your model, this script will copy
'The object Name onto the object Comment
'The Tables and Columns.
'
'* Title:
'* Version: 1.0
'* Company: Sybase Inc.
'*************************************** ***************************************
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl 'the current model
'Get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model"
ElseIf Not mdl. IsKindOf (PdPDM. cls_Model) Then
MsgBox "The current model is not an Physical Data model ."
Else
ProcessFolder mdl
End If
'This routine copy name into comment for each table, each column and each view
'Of the current folder
Private sub ProcessFolder (folder)
Dim Tab 'running table
For each Tab in folder. tables
If not tab. isw.cut then
Tab. comment = tab. name
Dim col 'running column
For each col in tab. columns
Col. comment = col. name
Next
End if
Next
Dim view 'running view
For each view in folder. Views
If not view. isw.cut then
View. comment = view. name
End if
Next
'Go into the sub-packages
Dim f'running folder
For Each f In folder. Packages
If not f. isw.cut then
ProcessFolder f
End if
Next
End sub
--------------------------------------------
In addition, when the reverse engineer is used to REVERSE generate PDM from the database, the NAME and CODE of the Table in PDM are actually CODE. To replace the NAME with the Chinese Comment of Table or Column in the database, you can use the following script:
·Code 2: COPY the characters in Comment to Name
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl 'the current model
'Get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model"
ElseIf Not mdl. IsKindOf (PdPDM. cls_Model) Then
MsgBox "The current model is not an Physical Data model ."
Else
ProcessFolder mdl
End If
Private sub ProcessFolder (folder)
On Error Resume Next
Dim Tab 'running table
For each Tab in folder. tables
If not tab. isw.cut then
Tab. name = tab. comment
Dim col 'running column
For each col in tab. columns
If col. comment = "" then
Else
Col. name = col. comment
End if
Next
End if
Next
Dim view 'running view
For each view in folder. Views
If not view. isw.cut then
View. name = view. comment
End if
Next
'Go into the sub-packages
Dim f'running folder
For Each f In folder. Packages
If not f. isw.cut then
ProcessFolder f
End if
Next
End sub
-----------------------------------------------------------------------
The above two sections of code are all VB scripts. The usage in PowerDesigner is as follows:
PowerDesigner-> Tools-> Execute Commands-> Edit/Run Scripts
Copy the code and execute it. The operation is performed on the entire CDM or PDM.
8. Disadvantages
1. The default data cannot be generated because it is only a modeling tool.