Chapter 3
Chapter 3
To identify the entities, attributes, relationships, and constraints on the data, there are different
set of methods used during the analysis phase. These include information gathered by…
Interviewing end users individually and in a group
Questionnaire survey
Direct observation
Examining different documents
Analysis of requirements gathered
Nouns -- prospective entities
Adjectives--prospective attributes
Verbs/verb phrases-prospective relationships
The basic E-R model is graphically depicted and presented for review.
The process is repeated until the end users and designers agree.
Checking for Redundant Relationships in the ER Diagram.
validating an ER Model against requirement of the user
Graphical representation of ER
Entity is represented by a RECTANGLE containing the name of the entity
Semantic description:
Problem: Which car (Car1 or Car3 or Car5) is used by Employee 6 Emp6 working in
Branch 1 (Br1)? Thus from this ER Model one can not tell which car is used by which staff
since a branch can have more than one car and also a branch is populated by more than one
employee. Thus we need to restructure the model to avoid the connection trap. To avoid the
Fan Trap problem we can go for restructuring of the E-R Model. This will
Con,t
2.Chasm trap
Chasm Trap: Occurs where a model suggests the existence of a relationship between entity
types, but the path way does not exist between certain entity occurrences. Chasm trap may
exist when there are one or more relationships with a minimum multiplicity on cardinality
of zero forming part of the pathway between related entities.
Example:
Problem:
How can we identify which BRANCH is responsible for which PROJECT? We know that
whether the PROJECT is active or not there is a responsible BRANCH. But which branch is
a question to be answered, and since we have a minimum participation of zero between
employee and PROJECT we can‘t identify the BRANCH responsible for each PROJECT.
The solution for this Chasm Trap problem is to add another relationship between the
extreme entities (BRANCH and PROJECT)
Con,t
Enhanced E-R (EER) Models
EER is important when we have a relationship between two entities and the participation is
partial between entity occurrences. In such cases EER is used to reduce the complexity in
participation and relationship complexity.
EER diagrams allow refinements within the structures of entity types
EER Concepts
Generalization
Specialization
Sub classes
Super classes
1. Generalization
Generalization occurs when two or more entities represent categories of the same real world
object.
Generalization is the process of defining a more general entity type from a set of more
specialized entity types.
Is considered as bottom-up definition of entities.
2. Specialization
Is the result of subset of a higher level entity set to form a lower level entity
set.
The specialized entities will have additional set of attributes (distinguishing
characteristics) that distinguish them from the generalized entity.
Is considered as Top-Down definition of entities.
Reasons for Specialization
Attributes only partially applying to super classes
Relationship types only partially applicable to the superclass
Example: Saving Accounts and Current Accounts are Specialized entities for
the generalized entity Accounts. Manager, Sales, Secretary: are specialized
employees
3. Subclass/Subtype
An entity type whose tuples have attributes that distinguish its members
from tuples of the generalized or Superclass entities.
When one generalized Superclass has various subgroups with distinguishing
features and these subgroups are represented by specialized form, the
groups are called subclasses.
A single subclass may inherit attributes from two distinct superclasses.
E.g.: An EMPLOYEE can either be SALARIED or PART-TIMER but not
both.
A PERSONwho works for a university can be both EMPLOYEE and a
STUDENT at the same time.
4. Superclass /Supertype
An entity type whose tuples share common attributes. Attributes that
are shared by all entity occurrences (including the identifier) are
associated with the supertype
Is the generalized entity