[ER diagram of database design]

Entity relationship model, entity relationship model or entity relationship schema diagram (ERD) was invented by Chinese-American computer scientist Peter Chen. It is a data model or schema diagram used for high-level description of conceptual data models. A data model in the form of an entity relationship schema diagram provides a graphical notation. Such data models are typically used in the first phase of information system design; for example, they are used in the requirements analysis phase to describe information requirements and/or the type of information to be stored in the database. But data modeling techniques can be used to describe any ontology (that is, an overview and classification of the terms used and their connections) for a particular domain (that is, an area of ​​interest). In the case of database-based information system design, at a later stage (often called logical design), the conceptual model is mapped onto a logical model such as a relational model; it in turn is mapped onto the physical model during physical design. Note that sometimes these two phases are referred to together as "physical design".

 

ER diagram is divided into three core parts: entity, attribute and relationship. Entities are rectangular representations, properties are ovals, and relationships are rhombus.



 

 

The entity of the ER diagram is the data object in the data model, which is represented by a cuboid. Each entity has its own entity member or entity instance.

 

 

The attribute of the ER diagram is the attribute of the data object. For example, the student has attributes such as name, student number, grade, etc., which are represented by an ellipse. Attributes are divided into unique attributes and non-unique attributes. Unique attributes refer to Is the only attribute that can be used to identify the instance or member of the entity. It is represented by an underscore. Generally speaking, an entity has at least one unique attribute.

 

 

 

The relationship of the ER diagram is used to express the relationship between data objects and data objects. For example, there is a certain relationship between the entity of the student and the entity of the grade sheet. Each student has its own grade sheet, which is a kind of Relationships are represented by diamonds.



 

 

There are three types of association relationships in the ER diagram:

 

1 to 1 (1:1) : 1 to 1 relationship means that for entity set A and entity set B, each entity in A has a relationship with at most one entity in B; otherwise, each entity in entity set B has a relationship Has a relationship with at most one entity in entity set A.

 

1-to-many (1:N) : 1-to-many relationship means that entity set A has a relationship with at least N (N>0) entities in entity set B; and each entity in entity set B is at most related to entity set A. An entity has a relationship.

 

Many-to-many (M:N) : Many-to-many relationship means that each entity in entity set A has a relationship with at least M (M>0) entities in entity set B, and each entity in entity set B has a relationship Has a relationship with at least N (N>0) entities in entity set A.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326321110&siteId=291194637