Data Secu
Data Secu
Modeling
What is data modeling?
Entities
Attributes
Composite Attributes Simple Attributes
Example:
{College Degree(College,year,degree,field)}
What Are the Key Data Model Components?
•Relationships define
the associations
between entities. This
may be 1:1, 1:N or
M:N. For example, one
product could be
related to another by a
specific product
What Are the Key Data Model
Components?
•Degree of Relationship
• Unary Relationship
- Exists when there is an
association with only one entity
•Degree of Relationship
What Are the
Key Data Model Binary Relationship
Components? - exists when there is an association among
two entities
What Are the Key Data Model
Components?
•Degree of Relationship
Ternary Relationship
- exists when there is an
association among three entities
What Are the Key Data Model Components?
• Cardinality Ratio
• Maximum number of
relationship
instances that an
entity can participate
in.
• Possible cardinality
ratios for binary
relationship
• 1:1, 1:N, N:1,
M:N
What Are the Key Data Model Components?
What is Cardinality?
1. One-to-One: When each entity in each entity set can
take part only once in the relationship, the cardinality
is one-to-one.
Let us assume that a male can marry one female
and a female can marry one male. So the relationship will
be one-to-one.
What is Cardinality?
2. One-to-Many: In one-to-many mapping as well where
each entity can be related to more than one entity and
the total number of tables that can be used in this is 2.
Let us assume that one surgeon department can
accommodate many doctors. So the Cardinality will be 1
to M. It means one department has many Doctors.
What is Cardinality?
3. Many-to-One: When entities in one entity set can take
part only once in the relationship set and entities in other
entity sets can take part more than once in the relationship
set, cardinality is many to one.
Let us assume that a student can take only one course
but one course can be taken by many students. So the
cardinality will be n to 1. It means that for one course there
can be n students but for one student, there will be only one
course.
What is
Cardinality
?
What Are the Key Data Model Components?