Conceptual Data Model
The conceptual data Model (conceptual data MODEL,CDM): Expresses the overall logical structure of the data, which is independent of any software and data storage structure, that is, it is just a common language for system analysts, application designers, maintenance personnel and users to understand each other. does not target specific database platforms (such as Oracle or SQL Server) and tools (PowerBuilder). The objects contained in the CDM are not usually implemented in the physical database.
CDM can accomplish the following tasks:
- Data visualization, visualization
- Legal verification of data table design
- Convert to PDM (physical data model, physical models)
- Generating a class diagram for Oom (object-oritented model, object-oriented models)
The CDM typically uses the entity-Contact diagram (entity-relation graph,e-r) to represent (the concept of "entity" and "contact"). At present, E-r diagram is one of the most popular forms of expression of CDM.
1. Basic concepts and conventions
1.1 Entities and attributes
Entities are "objects" in the real world that can be distinguished from other objects, which may be tangible or intangible, concrete or abstract, of life or inanimate.
Each entity has a set of characteristics, called an attribute of the entity, that describes the state and characteristics of the entity. Such as: An employee, name: Hanging silk, sex: Male, these indicators represent the various properties of the hanging wire entity.
The relationship between the entity and the attribute is shown in 5-1.
Figure 5-1
1.2 Contact
Entities can be interconnected by contact (relationship). Depending on the number of entities that correspond, you can usually divide the contact into one-to-one contact (one to one), one-to-many contacts (one to many), many-to-many connections (many to many), recursive contact (Recursive relationship), and identity relationships ( Identify relationship) and so on.
Multi-to-many contact recursive contact
1.3 Domains
Domain is the range of values for one or some of the attributes that can be used by the attribute sharing of multiple entities after the domain is defined, and the domain definition is important in the design of the model, making it easier to standardize attributes in different entities.
1.4 Business Rules
Business rules reflect the special data integrity constraints of the objects described in the information system. A business rule can be an industry standard, a customer requirement, or a software development specification manual. When the information contained in the entity changes,
The system checks whether the information violates specific business rules. Therefore, before you create a business rule, you must first identify the constraint relationships that exist between the data.
2. Building a conceptual model
2.1 Identifying Business Issues
Business process issues have been identified in BPM, on the basis of which the information needed to be stored is refined. These include business-related entities, relationships between entities, special business rules, and so on. These issues will be the basis for the establishment of CDM.
2.2 Building a conceptual model
(1) Select the File-new model command and pop up the window shown in 5-2. Select the conceptual Data model (conceptual model).
Figure 5-2
(2) Click the "OK" button to open the CDM workspace shown in 5-3. The workspace includes the left side of the browser window, the right side of the design window, the lower side of the Output window and the Floating tool window (Palette), which can be used to design the E-r diagram in the Design window using the icon in the tool window.
Figure 5-3
(3) Establish linkages between entities and entities.
3.CDM Generating LDM
LDM is a new model of PowerDesigner 15, which is used to complete the logical design of information systems. Although LDM is still independent of the DBMS, it is possible to design objects such as external keys, indexes, views, and so on.
The specific method for generating LDM for CDM is as follows:
(1) Open the CDM model and select the tools-generate Logical Data Model command to open the LDM Generation options (Generate LDM option Settings) window shown in 5-4.
Figure 5-4
(2) Select the Detail tab to set other options.
(3) Select the Selection tab and you can select CDM, entity, 5-5 as shown.
Figure 5-5
(4) Click the OK button to start the LDM generation. As shown in 5-7.
Figure 5-7
Note: The main content of LDM is between CDM and PDM.
4.CDM Generating PDM
CDM is the summary design of the information system, but in the physical design phase of the database must be based on the detailed background design, only the transformation of the CDM to PDM to complete the design work of this stage. Before the CDM generates PDM, a DBMS must be selected as the target database, and the data type of the entity attributes defined in the CDM will be converted to the data type of the target database pair.
When the CDM generates PDM, the objects in it are converted to objects in PDM, that is, objects in the physical database.
The specific process for generating PDM in CDM is as follows:
(1) Open the CDM model and select the tools-generate physical Data Model command to open the window shown in 5-8. In the General option, choose how and when to generate the PDM. Selecting the Generate new physical Data Model radio button indicates that a new Pdm,dbms is generated to represent the target database management system (and version), name indicates the target PDM, and code represents the target PDM. Selecting the update existing physical Data Model radio button indicates that a new PDM is generated with the existing PDM merge.
Figure 5-8
(2) Select the Detail tab for detailed selection settings.
(3) Select the Selection tab and select the entity that you want to convert to the PDM table, as shown in 5-9.
Figure 5-9
(4) Click the "OK" button to start the PDM generation. If you select the Check model checkbox in the Detail tab, the result List window displays warnings, errors, and hints that occur during processing.
(5) Follow the prompts to modify the warnings and errors that appear.
(6) Generate pdm5-10 as shown. If the information displayed in PDM is too large to read, you can reduce information by changing the Tools-display Preferences command settings.
Figure 5-10
5.CDM Generating Oom
When an oom is generated from the CDM, PowerDesigner transforms the objects and data types in the CDM into OOM objects and data types that are supported by the UML language.
The specific steps for the CDM to generate Oom are as follows:
(1) Open the CDM model and select the Tools-generate object-oriented Model command to open the window shown in 5-11.
Figure 5-11
(2) Select the Detail tab to set other options.
(3) Select the Selection tab to select CDM, Package and entity.
(4) Click the "OK" button to begin generating Oom. The effect is as shown in 5-12.
Figure 5-12
6. Summary
The above through the CDM to generate LDM,PDM and oom model, just to transform the system's outline design into related content, for the detailed audit of the system generated a framework, and then need to LDM,PDM and oom further design, such as: add stored procedures in PDM, triggers, design use case diagram in Oom, etc.
PowerDesigner (v)-Conceptual data model (CDM-generated LDM,PDM and Oom) (RPM)