Entity-relationship model

We show the basic characteristics of one of the most used conceptual models.

This model is obtained at database design time. It was proposed by Peter Chen in 1976 and since then it has been used in a very global way.

It is characterized by using a series of symbols and rules to represent data and their relationships.

With this model we can graphically represent the logical structure of a database.

The main elements of the entity-relationship model are the entities with their attributes and the relationships between entities.

Elements of the entity-relationship model

Entity

It is an object from which information of interest to the database is collected. Graphically they are represented by a rectangle. An example would be the bank entity, where the data related to that bank would be collected, such as the name, the branch number, the address, etc.

Within entities they can be strong or weak. The strong ones are those that do not depend on other entities to exist, while the weak entities always depend on another entity but do not have meaning by themselves.

Relationship

We can define relationship as an association of two or more entities. Each relationship is assigned a name to be able to distinguish it from the others and to know its function within the entity-relationship model. Another characteristic is the degree of relationship, being those of degree 1 relationships that only relate an entity with itself. Those of degree 2 are relations that associate two different entities, and those of degree n that are relations that unite more than two entities.

See also  Generate Columns with CSS from a list without tables

The relations are represented graphically with diamonds, within them the name of the relation is placed.

Another characteristic is the type of correspondence between two relations;

  • 1:1. One by one, each occurrence of an entity corresponds to a maximum of one occurrence of the other related entity.
  • 1:N. One to Many, each occurrence of entity A can correspond to several of entity B.
  • N:M. Many-to-many, each occurrence of one entity can contain several of the other related entity and vice versa.

To finalize the characteristics of the relationship, we have the cardinality that defines the maximum and minimum number of occurrences of each type of entity. It is represented with the maximum comma minimum values ​​enclosed in parentheses above the relation. (maximum minimum)

Attribute

It is defined as each of the properties of an entity or relationship. Each attribute has a name and all the possible values ​​it can have. Within an entity there must be a main attribute that identifies the entity and its value must be unique. An example of a main attribute would be the ID within the person entity.

We give an example of what a schema of the entity-relationship model would be.

Loading Facebook Comments ...
Loading Disqus Comments ...