DB Lect 5
DB Lect 5
1. Strong Entity
A Strong Entity is a type of entity that has a key Attribute. Strong Entity does
not depend on other Entity in the Schema. It has a primary key, that helps
in identifying it uniquely, and it is represented by a rectangle. These are
called Strong Entity Types.
2. Weak Entity
An Entity type has a key attribute that uniquely identifies each entity in the
entity set. But some entity type exists for which key attributes can’t be
defined. These are called Weak Entity types.
For Example, A company may store the information of dependents
(Parents, Children, Spouse) of an Employee. But the dependents can’t
exist without the employee. So Dependent will be a Weak Entity
Type and Employee will be Identifying Entity type for Dependent, which
means it is Strong Entity Type.
A weak entity type is represented by a Double Rectangle. The
participation of weak entity types is always total. The relationship between
the weak entity type and its identifying strong entity type is called
identifying relationship and it is represented by a double diamond.
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.
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.
4. Many-to-Many: When entities in all entity sets can take part more than
once in the relationship cardinality is many to many. Let us assume that a
student can take more than one course and one course can be taken by
many students. So the relationship will be many to many.