Use PowerDesigner,
PowerDesigner is a powerful modeling tool software that is sufficient to match Rose. It is also one of the most famous modeling software today. Rose is a modeling tool that specializes in UML object models and then develops to database modeling. PowerDesigner is just the opposite. It started with database modeling, it was later developed into a comprehensive Case tool.
PowerDesigner consists of seven types of modeling files:
1. Conceptual Data Model (CDM)
Modeling of data and information, using the form of entity-relationship diagram (E-R diagram) to organize data, test the effectiveness and rationality of data design.
2. Logical Data Model (LDM)
The model added by PowerDesigner 15. A logical model is an extension of a conceptual model, indicating the logical order between concepts. It is a model at the method level. Specifically, the logical model shows the relationship between the attributes of the entity and the object. On the other hand, the inheritance and reference in the object relationship are displayed in the attributes of the object. The logical model is between the conceptual model and the physical model. It has the characteristics of the physical model and has many-to-many relationships in the conceptual model, the logical model will be implemented by adding a one-to-multiple relationship to the intermediate entity.
The logical model makes the entire conceptual model easier to understand and does not rely on specific database implementations. The logical model can be used to generate a physical model for a specific database management system. The logical model is not required in the entire process. You can use the conceptual model to generate a physical model.
3. Physical Data Model (PDM)
It is designed based on the conceptual data model and Logical Data Model Based on a specific DBMS. The physical data model generates a database, or reverse engineering the database to obtain the physical data model.
4. object-oriented model (OOM)
Contains all common UML diagrams: class diagram, object diagram, package diagram, use case diagram, sequence diagram, collaboration diagram, InterAction diagram, activity diagram, state diagram, component diagram, composite diagram, and deployment diagram (configuration diagram ). OOM is essentially a static conceptual model of a software system.
5. Business Program Model (BPM)
BPM describes different internal tasks and internal processes of the business, and how the customer interacts with these tasks and processes. BPM is a conceptual model of business logic and rules from the perspective of business partners. It uses a chart to describe the interaction between programs, processes, information and cooperation protocols.
6. Information Flow Model (ILM)
ILM is a high-level information flow model used for data replication between distributed databases.
7. Enterprise Architecture Model (EAM ):
Describes the enterprise's architecture from the business layer, application layer, and technology layer. Including: organization diagram, Business Communication diagram, process diagram, urban planning diagram, application architecture diagram, service-oriented diagram, and Technical Basic Framework diagram.
PowerDesigner is a powerful "artifact". If you can use it freely, you can use it with the power of a secret ", then you will be killed by God and then by Buddha!
About the basic use of PowerDesigner physical data model, I don't talk nonsense here, give a connection, people on earth read all know: http://www.cnblogs.com/huangcong/archive/2010/06/14/1757957.html
The following describes some advanced usage and skills.
1. generate an SQL script
Database → Generate Database
Select the file path to be output, that is, the file storage path, and modify the file name as needed. Click OK to generate an SQL script.
On the Options tab, you can customize the selection and configuration of SQL scripts, such as canceling foreign keys and removing drop statements.
On the Selection tab, you can select the tables to generate SQL scripts.
On the Preview tab, You can Preview the SQL script to be generated.
2. Convert all nouns into uppercase letters
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 table Properties window → Columns tab → click the second to last icon (mimize Columns and Filter) → select comment
4. When the field Name of the table is modified, the Code does not automatically change.
Tools → General Options... → Dialog → uncheck Name to Code encoding ing
5. Conversion between different databases
Database → Change Current DBMS → select the target Database to be converted
6. Import the SQL script to generate the corresponding database table model Diagram
File → Reverse Engineer → Database... → modify the module name and select DBMS
Using script files → click the icon below (Add Files) to Add an SQL script file → OK
7. The object model is generated by the physical model and the corresponding get and set methods are generated.
Tools → Generate Object-Oriented Model... → Select language → modify Name and Code → (Selection tab → select the table for which the Object Model is to be generated) → OK
Double-click the class chart of a generated table to open the Properties window → select all fields → change the field Visibility to private → click the Add... button below → select Get/Set Operations → OK
Then Generate the Code: Language → Generate Java Code...
[Note: The content under the Add... button in different languages is different, for example, C # is Property]
6. Generate database documents
Report → Generate Report... → select Generate RTF → modify Repor namet → select Chinese → Select File storage location → OK
PowerDesigner also provides the document editing function: Report → Reports... → click the New Report icon → modify Repor namet → select Chinese language → Report template select Full Physical Report
Then you can open the document editing window, but we will not detail how to edit it here. Let's take a look.
8. How to create an auto-increment primary key
Double-click the table to open the Properties window → select the P primary key check box → double-click the field set as the primary key (double-click the row header) or click the attribute icon above → select sequence under the open window (note that different databases are different, SQL server is the identity check box). If not, click the new button next to it to create a sequence.
9. How to Create a view
In the toolbar, click view> Create view> double-click view to open the attribute window. 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. In the text box, you can set SQL Query statements for the definition view. It is best not to use * when defining the view. Instead, you should use the column names required, in this way, you can see each column in the Columns of the view attribute. Click the Edit with SQL Editor button in the lower-right corner to pop up the SQL Editor and write SQL statements. You can also use other SQL statement generators to generate SQL statements.
10. How to create an index
Double-click a table to open the Properties window → select the Indexes tab → create an index → double-click the index to open the Properties window
Select the Columns tab → click the Add Columns icon → select the field to be indexed → OK
Here, Column definition is not selected and will conflict with the primary key.
11. How to Create a stored procedure
Click the Procedure button in the toolbar → create a stored Procedure → double-click a stored Procedure to open the Properties window → select the Definition tab. In the drop-down list box, there are two options: Default Procedure and Default Function, the former is the definition process, and the latter is the attribute function. The system will create a template for the SQL statement based on the selected type → edit the Stored Procedure script.
The above is the main content of the physical model of PowerDesigner. In fact, this is only a small drop in the ocean. It only involves a model. There are many other models worth learning. If we want to make it comprehensive, that blog post must be unable to accommodate and need to be serialized.
PowerDesigner is really powerful. It is also awesome to design UML with it. You should learn how to use this tool if possible, I may introduce how to use PowerDesigner to design the object model UML in my blog post in the future, or if it is hard to do so, it will really be a problem. So let's look forward to it!
Source: http://blog.csdn.net/wangpeng047/article/details/7164643