Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

You can't create a direct active relationship between A and B because that would introduce ambiguity

Writer 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?

enter image description hereenter image description here

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.