Home >Common Problem >The e-r model reflects the database application system

The e-r model reflects the database application system

(*-*)浩
(*-*)浩Original
2019-07-23 15:25:217124browse

The entity-relationship model (referred to as the E-R model) provides a user-oriented expression method that is not restricted by any DBMS and is widely used as a data modeling tool in database design.

The e-r model reflects the database application system

ER model, the full name is entity relationship model, entity relationship model or entity relationship diagram (ERD) (English: Entity-relationship model) by a Chinese-American Invented by computer scientist Chen Pinshan, it is a data model or pattern diagram used for high-level description of conceptual data models. (Recommended learning: PHP video tutorial)

ER models are often used in information system design; for example, they are used to describe information requirements and/or to be stored in the conceptual structure design stage The type of information in the database.

But data modeling technology can be used to describe any ontology (that is, an overview and classification of the terms used and their connections) in a specific domain of discourse (that is, the 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 to a logical model such as a relational model; this in turn is mapped to a physical model during physical design. Note that sometimes these two phases are referred to together as "physical design."

Entity Relationship Diagram (ERD) has some conventions. There are some concepts more typically employed in logical and physical database design, including information engineering, IDEF1x (ICAM DEFinition Language), and spatial modeling.

The conceptual data model is a user-oriented and real-world data model that has nothing to do with DBMS. It is mainly used to describe the conceptual structure of a unit.

Using the conceptual data model, database designers can focus on understanding and describing the real world at the beginning of the design, while deferring some technical issues involving the DBMS to the design stage. consider.

The ER model contains three types of elements: entities, relationships, and attributes

1. Entities: Entities are the primary data objects, often used to represent a person, A place, thing or event. A specific entity is called an entity instance (entity instance or entity occurrence). Entities are represented by rectangular boxes, with the name of the entity identified within the box. Generally, the first letter of a name word is capitalized.

2. Relationships: Relationships represent the connection between one or more entities. Relationships depend on entities and generally have no physical conceptual existence. Relationships are most commonly used to represent one-to-one, one-to-many, and many-to-many correspondences between entities. The composition of the relationship is a diamond shape, and the name of the relationship is generally a verb.

The endpoint of the relationship is connected to the role. In general, the role name can be omitted because the entity name and relationship name can clearly reflect the concept of the role, but in some cases we need to mark the role name to avoid ambiguity.

3. Attributes: Attributes provide detailed description information for entities. An attribute of a specific entity is called an attribute value. The attributes of the Employee entity may include: emp-id, emp-name, emp-address, phone-no…. Attributes are generally represented as ovals and connected to the described entity.

Attributes can be divided into two categories: identifiers and descriptors. Identifiers can uniquely identify an instance (key) of an entity and can be composed of multiple attributes. In ER diagrams, attribute names are identified by underlining them.

Multivalued attributes (multivalued attributes) are connected to entities with two lines, eg: hobbies attributes (a person may have multiple hobbies, such as reading, movies...). Complex attributes themselves have other attributes.

Distinguish strong entities and weak entities: Strong entities have unique identifiers inside. Weak entities have identifiers derived from one or more other strong entities. Weak entities are represented by double-lined rectangular boxes and depend on strong entities for their existence.

For more PHP related technical articles, please visit the PHP Graphic Tutorial column to learn!

The above is the detailed content of The e-r model reflects the database application system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What network is cmcc?Next article:What network is cmcc?