PowerDesigner is a powerful modeling tool software that is one of the most famous modeling software in the world, with Rose as a rival. Rose is a modeling tool that specializes in the UML object model before it is modeled on the database, and PowerDesigner is the opposite of it, which started as a database model and later developed into a comprehensive case tool.
PowerDesigner is divided into 7 types of modeling files:
1. Conceptual data Model (CDM)
Modeling data and information, using entity-Relationship diagram (e-r) Form to organize data, verify the validity and rationality of data design.
2. Logical data Model (LDM)
PowerDesigner 15 new models. The logical model is an extension of the conceptual model, which represents the logical order between concepts and is a model that belongs to the method hierarchy. In detail, the logical model shows the relationships between entities, attributes of entities, and entities, as well as inheritance, references in entity relationships, and so forth in the attributes of entities. The logical model is between the conceptual model and the physical model, with the characteristics of the physical model, the many-to-many relationships in the conceptual model, which will be implemented by adding a one-to-many relationship between the intermediate entities in the logical model.
The logical model is mainly to make the whole concept model easier to understand, at the same time do not rely on the detailed database implementation, using the logical model can generate a detailed database management system physical model. The logical model is not required throughout the step, and can be generated directly from the conceptual model.
3. Physical data Model (PDM)
Based on the specific DBMS, the design is based on the conceptual data model and logical data model. The database is generated by the physical data model, or the database is reverse-engineered to get the physical data model.
4. Object-oriented model (OOM)
Includes all the common graphics of UML: Class diagram, object graph, package diagrams, use case diagram, time series 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 a software system.
5. Business Process Model (BPM)
BPM describes the various internal tasks and internal processes that describe the business, and how customers interact with these tasks and processes. BPM is a conceptual model of business logic and rules from the point of view of a business partner, using a graph to describe the interactions between narrative procedures, processes, information, and cooperation agreements.
6. Information flow model (ILM)
ILM is a high-level information flow model that is primarily used for data replication between distributed databases.
7. Enterprise Architecture Model (EAM):
From the business layer, the application layer and the technical layer of the Enterprise's architecture to carry out a full description. Includes: Organization chart, business communication diagram, process diagram, City plan diagram, application frame composition, service oriented diagram, technical framework diagram.
is the so-called "工欲善其事 its prerequisite", PowerDesigner is a powerful "artifact", if you can freely, and then body bosom "peerless martial Arts", then you basically encounter God killed the Buddha to kill God!
About the basic use of PowerDesigner physical data model, I do not talk about it 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 use and techniques I would like to highlight.
1. Generating SQL scripts
Database→generate Database
Select the file path that you want to output, which is the file storage path, and then generate the SQL script when you click OK, depending on the file name you need to change.
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 enables 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. table field Design Form displays comment to write gaze
Double-click a table to open the Properties form for a table →columns tab → Click the second last icon in the top row (Customize Columns and Filter) → Tick Comment
4. Change the field name of the table when code does not actively follow the change
Tools→general Options ... →dialog→ uncheck name to Code mirroring
5. Conversions 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 ... → Change 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 → change name and code→ (selection tab → Select table to generate the object model) → OK
Double-click the generated table's class diagram to open the properties form → Select all fields → change the field visibility all to private→ click below add...button→ select Get/set operations→ OK
Then generate the code to: Language→generate Java code ...
"Note: There are differences in different language Add...button, such as C # is the property"
6. Generating Database Documents
Report→generate Report ... → Select generate rtf→ change Repor namet→ language selection chinese→ Select file storage location → OK
PowerDesigner also provides document editing features: Report→reports ... → Click on the new report icon → Change repor namet→ language selection chinese→report Template Select Full Physical report
After that, you can open the document editing form, just for the length of the text here will no longer specify how to edit, let's see for yourselves.
8. How to set up the self-increment primary key
Double-click the table to open the properties form → Tick the P primary key check box → Double-click the field that is set as the primary key (double-click on the row's head) or click the property icon above button→ under the open form (note that different databases, SQL Server is the Identity check box) Select Sequence, If not, click the New button next to create a sequence.
9. How to build a view
Toolbar Click View button→ create view → Double-click the view to open the Properties form, where usage indicates whether the view is read-only or updatable. Suppose we just create a generic view, then select the query only option.
Switch to the SQL Query tab, where you can set the SQL queries that define the view, preferably not using * when defining the view, and instead use each of the required column names, so that each column is visible in the columns of the view properties. Click Edit with SQL Editorbutton in the lower right corner to eject the SQL editor and write the SQL statement. SQL statements can also be generated using other SQL statement generators.
10. How to build an index
Double-click a table to open the properties form → Select indexes tab → new index → Double-click the index to open the Properties form
Select the Columns tab → Click the Add columns icon button→ Select the field to be indexed → OK
The column definition is not selected here, and it conflicts with the primary key.
11. How to create a stored procedure
toolbar, click procedurebutton→ to create a stored procedure → Double-click the stored procedure open properties form → Select the Definition tab, in the drop-down list box, there are two options, default Procedure, default function, The former is the definition process, the latter is the attribute function, the system will create a template of the SQL statement according to the type of selection → Edit the stored procedure script.
The above is the PowerDesigner physical model of the most important content, in fact, this is only a bucket, just involved a model, there are many other models worthy of our study, here to really say comprehensive words, that a blog must not tolerate, need serial.
PowerDesigner really very powerful, use it to design UML the same very cow fork, we have time really should learn this tool how to make, suppose possible, I may in the future blog post introduced how to use PowerDesigner Design object Model UML, or do not really want to serialize Oh. So little look forward to it!
PowerDesigner Using Tutorials