Design a conceptual model in PowerDesigner

Source: Internet
Author: User

The conceptual model involves the following operations and settings: Entity, Attribute, Identifiers, Relationship, and Inheritance), Association, and Association Link ).

Entity

Entities are the objects we abstract. For example, in a course selection system, students, teachers, classes, and courses are all entities. An object attribute is a simple attribute contained in an object. For example, a student entity has attributes such as student ID, name, birthday, and gender. In addition, the entity also has a unique identifier for each entity instance. For example, the student ID can be used as the entity identifier in the Student Entity. An identifier can be an object attribute or a combination of multiple attributes. Create a new conceptual model in PD. a toolbar is displayed as follows to design the model in the design panel.

Click the Entity icon, and click it once in the design main panel to add an object. Click the Mouse icon to switch back to the normal mouse mode. Double-click an added object to bring up the object property Setting Dialog Box. In General, you can set attributes such as Object Name and Code ,:

You can switch to the Attributes tab to set the object Attributes such as Name, Code, and DataType. There are three check boxes on the right. M indicates that the object cannot be empty, and P indicates that the object is an identifier attribute, D Indicates whether to display in the model diagram. If you select the P check box of StudentID directly when setting the attribute, the system will automatically generate an Identifier for the Student object.

If you do not want the system to automatically generate but set it manually, switch to the Identifiers tab, add a line of Identifier, and click the "attribute" button in the upper left corner, then, click "add row" in the pop-up identity attribute Settings dialog box and select the attributes used in the identity. For example, you can set the student ID to the student entity ID. The specific operation is as follows:

The entire set object:

Link

A link is used to indicate the correspondence between an object and another object. It can be divided into one-to-one (), one-to-many (1: n), multiple-to-one (n: 1 ), many-to-many (m: n) Four mappings. one-to-many and multiple-to-one are actually in the opposite direction, so they are actually one-to-one, one-to-many, and many-to-many.

 

 

 

 

 

The most common one is one-to-many. For example, the class entity and the Student Entity are one-to-many relationships. A class has multiple students and only one student belongs to one class. Add a Class entity to the design panel, click the Relationship button in the toolbar, click the Class entity, and then click Student, you can establish a one-to-many relationship between the Class and Student,

By default, the system will give the link a Name named Relationship_1. Switch to the mouse pointer mode. Double-click Relationship_1 to open the Properties window of the link. You can modify the Name and Code of the link on the General tab,

Switch to the Cardinalities tab. You can modify the relationship between one-to-many and many-to-many. The following Role name does not make much sense, that is, the text is displayed in the model, and the multiple sides have 0, n and 1, n are two types. That is to say, a class can correspond to multiple students, so the minimum number of students in a class is no student or at least one student, the same one has two types: And. That is to say, if a student does not belong to any class, it must belong to an existing class. Here we choose at least 1, so the final setting Interface

Inheritance

The inheritance in the conceptual model is the same as the inheritance in the OO model. It is to abstract an object. After other entities inherit the object, they have the attributes of the object.

Taking the course selection system as an example, there are student entities, teacher entities, and others are people and people attributes, so we can abstract a person's entity, A person has attributes such as gender, birthday, name, and so on. A teacher has a title, employee ID, and other attributes which are not available to students. Therefore, a student cannot be placed in a person entity. A student does not have a student ID.

 

 

This is only a conceptual model. DBMS does not inherit this concept. Therefore, in the subsequent logical and physical models, the system will convert the inheritance into actual entities and tables. This is only a conceptual model, so there is an inheritance statement.

Association)I don't know which word is better to translate it into Chinese, so I will use "Link" for the time being.

Association is also a connection between entities. In the method theory of the Merise model, Association is a connection used to represent different entities of clearly defined objects, this connection is expressed only by another entity but not by Event connection.

That is to say, there is a relationship between the object and the object (many to many), but there are other attributes of this relationship, if these attributes are not very suitable to be expressed as an explicit entity, Association is used to express them. The relationship between these attributes is generally an "Event" virtual entity, that is,VerbCorresponding entity.

The above may still be too abstract. The actual example shows that a student entity has a course entity. A student can choose multiple courses and multiple students can attend the course in one course, therefore, there is an Association of "Course Selection", which records the time and status of the Course Selection:

One student union selects multiple courses for multiple course selection results, and one course corresponds to multiple course selection students. Therefore, the relationship between the student entity and the course selection is one-to-many, and the association connection is added, A course may be too boring to be selected by no student. Therefore, the corresponding course selection may be 0 or n. A student may have enough credits for one course this semester, therefore, the corresponding Course Selection for students may also have a relationship of 0 and n, so we finally formed the conceptual model:

This is a complete conceptual model. The next step is to generate a logical or physical model based on the conceptual model.

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.