Can anyone tell me what is chasm trap? Perhaps fan trap too as I'm not too clear. Also, please provide easy to understand examples (via Chen notations).
My understanding thus far: I understand that Fan trap is M:1:1:M, which suggests the paths between entities is ambiguous.
I understand that. For example, if M represents Student and the other M represents School then it'll be ambiguous because we don't know which student studies at which school (that's what I understood so far).
However, I cannot grasp what is chasm trap.
Also, how can I identify the traps and then fix it?
Chasm Traps A chasm trap occurs when two "many-to-one” joins converge on a single table, and the query includes measures from both leaf tables. As a result multiple rows are returned from the tables when processing the query.
There are two ways to solve a fan trap problem. Create an alias for the table containing the initial aggregation, then use Detect Contexts (Tools > Detect Contexts) to detect and propose a context for the alias table and a context for the original table. This is the most effective way to solve the fan trap problem.
Connection traps appear when a pathway between two or more entities is either ambiguous or false existent. Relational databases seem like something straightforward, however, correctly written query may not always lead to a correct result. Try to always specify the lower bound of connection.
When a “one to many” join linked by another “one to many” join in a serious of tables called as Fan Trap. Like the below example, Customer is having multiple Loan account and each Loan having Multiple Collateral which is “one to Many” & “One to Many” join in a series of tables.
Based on Conolly&Begg:
Fan trap occur in a situation when a model represents relationship between entity types however a path between certain entity occurrences is ambiguous.
Example: (Staff)-1:N-has-1:1-(Division)-1:1-operates-1:N-(Branch) in this model it may be impossible to determine the branch a staff belongs to, in the situation when staff belong to division having more than 1 branches.
Restructuring the model resolves trap (Division)-1:1-operates-1:N-(Branch)-1:1-has-1:N-(Staff)
Chasm trap occur when a model suggests relationship between entity types however a path between certain occurrences does not exist.
Example: (Branch)-1:1-has-1:N-(Staff)-0:1-oversees-0:N-(PropertyForRent)
Because Staff relationship to PropertyForRent is with optional participation (0:1) for staff the path for Branch to PropertyForRent may not exist. Solution to this would be direct relationship between Branch and PropertyForRent with mandatory participation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With