Professional Documents
Culture Documents
FACULTY : MR.S.P.SINGH
4. An entity may be concrete such as person or a book, or it may be abstract such as a loan, a holiday etc.
Entity Set:
A collection of similar entities that share same properties. E.g., all employees.
ER Model Basics
Relationship: Association among two or more entities.
An relationship set R relates n entity sets E1 ... En; each relationship in R involves entities e1, ..., en
2.
Same entity set could participate in different relationship sets, or in different roles they describe Attributes:in same set. the entity and relationship. Each such attribute is with a value set and can take a value from this value set.
MAPPING CARDINALITIES:
It is also known as Cardinality ratios It expresses the number of entities to which another entity can be associated via a relationship sets. For a binary relation R between entity sets A & B, The mapping cardinalities must be one of the following: 1. one to one: -An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A.
1-to-1
2.
One to many :
An entity in A is associated with any number ( zero or more ) of entities in B. An entity. In B however can be associated with at most one entity in A.
1-to Many
A
3. Many to one: An entity in A is associated with at most one entity in B An entity in B, however can be associated with any number of entities in A.
Many-to-1
4.
Many to many:
An entity in A is associated with any number of entities of B, and an entity in B is associated with any number of entities in A.
Many-to-Many
E-R DIAGRAMS
The ER diagram can express the overall logical structure of a database graphically.
Weak Entities
E-R SPECIALIZATION
Top-down design process: we designate sub groupings within an entity set that are distinctive from other entities in the set.
These sub groupings become lower-level entity sets that have attributes or participate in relationships that do not apply to the higher-level entity set.
Depicted by a triangle component labeled ISA (E.g. customer is a person). Attribute inheritance a lower-level entity set inherits all the attributes and relationship participation of the higher-level entity set to which it is linked.
E-R GENERALIZATION
Sometimes there are similarities between the customer entity set and the employee entity set i.e. they have some attributes in common;
This commonality can be expressed by Generalization; It is a containment relation which is a containment relationship that exists a higher level entity set and one or more lower level entity sets; generalization is a simple inversion of specialization; it proceeds from the recognition of that number of entity sets that share common features.
ER SPECIALIZATION DIAGRAM