PowerDesigner tutorial series (7) Conceptual Data Models

Source: Internet
Author: User

New Year's opening description:

I am very grateful to everyone for their attention to this series of tutorials. For many work reasons, I have never been able to calm down and organize new tutorials. I am worried that I have not understood them clearly and wrote them to mislead everyone, A few years later, I have recently received emails from many netizens asking me to continue writing. I still hope I can understand that I have not responded one by one. In the future, I will write an article every week, which is longer. I would like to thank the majority of users who are interested.

 

Objective: This article describes the definition and usage of inherited contact.

 

I,Definition

In addition to the connections we mentioned earlier, entities also have classification and inheritance relationships. In CDM, we collectively refer to classification and inheritance relationships as inheritance links.

 

The link between entity types generated by the special or generalized method is called the inheritance link.

Specialization: The process of grouping within an entity set and storing these groups in different entity types is called the specialization of an entity set.

Generalization: The process of abstracting a public object type from the public attributes of Multiple object sets is the generalization of the object set.

 

One end of the inheritance link is a universal entity set. It is a parent entity set, and the other end is a special entity set or multiple entity sets.

For example, "bank account" is the parent entity of "debit card account" and "credit card account". In contrast, "debit card account" and "credit card account" are the fruits of "bank account.

 

In addition, inheritance links can also be divided into mutual exclusion inheritance links and non-Mutual Exclusion inheritance links.

Mutual Exclusion inheritance link: one instance of the parent entity can only be in one child entity. For example, the relationship between the "Personal Account" and "company account" under the "Account" primary entity is mutually exclusive.

Non-reciprocal inheritance links: an instance of the parent entity can be in multiple child entities. For example, the "Cadres" under the "employee" parent entity and the "teacher" Child entity are not mutually exclusive inheritance links. Teachers may also be cadres, and cadres may also be teachers.

I will not illustrate it here. I hope you will understand the concept carefully.

 

II,Create an inherited contact

 

Note: In PowerDesigner 15, the Inheritance icon on the toolbar is disabled by default. The method is as follows:

Tools-> Model Options-> Model Settings-> Notation is set to "E/R + Merise.

Figure 1

Figure 2

Create two entities in CDM, A and B, and click the inheritance tool on the tool palette to connect the and B entities. Figure 1

A is the parent entity, and B is the Child entity. Create entity C and connect to entity C in the same way. As shown in figure 2, there is an inheritance relationship between B, C, and.

 

III,Define mutual exclusion inheritance links

Double-click the semi-circle symbol of the inherited contact to open the Properties window of the inherited contact. 3.

Figure 3

 

Mutually exclusive childrenIndicates that a record in the parent entity can only appear on one child entity, and there is a mutex between the child entities.

CompleteIndicates that all instances of the parent entity must be one of the Child entities. For example, the "person" entity has two child entities: "Man" and "woman, each "person" entity instance can be "man" or "woman ".

 

IV,Define the generation mode of the inherited contact

Figure 4

Define the mode in which the CDM generates the PDM or the class graph in OOM.

Note:

Generate parent: Indicates that the parent entity in the inherited link will generate a table in PDM or a Class in the Class diagram.

Generate children:

1) Select Inherit all attributes to generate a Class in the table or Class diagram of the Child body in the inheritance contact and Inherit all the object attributes in the parent object.

2) if you select Inherit only primary attributes, it indicates that the sub-entity is inherited to generate the Class in the table or Class graph in PDM, but only inherits the identifier attribute in the parent entity.

 

V,Inherited contact status table

Figure 5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.