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 ~