Database Design-example of applying conceptual models to the first stage of Database Design in Power Designer (I)

Source: Internet
Author: User

 

Summary: For database design, we generally start from the conceptual model. In the conceptual model design phase, we focus on analyzing the logical structure of data to avoid getting into the specific storage details, all designs are irrelevant to specific database products to be used in the future. This article is suitable for readers who have mastered the basic database design theory or have practical experience and intend to use power designer for aided design. In addition, it is a great honor to get criticism and correction from you!

Copyright Disclaimer: This article can be reproduced at will. During reprinting, you must mark the original source and author information in the form of a hyperlink.
Source: http://www.aiview.com/v_3/focus/pd_conceptual_model.htm
Author: Zhang Yang alex_doesathotmail.com
Last Updated: 2004-11-19

Directory
  1. Who should read this article
  2. Create a conceptual model
    • Define entity
    • Define Link
  3. Reference resources
Who should read this article

This article is suitable for readers who have mastered the basic database design theory or have practical experience and intend to use power designer for aided design.

If you are already a skilled user of Power Designer or want some database design theories, skip this article.

If you still do not know the basic design theories of databases, such as relational models and paradigms, and are interested in the database design field, it is best to lay a good foundation first, first look for the relevant information above, even excellent auxiliary design tools cannot replace us in designing a standardized model.

Create a conceptual model

For database design, we generally start from the conceptual model. In the conceptual model design phase, we focus on analyzing the logical structure of data to avoid falling into specific storage details, all designs are irrelevant to specific database products to be used in the future.

Assume that you have installed power designer 9.5. If you have not yet obtained the software, please download the trial version from the Sybase website. Run the program, use "Ctrl + N" to create a model, select "conceptual data model" in the pop-up window, and click "OK ".

A new conceptual model is added under the current workspace node in the browser on the left side of the window. A default conceptual map diagram_1 is automatically created and has been opened in the current work window. A conceptual model can have multiple such conceptual diagrams. You can specify one of them as the default values in the model attributes.

The workspace has a component panel that contains various symbols that can be used in the conceptual model. The most common ones are Entity and relationship, for example:

Define entity

Double-click the object symbol to go to the object attribute page.

  1. General Project

    Name: identifies an object in the model and is generally used for displaying the model on the interface (this can be changed by changing the option settings ). In a model, Entity names cannot be repeated.

    Code: It is generally used as the physical name of an object during model conversion. For example, if you convert the code of an object attribute to a column name in a database, you do not have to worry about what the object will be called in the future, generally, use the same name.

    Generate: the default state is selected. If the State is canceled, this entity is ignored when it is converted to another model.

  2. Attributes Project

The items in the table below in the window are very similar to the definition of a table structure, but the data type is abstracted and uses an independent representation method, which is not related to any specific database system.

Add attributes for the current object in this project.

The following three columns of checkbox represent:

  • M: This attribute cannot be null.
  • P: This attribute is the primary key identifier.
  • D: Display Property

Click "crtl + u" to call out the "Custom column filter" window. You can select the ones listed in the window and hidden ones based on your preferences and actual needs. Use the shortcut key "crtl + E" to allow or disable the current filter.

We renamed the above two entities as department and employee respectively, and added the attributes respectively, for example:

By default, the concept chart only shows the attributes marked as the primary key and hides the data type. This is to make the concept chart more concise and easy to understand. You can use the options to change these display configurations.

Define Link

Double-click the relationship symbol to go to the link property page. In the detail project, we can define the relationship between two entities in detail, for example:

  1. General Project

    In this example, the business relationship is described as follows: a department has multiple employees, and we use "has" as the name of the relationship.

    We can also describe that multiple employees belong to one department. Can we use "belong to" as the relationship name? It is generally not recommended to do this. In the concept diagram, there is an agreement that the name of the link is from "1, meaning of reading from "1" to "N. In this example, "1" is on the department side and reads the semantics from the Department one to the employee side, that is, the Department has multiple employees (has.

  2. Detail Project

Assume that the relationship between the Department and the employee is as follows:

  • A department may have multiple employees, and a new Department may not have any employees;
  • An employee must belong to only one department at the same time;

Based on the above relationship, we modify the property page. The default direction of department-employee is 0, N, and the direction of employee-department is changed to mandatory ), or select "" from the drop-down list, for example:

The last defined relationship is shown in the concept diagram as follows:

Note: In Power Designer, a "horizontal line" near the object represents a mandatory constraint, and "hollow circle" represents no mandatory constraint, that is, this party can have no object Association; the "non-branch" line represents the relationship of "1", and the "branch" line represents the relationship of "many. The above four symbols can combine 16 types of relationships (including reverse ). The relationship of "many-to-many" is generally decomposed by providing an intermediate entity. Therefore, in many conceptual charts, the actual "many-to-many" relationship does not exist.

In addition, there are two items in the Link Attributes: dominant role and dependent, which can represent more complex relationships, which will be discussed later.

(To be continued)

 

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.