Data Modelling and ERD
Data Modelling and ERD
Presented by
Debalina Barik
Assistant Professor
Department of CSE and IT
Bengal Institute of Technology
Learning Objectives
2
´Relationship
´When an attribute of one entity type
refers to another entity type
´Represent references as relationships not
attributes
Relationship Types, Sets, and
Instances
´ Relationship type R among n entity types
E1, E2, ..., En
´Defines a set of associations among
entities from these entity types
´ Relationship instances ri
´Each ri associates n individual entities
(e1, e2, ..., en)
´Each entity ej in ri is a member of
entity set Ej
Relationship Degree
´UML methodology
´Used extensively in software design
´Many types of diagrams for various
software design purposes
´UML class diagrams
´Entity in ER corresponds to an object
in UML
Example of Other Notation:
UML Class Diagrams (cont.)
Additional Material
Enhanced Entity-Relationship (EER)
Model
Other topics
´Disjointness constraint
´Specifies that the subclasses of the
specialization must be disjoint
´Completeness (or totalness) constraint
´May be total or partial
´Disjointness and completeness
constraints are independent
Specialization and Generalization
Hierarchies
and Lattices
´ Specialization hierarchy
´Every subclass participates as a subclass in only
one class/subclass relationship
´Results in a tree structure or strict hierarchy
´ Specialization lattice
´Subclass can be a subclass in more than one
class/subclass relationship
Specialization and Generalization
Hierarchies
and Lattices (cont.)
´Multiple inheritance
´Subclass with more than one superclass
´If attribute (or relationship) originating in
the same superclass inherited more than
once via different paths in lattice
´Included only once in shared subclass
´Single inheritance
´Some models and languages limited to
single inheritance
Utilizing Specialization and
Generalization in Refining Conceptual
Schemas
´Specialization process
´Start with entity type then define
subclasses by successive specialization
´Top-down conceptual refinement process
´Bottom-up conceptual synthesis
´Involves generalization rather than
specialization
Modeling of UNION Types
Using Categories
´ Union type or a category
´Represents a single superclass/subclass
relationship with more than one superclass
´Subclass represents a collection of objects
that is a subset of the UNION of distinct
entity types
´Attribute inheritance works more selectively
´Category can be total or partial
´ Some modeling methodologies do not have
union types
A Sample UNIVERSITY EER Schema,
Design Choices, and Formal Definitions
´ Generalization
´Generalized entity type or superclass
´ Predicate-defined
´Predicate on the attributes of is used to
specify which entities in C are members of S
´ User-defined
´Subclass that is not defined by a predicate
Formal Definitions for the EER Model
Concepts (cont.)
´Category
´Class that is a subset of the union
of n defining superclasses
´Relationship type
´Any class can participate in a
relationship
Example of Other Notation
´ Abstraction process
´ Classes and objects are made uniquely
identifiable by means of some identifier
´ Needed at two levels
´To distinguish among database objects
and classes
´To identify database objects and to relate
them to their real-world counterparts
Specialization and
Generalization
´Specialization
´Classify a class of objects into more
specialized subclasses
´Generalization
´Generalize several classes into a
higher-level abstract class
´Includes the objects in all these
classes
Aggregation and
Association
´ Aggregation
´Abstraction concept for building composite
objects from their component objects
´ Association
´Associate objects from several independent
classes
´ Main structural distinction
´When an association instance is deleted
´Participating objects may continue to
exist
Ontologies and the
Semantic Web
´ Documents contain less structure than database
information does
´ Semantic Web
´Allow meaningful information exchange and
search among machines
´ Ontology
´Specification of a conceptualization
´ Specification
´Language and vocabulary terms used to
specify conceptualization
78 References