Problems with E-R (Fan Traps & Chasm Traps - catageroization) PDF

Title Problems with E-R (Fan Traps & Chasm Traps - catageroization)
Author Suresh Chelwani
Course Database Management Systems
Institution American University (USA)
Pages 4
File Size 132.6 KB
File Type PDF
Total Downloads 102
Total Views 198

Summary

This topic is about problems found in E-R diagrams. It explains about fan and chasm traps problems in E-R diagram. Why such problem occurs and how to solve them. It has examples for better understanding...


Description

DBMS – Problems with E-R Model

Problems with E-R Models: (Fan Traps & Chasm Traps): In E-R model, due to misinterpretation (misunderstanding) of the meaning of certain relationships, a problem known as connection traps results. There are mainly two types of connection traps. 1) Fan traps 2) Chasm traps 1) Fan Trap:  A model represents a relationship between entity types but the pathway between certain entity occurrences is ambiguous (confusing).  It occurs when two relationship sets, having mapping cardinality one-tomany converge (come together) to single entity set. I.e. two or more oneto-many relationships fan out from the same entity set. For example consider the following E-R diagram PERSON N Ha s 1 BANK

1

Operate s

N

COUNTER

Figure: An example of Fan trap Note here that there are two one-to-many relationships (1:N) from Bank to Person and Bank to Counter and both relationships sets converge to single entity set Bank. 1) ‘has’: A bank has more than one person 2) ‘operates’: A bank operates more than on counter. Now the problem is: This diagram cannot specify which person takes cash on which counter. For example it is difficult to answer the question “On which counter a person having person id ‘P01’ takes cash”? Such kind of problem is called as Fan Trap. Solution: Problem can be solved by reconstructing the original problematic ER diagram to represent the correct association. i.e. Reconstruct the E-R model to eliminate the fan trap. Below given reconstructed E-R diagram is able to give the correct answer to the above question. And so, it does not have any fan traps.

Suresh Chelwani – [email protected]

DBMS – Problems with E-R Model

BANK 1 Operate s N COUNTER

1

Ha s

N

PERSON

Figure: Reconstructed E-R diagram to eliminate Fan trap 2) Chasm Trap:  It occurs when an E-R diagram suggests the existence of a relationship between entity sets, but in reality, the connection does not exist.  This is possible when a relationship set with partial participation forms the way of connection between entity sets. This way of connection is referred as pathway. i.e. It shows the existence of a relationship between entity types but the pathway does not exist between certain entity occurrences. For example consider the following E-R diagram BRANCH

Ha s EMPLOYEE

GUIDES

PROJECT

Figure: An example of Chasm Trap Here, total and partial participation are represented explicitly. Relationship set Guides represents that Employee provides guidance to project. But all employees do not guide to project. So, the participation of Employee into relationship set Guide is partial. Also, all projects do not need to be guided by some employee. This means that student can take projects as a self-guided. So, the participation of Project into relationship set Guide is partial. Suresh Chelwani – [email protected]

DBMS – Problems with E-R Model

Now the problem is: If any project is not associated with any employee, it cannot be associated with is branch. For example it is difficult to answer the question “In which branch a particular project, having project id ‘P01’ is carried out, if it is selfguided project?” Such kind of problem is known as chasm trap. Here, diagram suggests that there is a connection between Branch and Project via Employee. But, in reality, the connection does not exist. This is due to the partial participation of Employee and Project into Guides relationship set. Solution: To solve the problem, we need to identify the missing link i.e. the missing relationship set. BRANCH

Ha s

Offer s

EMPLOYEE

GUIDES

PROJECT

Figure: Reconstructed E-R diagram to eliminate Chasm trap. Here the missing link is “Offers” relationship set between Branch and Project entity sets. This reconstructed E-R diagram is able to give the answer of the above question. And so, it does not have any Chasm trap.

Suresh Chelwani – [email protected]

DBMS – Problems with E-R Model

Categorization:  It is process of defining a single sub-class with a relationship which involves more than one super-class.  Here, a single sub-class is associated with more than one super-class.  In this case, the sub-class will represent a collection of entities from different super-classes. In other words, the sub-class will represent Union of distinct super-classes. Such type of sub-class is known as a Union or a Category. For example, consider that, a vehicle is owned by a person, a bank or a company. To associate vehicle owner with its vehicle via some relationship set, it is required to have a common class that can represent all the categories of vehicle owners. So, a class named Owner can be created as a sub-class of the union of the three super-classes – person, bank & company. This sub-class will represent objects such as persons, banks or companies. The super-class and sub-class are connected to the circle with the “U” symbol. The following figure shows such kind of relationship. Here, Owner is associated with Vehicle via a relationship ser Owns. BANK

PERSON

COMPANY

U

Super-Classes

Categorization

Owner

Sub-Class

Own s Super-Classes

Vehicle

d

Generalization

Figure: An Example of Categorization

Car

Truck

Suresh Chelwani – [email protected]

Sub-Classes...


Similar Free PDFs