ERTU. The database model starts from here and er starts here.

Source: Internet
Author: User

ERTU. The database model starts from here and er starts here.

Today, Zibin's senior brother asked me to design a database table for the project first. I 'd better draw an erfigure. ERTU: I know what it is, because I used to take database and Application water courses. But I forgot about it now. I asked du Niang What is ERTU? Du Niang told me that "The E-R Diagram, also known as the Entity Relationship digrams, provides a way to represent the Entity type, attributes, and associations, A conceptual model used to describe the real world ".

There are three components:

1. Use a rectangle to indicate the real shape, and specify the entity name in the rectangle;

2. Use an ellipse to represent the attributes of an object and connect it with the corresponding real shape with an undirected edge;

3. use a diamond to indicate the relationship between the real shapes, specify the contact name in the diamond box, and connect them with the non-directed edges, and specify the contact type, 1: n or m: n ).

Generally, someone may be wondering for a while at the last, 1: n, m: n. I don't have to worry about it. Please refer --

Indicates the one-to-one relationship between the two. For example, each citizen has only one ID card number and a valid ID card number corresponds to only one citizen.

1: n refers to a one-to-many relationship. For example, each student can have more than one pen, but each pen can only have one master (except for the special case of shen me gui ).

M: n? It refers to many-to-many relationships, so who is active and passive? By the way, the edges in the erdiagram are all undirected edges, so I have this question, or else I will be clear directly, the first-to-many relationship above is obviously the one party is "active". What about here? Here is the one that marks m as active !!! For example, a salesperson can take charge of multiple commodities, and a commodity can be sold by multiple salespeople. This is a many-to-many relationship. Who is active and passive here should be able to easily agree? So in the corresponding ER diagram, it should be clear who is marked by mn respectively?

Okay, I won't map it here. Du Niang said that he (attention is this ta) has many ~

Related Article

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.