Advance Database Management System: Unit - 1 .The Extended Entity Relationship Model and Object Model
Advance Database Management System: Unit - 1 .The Extended Entity Relationship Model and Object Model
Advance Database Management System: Unit - 1 .The Extended Entity Relationship Model and Object Model
Management System
Unit 1 .The Extended Entity Relationship Model and Object Model
Dhanashree Huddedar
Index
Inheritance
ER Model Basics
Entity: Real-world object distinguishable from other
objects.
An entity is described using a set of attributes.
Entity Set: A collection of similar entities. E.g., all
employees.
ER Model Basics
continued
Key and key attributes:
Key: a unique value for an entity
Key attributes: a group of one or more attributes that uniquely
identify an entity in the entity set
name
ER Model Basics
ssn
lot
continued
name
ssn
lot
Employees
Employees
since
dname
did
Works_In
budget
Departments
supervisor
subordinate
Reports_To
Mapping
since
name
ssn
Consider Works_In: An
employee can work in
many departments; a
dept can have many
employees.
dname
lot
Employees
did
Manages
budget
Departments
1-to-1
1-to Many
Many-to-1
Many-to-Many
The need to integrate complex data with simple data drives the demand
for object database technology.
Attribute Inheritance in
Superclass / Subclass Relationships
An entity that is member of a subclass inherits
all attributes of the entity as a member of the
superclass
It also inherits all relationships
Example of a Specialization
Generalization (Bottom- up
design)
The reverse of the specialization process
Several classes with common features are generalized
into a superclass; original classes become its
subclasses
Example: CAR, TRUCK generalized into VEHICLE; both
CAR, TRUCK become subclasses of the superclass
VEHICLE.
We can view {CAR, TRUCK} as a specialization of VEHICLE
Alternatively, we can view VEHICLE as a generalization of CAR
and TRUCK
Completeness Constraint:
Total specifies that every entity in the superclass must be a member of
some subclass in the specialization/ generalization
Shown in EER diagrams by a double line
Partial allows an entity not to belong to any of the subclasses
Shown in EER diagrams by a single line
Specialization / Generalization
Lattice Example (UNIVERSITY)
Example of categories
(UNION TYPES)
Important Questions
1. Define the following terms: entity, attribute, attribute value, relationship instance,
composite attribute, multivalued attribute, derived attribute, complex attribute, key
attribute, and value set (domain).
2. What is an entity type? What is an entity set? Explain the differences among an
entity, an entity type, and an entity set.
3. What is meant by a recursive relationship type? Give some examples of recursive
relationship types.
4. When is the concept of a weak entity used in data modelling?
5. What is a subclass? When is a subclass needed in data modelling?
6. Define the following terms: superclass of a subclass, superclass/subclass
relationship, IS-A relationship, specialization, generalization, category, specific
(local) attributes, and specific relationships.
7. Discuss the mechanism of attribute/relationship inheritance. Why is it useful?
8. Discuss the two main types of constraints on specializations and generalizations.
9. What is the difference between a specialization hierarchy and a specialization
10.lattice?