Home >>DBMS Tutorial >DBMS ER Model Basic Concepts
The ER model describes a database's conceptual view. It revolves around people in the real world and the associations between them. The ER model is considered to be a good option for designing databases at the viewpoint level.
Entity
An entity may be an easily identifiable real-world object, either animate or inanimate. For instance, students , teachers, classes, and courses offered may be considered as entities in a school database. There are certain attributes or properties of all these entities that give them their identity.
A collection of similar types of entities is an entity set. An entity set can contain entities with similar values sharing an attribute. For example, a set of students may contain all of a school's students; likewise, a set of teachers may contain all of a school's teachers from all staff. Entity sets do not have to be disjointed.
Attributes
Entities are represented, called attributes, by means of their properties. The attributes all have meanings. A student entity, for example, may have attributes such as name, class , and age.
A domain or value set exists that can be assigned to attributes. The name of a student, for example, should not be a real number. It's got to at least be alphabetic. The age of a student can not be negative, etc.
Types of Attributes
These types of characteristics can come together in a way like—
Entity-Set and Keys
Key is an attribute or attribute collection that defines an entity uniquely within the set of entities.
For instance, a student's roll_number makes it identifiable among students.
The association between entities is called a relationship. An employee works in a department , for example, and a student enlists in a course. Here, relationships are called Works at and Enrolls.
Relationship Set
A relationship set is called a set of relationships of a similar type. Like entities, there can be attributes in a relationship too. The descriptive attributes are called these attributes.
Degree of Relationship
In a relationship, the number of participating entities defines the degree of the relationship.
Mapping Cardinalities
Cardinalitydetermines the number of entities in one set of entities which, by means of a set of relationships, may be associated with the number of entities in an another set.
Many-to-many-One entity from A may be associated with more than one entity from B and vice versa.