PowerDesigner is a powerful modeling tool software that is one of the most famous modeling software in the world, alongside Rose. Rose is a modeling tool that specializes in UML object models, and then builds on the database, and PowerDesigner, in contrast, started with database modeling and later developed into a comprehensive case tool.
PowerDesigner is mainly divided into 7 modeling files:
1. Conceptual data Model (CDM)
Modeling data and information, using the form of entity-Relationship diagram (E-R diagram) to organize data and verify the validity and rationality of data design.
2. Logical data Model (LDM)
PowerDesigner 15 New model. The logical model is an extension of the conceptual model, representing the logical order between concepts, which is a model of the method hierarchy. In particular, the logical model shows the relationship between entity, entity and entity, on the other hand, the inheritance, references in entity relations, etc. are shown in the attributes of the entity. The logical model is between the conceptual model and the physical model, has the physical model aspect characteristic, in the conceptual model's many-to-many relations, in the logical model will increase the middle entity the one-to-many relation way to realize.
The logical model is to make the whole conceptual model easier to understand and not depend on the specific database implementation, and the logical model can be used to generate the physical model for the specific database management system. The logical model is not necessary in the whole step, and can be generated directly through the conceptual model.
3. Physical data Model (PDM)
Based on the specific DBMS, the design is based on the conceptual data model and the logical data model. A physical data model is generated from the data model, or the database is reverse-engineered.
4. Object oriented model (OOM)
Contains all the common graphics of UML: Class diagram, object graph, package diagrams, use case diagram, sequence diagram, collaboration diagram, interaction diagram, activity diagram, state diagram, Component diagram, composite structure diagram, deployment diagram (configuration diagram). OOM is essentially a static conceptual model of software systems.
5. Business Process Model (BPM)
BPM describes the various internal tasks and internal processes of the business, and how customers interact with these tasks and processes. BPM is a conceptual model of business logic and rules from a business partner's point of view, using a diagram to describe the interaction between programs, processes, information, and cooperation protocols.
6. Information flow model (ILM)
ILM is a high-level information flow model that is used primarily for data replication between distributed databases.
7. Enterprise Architecture Model (EAM):
A full description of the enterprise architecture from the business layer, application layer, and technology layer. Includes: Organization chart, business communication diagram, process diagram, City Plan chart, application frame composition, service-oriented diagram, technology base frame.
Is the so-called "工欲善其事 its prerequisite", PowerDesigner is a powerful "artifact", if you can freely, and then with "unparalleled martial arts", then you basically encounter God to kill the Buddha.
About the basic use of the PowerDesigner physical data model, I have no nonsense here, give a connection, the Earth people read all know: http://www.cnblogs.com/huangcong/archive/2010/06/14/1757957.html
Here are some of the more advanced types of usage and techniques I am highlighting.
1. Generate SQL Script
Database→generate Database
Select the file path to output, the file storage path, and modify the file name as needed, and then click OK to generate the SQL script.
In the Options tab, you can personalize and configure SQL scripts, such as canceling foreign keys, removing drop statements, and so on.
The Selection tab allows you to select which tables to generate SQL scripts for.
On the Preview tab, you can preview the SQL script that will be generated.
2. Convert all nouns to uppercase
Tools→model Options ... →naming Convention→code→uppercase.
3. The Table field Design window displays comment to write comments
Double-click the table to open the Properties window for the table →columns tab → Clicking the second last icon (Customize Columns and Filter) → Checkmark comment
4. When modifying the field name of a table, code does not automatically follow the change
Tools→general Options ... →dialog→ uncheck name to Code mirroring
5. Conversion between different databases
Database→change current dbms→ Select the target database to convert to
6. Import SQL script to generate the corresponding database table model diagram
File→reverse engineer→database ... → Modify module name and select DBMS
Using script files→ Click on the icon below (add files) to add the SQL script file → OK
7. Generate the object model from the physical model and generate the corresponding get, set method
Tools→generate object-oriented Model ... → select language → modify name and code→ (selection tab → Select table to generate object model) → OK
Double-click the class diagram of a generated table to open the Properties window → select all fields → change the field visibility all to private→ click Add below ... button → Select Get/set operations→ ok
Then generate code: Language→generate Java Code ...
"Note: Different languages add ... The contents of the button are different, such as C # is property "
6. Generate Database Documentation
Report→generate ... → Select generate rtf→ Modify Repor namet→ language selection chinese→ Select file storage location → OK
PowerDesigner also provides document editing features: Report→reports ... → Click New to edit the icon → modify repor namet→ language selection chinese→report template Select Full physical
You can then open the Document editing window, but the space is no longer detailed instructions on how to edit, let's take a look at it.
8. How to create a self-added primary key
Double-click the table to open the Properties window → Tick the P primary key check box → Double-click the field that is set as the primary key (double click on the head of the line) or click the Top property icon button → Under the open window (note that the SQL Server is the identity check box for different databases) select sequence, If not, click the New button next to create a sequence.
9. How to build a view
Click the View button in the toolbar → create a view → Double-click the view to open the Properties window, where usage indicates whether the view is read-only or updatable. If we only create a general view, select the query only option.
Switch to the SQL Query tab, where you can set up SQL queries that define the view, preferably not with * when you define the view, and you should use each column name you want so that you see each column in the columns of the view properties. Click the edit with SQL Editor button in the lower-right corner to eject the SQL Editor editor and write the SQL statement. You can also use other SQL statement generators to generate SQL statements.
10. How to build an index
Double-click the table to open the Properties window → Select the indexes tab → create a new index → Double-click the index to open the Properties window
Select Columns tab → Click the Add Columns icon button → Select the field you want to index → OK
The column definition is not selected here and will conflict with the primary key.
11. How to establish a stored procedure
Click the Procedure button in the toolbar → create a stored procedure → Double-click the stored procedure to open the Properties window → Select the Definition tab, which in the Drop-down list box has the default Procedure, default function, which is the defining procedure , the latter is the Attributive function, the system will create the SQL statement template → edit stored procedure script according to the chosen type.
The above is the PowerDesigner physical model of the main content, in fact, this is just bucket, only just involved a model, there are many other models worth our learning, here to really speak comprehensively, that a blog will not be enough, need to be serialized.
PowerDesigner is really very powerful, using it to design UML is also very fork, we have time really should learn how this tool to make, if possible, I may in the future posting introduced how to use the PowerDesigner design object Model UML, or do not really want to serialized, Oh. So little look forward to it.
Add:
1, in the PDM model, when the two-table relationship is established, it is like the following cascading relationship:
Double-click the association relationship between 2 Tables pop-up table Information window, select the Identity tab to see the following are several parameters, meaning: None: Parent table modification, child table does not affect. Restrict: The parent table is modified and an error occurs if the child table exists. Cascade: Parent table modification, if child table exists, modify accordingly. Set null: The parent table is modified, and if the child table exists, the corresponding null is placed. Set default: The parent table modifies the default value if the child table exists.
Turn from: http://www.cnblogs.com/langtianya/archive/2013/03/08/2949118.html