The database model based on Entity-Relationship is derived from the Entity-Relationship Model introduced by Peter Pin-Shan Chen in 1976. It is an improvement over the originally proposed model, currently being one of semantic modeling techniques more known and used.
One of its main advantages – and perhaps the biggest reason for its popularity – is that in addition to concepts, the model also has a diagramming technique. This allows recording and communicating in a simplified way the main aspects of the database project. The ER model describes the data that make it up as entities, attributes and relationships.
Entities can be considered as objects within the database and its representation is given in tables.Each entity within the modeling is classified as strong or weak. A weak entity determines its existence to the existence of another entity. The strong one, in turn, is characterized as the opposite of the weak entity – thus, it can exist independently.
Each entity has then a series of attributes that will be subsequently put into the form of columns. Each column stores then a value referring to certain information.
The last characteristic element of the ER database model is the relationship. The database tables will relate to one another in order to create associations. They are classified as follows:
• One to one relationship: in this type of relationship, two primary key fields are used. Thus, the combination of the record with primary key may be done only once;
• Relationship one to many: A field with primary key can be used for many records in the linked table to many records;
• Relationship Many to Many: A normal field being linked to another normal field without any register control, accepting thus several times the same record.
Being the ER modeling the most widely used, it is important to keep in mind that the concept understanding is paramount to the development of any activity. Following, an example of using the ER model will be analyzed for its applicability to be shown in a didactic way:
Thinking of the main features of the ER model, we have:
• The Client and Address entities listed in tables;
• The attributes of each of these entities are described in each table and the data type is indicated beside the name;
• The relationship between the tables is identified by a line linking each one of them. In the diagram, the relationship one to many is indicated, in which an address can be used by many customers.