0% found this document useful (0 votes)
4 views

Data Modelling

Uploaded by

Sudha G
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Data Modelling

Uploaded by

Sudha G
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

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.

•t helps to ensure data accuracy and consistency.


•It allows for easy identification of data dependencies, which can help with system
optimization and maintenance.
•It provides an organized view of complex data.
•It helps with designing efficient databases that can support complex queries.
By creating an entity-relationship diagram, data modeling can help to ensure that the design
and development of databases meets the needs of the organization or business. It can also
help to identify potential issues before they occur, which can save time and money in the
long run.

E-Commerce Marketing Plan 2


Definition of entity-relationship diagrams
An entity-relationship diagram (ERD) is a visual
representation of entities (such as people, objects or
concepts) and their relationships to one another.
ERDs are used in data modeling to help understand
complex information and to design and optimize
databases.
The basic components of an ERD include:
Entities: the objects or concepts in the database
(represented by rectangles)
Relationships: the associations between the entities
(represented by diamonds)
Attributes: the specific characteristics or properties
of the entities (represented by ovals)

E-Commerce Marketing Plan 3


Entities are objects with distinct characteristics that can be observed and
measured. These objects could be tangible, like a chair or a car, or intangible, like a
concept or an idea. Entities are represented as rectangles in the diagram.
Attributes are characteristics that describe an entity. These could be physical
attributes, like the color of a car, or non-physical attributes, like the credit score of
a person. In the diagram, attributes are represented as ovals connected to their
corresponding entity.
Relationships are associations or connections between two or more entities.
Relationships are represented as diamonds in the diagram, with arrows indicating
the direction of the relationship. Relationships have specific types, such as one-to-
one, one-to-many, and many-to-many, and can have additional properties like
cardinality and dependency.

E-Commerce Marketing Plan 4


What is an ER Model?
An Entity-Relationship Model represents the structure of the database with the
help of a diagram. ER Modelling is a systematic process to design a database as it
would require you to analyze all data requirements before implementing your
database.
Symbols Used in ER Diagrams
Rectangles: This Entity Relationship Diagram symbol represents entity types
Ellipses: This symbol represents attributes
Diamonds: This symbol represents relationship types
Lines: It links attributes to entity types and entity types with other relationship
types
Primary key: Here, it underlines the attributes
Double Ellipses: Represents multi-valued attributes

E-Commerce Marketing Plan 5


Importance of entity-relationship diagrams
• Entity-relationship diagrams (ER diagrams) are important in data modeling
because they provide a visual representation of the relationships between
entities in a system.
• This representation can help in understanding the business rules and data
structures of a system.

• ER diagrams also aid in the design and development of databases by


identifying entities, attributes, and relationships.
• This can help ensure that data is properly organized and stored, and that the
database meets the requirements of the user.
• In addition, ER diagrams can assist in the maintenance of a database by making
it easier to understand the relationships between data sets.
• Without this visual representation, it can be difficult to grasp the complexity of
a database, especially if it has been developed over several years.
E-Commerce Marketing Plan 6
Components of ER Diagram
•Entities
• Weak Entity
•Attributes
• Key Attribute
• Composite Attribute
• Multivalued Attribute
• Derived Attribute
•Relationships
• One-to-One Relationships
• One-to-Many Relationships
• Many-to-One Relationships
• Many-to-Many Relationships
Entities
An entity can be either a living or non-living component.
It showcases an entity as a rectangle in an ER diagram.
For example, in a student study course,
both the student and the course are entities.

E-Commerce Marketing Plan 7


Weak Entity
An entity that makes reliance over another entity is called a weak entity
You showcase the weak entity as a double rectangle in ER Diagram.
In the example below, school is a strong entity because it has a primary key attribute - school
number. Unlike school, the classroom is a weak entity because it does not have any primary
key and the room number here acts only as a discriminator.

E-Commerce Marketing Plan 8


Attribute
An attribute exhibits the properties of an entity.
Key Attribute
• Key attribute uniquely identifies an entity
from an entity set.
• It underlines the text of a key attribute.
For example: For a student entity, the roll
number can uniquely identify a
student from a set of students.

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.

You might also like