Professional Documents
Culture Documents
Group 5edit Master subtitle style Click to : Saqib Ahmed Abdul-Ahad Mirza Waqas Ali Khan 09-4022 09-4027 09-4287
5/22/12
OUTLINE
History of EER Model Entity Relationship Entity Relationship Model Components of EER
5/22/12
Definition
The enhanced entity-relationship (EER) model is a high-level or conceptual data model incorporating extensions to the original entityrelationship *(ER) model, used in the design of databases.
5/22/12
Chen introduced the Entity Relationship (ER) data model. This was basically used for the diagrammatic representation of entities and relationships among entities in the subject domain.
5/22/12
5/22/12
Enhanced ER Model and it can be summed up as, EER model = ER Model + hierarchical relationships
5/22/12
Entity Relationship
Entity is something that exists by its self, in database we can say any kind of data is entity. An abstract and conceptual representation of data is called Entity Relationship.
5/22/12
Along with main data entities, operational and transactional data entities are also described.
o Physical Model:
In this layer the structural metadata* is instantiate into DBMS in the form of tables, keys 5/22/12
Anentitymay be defined as a thing which is recognized as being capable of an independent existence and which can be uniquely identified.
Relationship:
It describes the method through which entities are related with each other. They are usually represented as verbs. 5/22/12
The properties of either entities or relations are known as their attributes. Through attributes we can distinguish different values.
Cardinality:
Thecardinalityof one data table with respect to another table describes the 5/22/12 relationships between them and explains how
Symbols of ER Diagram
5/22/12
5/22/12
An Example of ER Modeling
Statement:
A library database contains a listing of authors that have written books on various subjects (one author per book). It also contains information about libraries that carry books on various subjects.
5/22/12
5/22/12
5/22/12
Keys
Entities and relationships are distinguishable using
various keys.
Definition:
A key is a combination of one or more attributes, e.g., social-security number, combination of name and social-security number.
5/22/12
Keys (cont.)
Super Key:
It is defined either for an entity set or relationship set that uniquely identifies an entity.
Candidate Key:
ER to EER
Some additional concepts make EER
different.
Sub class Super class Specialization Generalization Union of different entities, etc.
5/22/12
ER to EER (cont.)
It is used to model applications more
completely
and accurately.
It includes some object-oriented concepts,
such
as inheritance.
5/22/12
that the entity is inserted in all predicatedefined subclasses for which the entity satisfies the defining predicate.
5/22/12
specialization implies that the entity is inserted in at least one of the subclasses of the specialization.
total specialization implies that the entity is inserted in one and only one of the subclasses of the specialization.
5/22/12
Subclass
Suppose we have two entity types X and Y,
v X={name, roll number, gender, age, cgpa, v Y={name, gender, age, cgpa}
5/22/12
Each of these groupings is a subset of EMPLOYEE entities Each is called a subclass of EMPLOYEE
5/22/12
Super class
The super class is the entity type from which
class .
type.
5/22/12
5/22/12
Specialization
Specialization is basically separation of the
5/22/12
Specialization (cont.)
If all subclasses in a specialization have
membership condition on same attribute of the superclass, specialization is called an attribute-defined specialization.
5/22/12
Specialization (cont.)
5/22/12
Specialization (cont.)
Example:
{SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon job type. {SALARIED_EMPLOYEE, HOURLY_EMPLOYEE} is another specialization of EMPLOYEE based in method of pay.
5/22/12
Generalization
It is an extension of a concept of less specific
area.
CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become subclasses of the super class VEHICLE.
{CAR, TRUCK} can be viewed as a specialization of
VEHICLE
Alternatively, VEHICLE can be viewed as a generalization
that will become members of each subclass by a condition, the subclasses are called predicate-defined (or condition-defined) subclasses
5/22/12
is shown by writing the predicate condition next to the line attaching the subclass to its super class.
5/22/12
Disjointness Constraint
1. 2.
Disjoint Overlapping
Completeness Constraint:
1. Total 2. Partial
5/22/12
diagram.
Disjoint basically means that an entity can be a member of at most one of the subclasses of the specialization.
Overlapping basically means that the same entity 5/22/12 may be a member of more than one subclass of the
5/22/12
5/22/12
that every entity in the superclass must be a member of at least one subclass in the specialization
Constraints on Generalization and Specialization (cont.) Therefore we have four we have four types of
specialization/generalization:
1. Disjoint, total 2. Disjoint, partial 3. Overlapping, total 4. Overlapping, partial
5/22/12
5/22/12
5/22/12
Specialization and Generalization Hierarchies and A subclass itself may have further subclasses Latticesforming a hierarchy or a lattice specified on it,
of specializations.
Hierarchy is basically a constraint that each
Shared Subclasses
A subclass inherits the attributes not only of
its direct superclass but also of all its predecessor superclasses all the way to the root of the hierarchy or lattice.
relationship) originating in the same superclass is inherited more than once via
5/22/12
Utilizing Specialization and Generalization in Refining Conceptual Schemas Top-down conceptual refinement process:
We typically start with an entity type and then
Category(Union)
Union is the term in which we unite different
5/22/12
Category(Union) (cont.)
The need arises for modeling a single
superclass/subclass relationship with more than one superclass, where the superclasses represent different entity types.
may represent distinct entity types, whereas other superclass/subclass relationships always have a single superclass.
5/22/12
Category(Union) (cont.)
In category the subclass may or may not have
with the U symbol, which stands for the set union operation.
5/22/12
Example of Category(Union)
5/22/12