Understanding how cmdb_ci_rel works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2012 03:17 PM
I have been trying to understand the way cmdb_ci_rel keeps track of directionality between related CIs. Two things are tripping me up:
1) The columns are named Parent and Child, but the relationship type *sometimes* implies the inverse.
2) There are out-of-box relationship types that go in both directions. Ex: "hosts::hosted by" and "hosted by::hosts"
Question:
Does the column (parent or child) provide the direction (as the naming implies)?
If so, why are there relationship types present that are inverted?
If not, what the heck is going on?
Thanks!
FYI, My Relationship Types in use:
Member of::Members
Members::Member of
Hosts::Hosted on
Depends on::Used by
Used by::Depends on
Runs on::Runs
Connects to::Connected by
Hosted on::Hosts
Contains::Contained by
Contained by::Contains
Exchanges data with::Exchanges data with
DR provided by::Provides DR for
Virtualized by::Virtualizes
Managed by::Manages
Receives data from::Sends data to
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2012 12:11 PM
If parent is *always* in the parent column in cmdb_ci_rel, then I should not trust (and ignore) the labels stored with the relationship pair, because they might incorrectly describe the relationship?
In other words, If parent is always really parent in the table, but the relationship type is named in reverse (as it often is), I should not trust the relationship type.
My head hurts!
BTW, We spoke on similar stuff when you were visiting my client in Thousand Oaks, CA. We discussed the utility you wrote to traverse the relationships. I consider your answers to be definitive on the subject.
Correction on earlier statement - the relationship types in my instance are not all out-of-box. It looks like they were created during conversion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2012 12:13 PM
Looks like bad conversion created the reversed relationships and backward relationship types. I'm confirming this now.
Thanks Mark! Your insights are very appreicated.