RELATIONSHIP TYPES - Center for Information...

29
RELATIONSHIP TYPES Relationship type: a meaningful association among entity types. Relationship: an association of entities where the association includes one entity from each participating entity type. Each uniquely identifiable occurrence of a relationship type is referred to as a relationship. A relationship indicates the particular entities that are related.

Transcript of RELATIONSHIP TYPES - Center for Information...

Page 1: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

RELATIONSHIP TYPES

Relationship type: a meaningful association among entity types. Relationship: an association of entities where the association includes one entity from each participating entity type. Each uniquely identifiable occurrence of a relationship type is referred to as a relationship. A relationship indicates the particular entities that are related.

Page 2: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

A Semantic Net Model of StaffManages Branch Relationship

Page 3: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Staff Manages Branch (1:1)Relationship

Page 4: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net Diagram of Staff OverseesProperty_for_Rent Relationship

Page 5: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Staff Oversees Property_for_Rent(1:M) Relationship

Page 6: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net Diagram of NewspaperAdvertises Property_for_Rent Relationship

Page 7: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Newspaper AdvertisesProperty_for_Rent (M:N) Relationship

Page 8: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Problems with ER Models

◆ Problems may arise when designing aconceptual data model called connectiontraps.

◆ Often due to a misinterpretation of themeaning of certain relationships.

◆ Two main types of connection traps arecalled fan traps and chasm traps.

Page 9: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Problems with ER Models

◆ “Fan Trap”– When a model shows a relationship between entity

types, but the pathway between certain entityoccurrences is “ambiguous”.

◆ “Chasm Trap”– When a model “suggests” the existence of a

relationship between entity types, but no pathwaybetween certain entity occurrences does exist.

Page 10: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

An Example of a “Fan Trap”

◆ Where is the assignment of Staff to (unique) Branches?

?

Page 11: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net of ER Model with FanTrap

Page 12: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Restructuring ER model to remove FanTrap

Page 13: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net of Restructured ERModel with Fan Trap Removed

Page 14: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

An Example of a “Chasm Trap”

◆ If a Staff member is not overseeing any Property, how canwe know which Properties are managed by a Branch?

Page 15: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net of ER Model with ChasmTrap

Page 16: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

ER Model restructured to remove ChasmTrap

Page 17: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Semantic Net of Restructured ERModel with Chasm Trap Removed

Page 18: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

The Enhanced Entity-RelationshipModel

◆ Since the 1980s there has been an increasein the emergence of new databaseapplications with more demandingrequirements.

◆ Basic concepts of ER modeling are notsufficient to represent the requirements of thenewer, more complex applications.

◆ Response is development of additional‘semantic’ modeling concepts.

Page 19: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

The Enhanced Entity-RelationshipModel

◆◆ Semantic conceptsSemantic concepts are incorporated intothe original ER model and is called theEnhanced Entity-Relationship (EER) model.

◆ Additional concepts of EER model includesspecialization / generalization, andcategorization.

Page 20: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Concept of Specialization /Generalization

◆ Associated with the related concepts of entitytypes described as superclasses orsubclasses and the process of attributeinheritance.

◆◆ SuperclassSuperclass– An entity type that includes distinct subclasses

that require to be represented In a data model.

Page 21: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Concept of Specialization /Generalization

◆◆ SubclassSubclass– A subclass is an entity type that has a distinct role

and is also a member of the superclass.

◆ Attribute Inheritance– An entity in a subclass may possess subclass

specific attributes, as well as those associatedwith the superclass.

Page 22: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Concept of Specialization / Generalization Specialization

The process of maximizing the differences between members of an entity by identifying their distinguishing characteristics.

Top-down approach to defining a set of superclasses and their related subclasses.

Page 23: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Concept of Specialization /Generalization

◆ Generalization– The process of minimizing the differences

between entities by identifying their commonfeatures.

◆ Specialization and generalization havedisjointness and participation constraints.

Page 24: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Specialization of Staff Entity intoSubclasses by Job Roles

Page 25: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Specialization of Staff Entity byJob Roles and Employment Contracts

Page 26: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

A Shared Subclass calledSales_Trainee

Page 27: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Categorization◆ The modeling of a single subclass (called a

category) with a relationship that involves morethan one distinct superclass.

◆ A category subclass has selective inheritance.

◆ Divided based on total or partial participation.– Total - every occurrence of all superclasses must

appear in the category.– Partial - constraint is removed.

Page 28: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Property_Owner and PropertyCategories

Page 29: RELATIONSHIP TYPES - Center for Information Retrievalcir.dcs.uni-pannon.hu/cikkek/problems_with_ER_model.pdf · RELATIONSHIP TYPES Relationship type: ... Semantic Net Diagram of Staff

Property represented as aSpecialization / Generalization.