PowerDesigneris a very powerful modeling tool software, enoughRoseShoulder, is also one of the most famous modeling software today.Roseis a special attackUMLObject model modeling tools, and then develop models to databases, andPowerDesigneris just the opposite of it. It starts with a database to build a model. Later, it developed into a comprehensive comprehensiveCaseTools.
PowerDesigneris mainly divided into7species modeling file:
1. Concept data model (CDM)
Model data and information, and use the entity–Relationship diagram (E-RFigure) The form of organization data to test the effectiveness and rationality of the data design.
2. logic data model (LDM)
PowerDesigner 15 New model. The logical model is an extension of the concept model, which means that the logical order between concepts is a model that belongs to the method level. Specifically, on the one hand, the logic model shows the relationship between the entity, the attributes of the entity, and the entity, and on the other hand, it will be displayed in the attributes of the entity in the entity. The logical model is between the concept model and the physical model. It has the characteristics of physical models. The multiple -to -multi -relationships in the concept model will be realized in the logical model in the way of adding a pair of relationships in the middle entity.
logic models mainly make the entire concept model easier to understand, and at the same time does not depend on specific database implementation. Using logic models can generate physical models for specific database management systems. Logic models are not necessary throughout the steps, and they can generate physical models directly through concept models.
3. physical data model (PDM)
DBMS, design on the basis of concept data models and logical data models. The database is generated by a physical data model, or a physical data model is obtained from reverse engineering on the database.
4. Object -oriented model (OOM)
UMLAll the common graphics: class diagram, object diagram, package diagram, use diagram, time order diagram, collaboration diagram, interaction diagram, activity diagram, status diagram, component diagram, composite structure diagram, deployment diagram (configuration diagram).OOM Essentially a static concept model of the software system.
5. Business program model (BPM)
BPM Describe various internal tasks and internal processes of the business, and how customers affect each other with these tasks and processes. BPM is the concept model of business logic and rules from the perspective of business partners. Use a chart description program, process, information and cooperation protocols.
6. Information flow model (ILM）
ILMis a high -rise information flow model, which is mainly used for data replication between distributed databases.
7. Enterprise architecture model (EAM）：
The system structure of the enterprise from the business layer, application layer, and technical layer. Including: organizational structure diagrams, business communication maps, procedures, urban planning diagrams, application architecture diagrams, service maps, and technical basic framework diagrams.
2,PowerDesignerPhysical data model use
1. Start using nowPowerDesignerCreate a database,First run the program,Enter the main interface:
2. File—New Model—Physical Data Model—Physical Diagram—Model name Set totest,DBMSProperties set toMicrosoftSQL Server 2010:
3. First create a table template with a form tool.
4. Double -click the table template,Setting attribute,SettingsThe attribute of thetable.
5. Set the table name,ClickColumnslabel,Set field attributes.
6. because ofDeviceIDField we need to set it toautomatic growth,So set its advanced attribute,SelectionDeviceIDfield,Click the attribute button,GeneralCheckpiece in the panelIdentitycheck box:
CommentRemarks are used to write remarks information. Remarks information will also be generatedsqlIn the script.
7. Create anotherpersonTable.
8. Set the reference relationship between tables to create an outer key for the table.
1) Select the reference icon.
2) Left button drag the mouse. Starting from the table that needs to be added to the end of the main table of the outer key.
9. How to create a view
The view in the toolbar (view) button→Create view→Double -click the view to open the attribute window, of whichUsageDoes the view indicate that the view is only read or updated. If we only create general views, then choosequery onlyoptions.
Switch toSQL Querytab, you can set a definition view in the text boxsqlQuery statement, it is best not to use when defining the view*, instead of using the names required, so that in the view attribute
You can see each column inColumns. Click the lower right cornerEdit with SQL Editorbutton, you can pop upSQL EditorEditor, writingSQLstatement. Can also use othersqlstatement generator generationsqlstatement.
10. How to establish an index
Double -click to open the attribute window→Indexestab→New index→Double -click the index to open the attribute window
SelectionColumnstab→ClickAdd Columnsicon button→Select fields to establish indexes→OK
HereColumn definitionDon’t choose it, conflict with the main key.
11. How to establish a storage procedure
Tap in the toolbarProcedurebutton→Create storage procedures→Double -click storage procedure to open the attribute window→SelectionDefinitiontab, where there is in the drop -down list box, there isDefault Procedure、Default FunctionThese two options, the former is the definition process, the latter is an attributive function, and the system will createSQLstatement template→Edit Storage Subject Script.
12.Generate database script,execution operation:Database—Generate Database,Set the storage procedure to export the directory and file name,Click OK.
3,PowerdesignerPDMModel andCDMModel conversion between models
menuToolGenerate to Conceptual Data ModelsThere are also shortcuts above:ctrl＋shift＋c Ifcdmturnpdm：ctrl＋shift＋p
Four,PowerDesignerSummary of the problem during the use process
1．PowerDesignerDo not use it when connecting the databaseodbc,UseJDBCODBCThere are problems.
2．PowerDesignerNot supportJDK64 , so you need to use itJDK32bit, otherwise it will appearcouldnot initialize JVMproblem.
3．None SQL error:could not find the com.MySQL.jdbc.Driver class ,The reason isPowerDesignerJDBCThe support is not good, you need to configure in the environment variableclasspath5mysql jdbc jarpackage path,and do not appear in the path.
4．PowerDesigner Check the model error “constraint nameuniqueness”
PowerDesignerThe same constraint names are the same, as long as the name is changed. Double -click constraint, 0 Integrity tab under the tab constraint name Modify the name.