Source: http://jbeduhai.iteye.com/blog/338579
As the picture is not displayed, please download the attachment if you want to see the contents and picture details.
PowerDesigner Data Model (conversion process for cdm-pdm-sql scripts)
In the development process will often encounter to do a module function, first of all, you need to draw a e-r diagram first,
A lot of friends are not very familiar with the E-r map, or some friends in the development of the project process, there is no use of E-r map, because some of the e-r map is not very familiar with the friends feel the picture e-r figure not to do:
Personally, I've compiled some information about the description of the E-r diagram and the usage examples: Hopefully, it's helpful to the friends who are not very familiar with E-r map ....
The conceptual data model, also known as the information model, is based on the entity-contact (entity-relationship, abbreviation e-r) theory and
A theory has been expanded. It models the information from the user's point of view and is mainly used in the conceptual design of the database.
Often people first abstract the real world into a conceptual world and then turn the conceptual world into a machine world. In other words, the first thing
Objective objects in the real world are abstracted as entities (entity) and linkages (relationship), which do not depend on specific computer systems
Or a DBMS system, this model is what we call CDM; then convert the CDM to a DBMS on the computer
Supported data models, the model is the physical data model, the PDM,
For a detailed description of the E-r diagram theory, please also learn some relevant information
Here is a simple use of my personal e-r diagram,
If you have a different opinion, please ask ....
(1). Open PowerDesigner file-new pop up the following window
is PowerDesigner CDM (conceptual data Model-conceptual
(2). Adding entity classes:
<1> In the graphics window of the CDM, click the Entity tool on the Tools tab, and then click in the blank space of the graphics window to
A solid symbol appears at the location of the hit. Click the Pointer tool or right-click the mouse to release the Entitiy tool.
<2> Double-click the entity symbol you just created to open the following icon window, where you can enter the name of the entity in the "General" tab of the window.
Code, description, and other information.
Adding entity Properties
1) on the "Attribute" tab of the above window, you can add properties as shown in.
2)
Add entity such as:
The Entity properties are:
For specific configuration information about the entity, please review the introductory information on this, which I will not explain in detail here.
Establish contact
A contact (relationship) is a connection between an entity set or an internal instance of an entity set.
Entities can be interconnected by contact. corresponding to the entity and entity set, the contact can also be divided into contact and contact sets, linked
A set is the connection between entity sets, which is the connection between entities, and the linkage is directional. Contact and contact set in meaning
A clear case can be called contact.
Depending on the number of instances in the entity type, you can usually divide the relationship into 4 classes, i.e. one to one
Contact, one-to-many, multi-pair (many to a) contact and many-to-many contacts (many
To many).
In the CDM tool palette, in addition to the common tools, other object generation tools are included as shown.
After you create two entities in the Graphics window, click the Establish contact between Entities tool, click an entity, press the left mouse button
And then drag the cursor to the other entity and release the left mouse button, which creates a connection between the two entities, right-click the diagram
window to release the Relationship tool. As shown
Create a relationship icon |
Once you have established a connection between two entities, double-click the contact line to open the Contact Properties window.
The link between "employee" and "contact" two entities is a one-to-many connection, in other words the link between "contact" and "employee" is a multi-pair
System. And a contact must belong to an employee, and belong to only one employee, cannot belong to 0 employees, so from the "contact" entity
To the "employee" entity's base is "four", from the other side of the contact to consider, an employee can have more than one contact, or no contact, that is, 0 contact, so the direction of the base of the link is "0,n",
Once you have established a connection between two entities, double-click the contact line to open the Contact Properties window.
The link between "employee" and "contact" two entities is a one-to-many connection, in other words the link between "contact" and "employee" is a multi-pair
System. And a contact must belong to an employee, and belong to only one employee, cannot belong to 0 employees, so from the "contact" entity
To the "employee" entity's base is "four", from the other side of the contact to consider, an employee can have more than one contact, or no contact, that is, 0 contact, so the direction of the base of the link is "0,n",
To this: CMD has been built;
Here's how to build: PDM--click: tools->generate physical Data Model such as:
Or: Press the CTRL+G key
Pop-up window:
Generate such as PDM
Contact table: Fk foreign key relationship is due to the establishment of the relationship after the automatic generation of
Generate SQL Script: Ctrl +g key
Summary: cdmàctrl+g = pdmàctrl+g = SQL script
If you want to generate an OOM-and-click Tool-->generage object-oriented Model
- PowerDesigner data Model conversion. RAR (723.7 KB)
- Download number of times: 1075
Reprint-PowerDesigner (conversion process for cdm-pdm-sql scripts)