Entity Relationship Model
Entity Relationship Model
Entity Relationship Model (ER Model): - At the present time, the ER model is used
mainly during the process of database design.
4. Entities: - The basic object that the ER model represents is an entity, which is a “thing” in the
real world with an independent existence. An entity may be an object with a physical
existence – a particular person, car etc, or it may be an object with a conceptual existence
like a company, a job or a university course etc.
5. Weak Entity: - Some entity may not have any key attributes of their own. This implies that
we may not be able to distinguish between some entities because the combinations of values
of their attributes can be identical. Such entity is called weak entity. Weak entity is identified
by being related to specific entities from another entity type in combination with some of
their attribute values. Weak entity always has a total participation constraint with respect to
its identifying relationship. Weak Entity type has a partial key, which is the set of attributes
that can uniquely identify weak entities related to the same owner entity.
6. Attribute: - Each entity has particular properties called attributes that describe it. For example
a student entity may be described by RollNo, Name, Class, Address etc. Different types of
attributes are
a) Composite Attribute: - An attribute, which is composed of more basic attributes, is called
composed attribute. For example Address attribute of a student.
b) Atomic Attribute: - The attributes that are not divisible are called simple or atomic
attributes. For example RollNo attribute of a student.
c) Single-valued Attribute: - Most attributes have a single value for a particular entity, such
attributes are called single-valued attribute. For example Date_of_Birth attribute of a person.
d) Multivalued Attribute: - The attribute, which has a set of values for the same entity is
called multivalued attribute. A multivalued attribute may have lower and upper bounds on
the number of values for an individual entity. For example Subject attribute of a student.
e) Derived Attribute: - In some cases two or more attribute values are related. The value of
one attribute has to be calculated from the value of another attribute. Such type of attribute is
called derived attribute. For example Age attribute of a person can be calculated from current
date and his date of birth.
f) Key Attribute: - An entity type usually has an attribute whose values are distinct for each
individual entity. Such an attribute is called a key attribute and its values can be used to
identify each entity uniquely. Sometimes several attributes together can form a key, meaning
that the combination of the attribute values must be distinct for each individual entity. Some
entity types have more than one key attribute. In this case, each of the keys is called a
candidate key. When a relation schema has several candidate keys, the choice of one to
become primary key is arbitrary, however, it is usually better to choose a primary key with a
single attribute or a small number of attributes.
Entity Relationship Model (ER Model): - At the present time, the ER model is used
mainly during the process of database design.
7. Entities: - The basic object that the ER model represents is an entity, which is a “thing” in the
real world with an independent existence. An entity may be an object with a physical
existence – a particular person, car etc, or it may be an object with a conceptual existence
like a company, a job or a university course etc.
8. Weak Entity: - Some entity may not have any key attributes of their own. This implies that
we may not be able to distinguish between some entities because the combinations of values
of their attributes can be identical. Such entity is called weak entity. Weak entity is identified
by being related to specific entities from another entity type in combination with some of
their attribute values. Weak entity always has a total participation constraint with respect to
its identifying relationship. Weak Entity type has a partial key, which is the set of attributes
that can uniquely identify weak entities related to the same owner entity.
9. Attribute: - Each entity has particular properties called attributes that describe it. For example
a student entity may be described by RollNo, Name, Class, Address etc. Different types of
attributes are
a) Composite Attribute: - An attribute, which is composed of more basic attributes, is called
composed attribute. For example Address attribute of a student.
b) Atomic Attribute: - The attributes that are not divisible are called simple or atomic
attributes. For example RollNo attribute of a student.
c) Single-valued Attribute: - Most attributes have a single value for a particular entity, such
attributes are called single-valued attribute. For example Date_of_Birth attribute of a person.
d) Multivalued Attribute: - The attribute, which has a set of values for the same entity is
called multivalued attribute. A multivalued attribute may have lower and upper bounds on
the number of values for an individual entity. For example Subject attribute of a student.
e) Derived Attribute: - In some cases two or more attribute values are related. The value of
one attribute has to be calculated from the value of another attribute. Such type of attribute is
called derived attribute. For example Age attribute of a person can be calculated from current
date and his date of birth.
f) Key Attribute: - An entity type usually has an attribute whose values are distinct for each
individual entity. Such an attribute is called a key attribute and its values can be used to
identify each entity uniquely. Sometimes several attributes together can form a key, meaning
that the combination of the attribute values must be distinct for each individual entity. Some
entity types have more than one key attribute. In this case, each of the keys is called a
candidate key. When a relation schema has several candidate keys, the choice of one to
become primary key is arbitrary, however, it is usually better to choose a primary key with a
single attribute or a small number of attributes.