2. Agenda…
To Understand ERD (Entity Relationship Diagram)1
Enhanced Entity Relationship Diagram2
Specialization, Generalization3
Inheritance – Super Class – Sub Class4
2
3. Entity Relationship Diagram(ERD)
An entity relationship diagram (ERD), also known as an entity relationshi
p model, is a graphical representation of an information system that depi
cts the relationships among people, objects, places, concepts or events
within that system
3
4. Entities
which are objects or concepts that can have data stored about them.
There are Three basics Components of an Entity Relationship Diagram(ERD)
Attributes
which are properties or characteristics of entities. An ERD attribute can be denoted as a
primary key, which identifies a unique attribute, or a foreign key, which can be assigned
to multiple attributes.
Relationships
Relationship shows the relation between entities
4
6. What is an Enhanced ER Diagram?
Enhanced entity-relationship models, also known as extended entity
-relationship models, are advanced database diagrams very similar
to regular ER diagrams. Enhanced ERDs are high-level models that
represent the requirements and complexities of complex databases.
6
7. Why Enhanced ERD?
Enhanced entity-relationship diagrams, or EERDs, are specialized
ER Diagrams that can be extremely useful for modeling your datab
ase. EERDs use several concepts that are closely related to object-
oriented design and programming.
7
8. Enhanced ERDs Include
•Subtypes and super types (sometimes known as subclasses and
super classes)
•Specialization and generalization
•Attribute and relationship inheritance
8
9. Super types and Subtypes /Super Class and Sub Class
•Super type - an entity type that relates to one or more subtypes.
•Subtype - a subgroup of entities with unique attributes.
Classes can be derived from other classes. The derived class (the class that
is derived from another class) is called a subclass. The class from which it's
derived is called the superclass.
9
12. Consider a simple application example. Which contains registration information for three
types of vehicles: trucks, cars, and bicycles.
For each vehicle type, your application requires the following information:
VID (Vehicle Identification)
LastMaint (mileage since last maintenance)
LoadCap (load capacity)
12
13. Representing Inheritance in the Database
You can represent inheritance in the database:
•Multiple tables that represent the parent class and each child class
13
14. Generalization, Specialization,
Generalization: In data modeling, generalization is the process of defining a more gener
al entity type from a set of more specialized entity types. Thus generalization is a
bottom-up process.
Specialization : The process of defining one or more subtypes of the supertype and
forming supertype/subtype relationships.
•Super type - an entity type that relates to one or more subtypes.
•Subtype - a subgroup of entities with unique attributes.
14