You can't create a direct active relationship between A and B because that would introduce ambiguity
Matthew Barrera
- I want to activate the relationship between Analyzers and Entries
- A Lab has Analyzers (1-*)
- A Lab has Entries (1-*)
- An Analyzer might contain Entries (IdAnalyzer in Entries is nullable)
- So there could be Entries in a Lab but with no reference to any Analyzer
- I understand the problem is that both tables Analyzers and Entries are pointing to Labs
- I can see the redundancy comes from the database design, at the moment it was thought as quick and easy way to set these relationships
Can you explain this ambiguity?
1 Answer
I understand the problem is that both tables Analyzers and Entries are pointing to Labs
This isn't quite the right explanation.
The ambiguity arises because there are two distinct paths for Labs to filter Entries.
It already filters directly via
Labs[Id] 1-->* Entries[IdLab]and if the relationship in question is activated, then also indirectly via
Labs[Id] 1-->* Analyzers[IdLab] 1-->* Entries[IdLab]I'd recommend this article for more insight into ambiguous relationships (even though it's largely about bidirectional relationships). This article is worth a read too.
1