Data Modelling
Data Modelling
UNIT
UNIT -- II
II
Data modeling is the process of creating a conceptual representation of data in order to
understand it and organize it in a meaningful way. It involves creating a visual
representation of the data and its relationships, commonly referred to as an entity-
relationship diagram.
Derived Attribute
• An attribute that can be derived from
other attributes of the entity is known
as a derived attribute.
• In the ER diagram, the dashed oval
represents the derived attribute.
Composite Attribute
• An attribute that is composed of several other
attributes is known as a composite attribute.
• An oval showcases the composite attribute, and
the composite attribute oval is further
connected with other ovals.
• It is also called as composite attribute
Multivalued Attribute
• Some attributes can possess over one value, those
attributes are called multivalued attributes.
• The double oval shape is used to represent a
multivalued attribute
Relationship
The diamond shape showcases a relationship in the ER diagram.
It depicts the relationship between two entities.
In the example below, both the student and the course are entities, and study is
the relationship between them.
One-to-One Relationship
When a single element of an entity is associated with
a single element of another entity, it is called a one-
to-one relationship.
For example, a student has only one identification
card and an identification card is given to one person.
One-to-Many Relationship
When a single element of an entity is associated
with more than one element of another entity, it
is called a one-to-many relationship
For example, a customer can place many orders,
but an order cannot be placed by many
customers.
Many-to-One Relationship
When more than one element of an entity is
related to a single element of another entity,
then it is called a many-to-one relationship.
For example, students have to opt for a single
course, but a course can have many students.
Many-to-Many Relationship
When more than one element of an entity is
associated with more than one element of
another entity, this is called a many-to-many
relationship.
For example, you can assign an employee to
many projects and a project can have many
employees.