Circular relationships in the database - aaagh!

I would have thought that circular relationships in MB could not occur as they could cause big problems. But it would seem that they can be constructed (at least in a semantic sense).
For example this work. It can be seen that the work is described as having this arrangement but is also shown as a medley of of that same arrangement!
This seems to be a semantic nonsense*, and I am concerned that it seems to be permissible to enter such relationships.
On closer inspection, it appears that both the arrangement and the medley are ’ direction: “forward” ', which might explain why MB doesn’t consider the relationships to be circular. However, that begs the question as to why “medley of” is considered to be a ‘forward’ relationship, whereas “part of” is considered to be ‘backward’. Can anyone explain?

*It is actually a double nonsense, since how can you have a medley of just one work, let alone that work being an arrangement of the same said medley?

I think you are simply expecting more from MBS than it can do for now.
As long as you are linking two of the same entity-types I don’t think there are any restrictions. You can e.g. link a band as a member of a person.
Afaik there are no relationship types that block each other.

I don’t think the directions mean much. Maybe they were set up in a certain way because the people creating them thought they would be used in that direction more often (e.g. when you use the remix recording-recording relationship you may be more likely to be editing the remix and not the original).
But I agree that the work-work relationship directions are a bit confusing. E.g. I never used the “is basis for” direction which is suggested first, but only the “is based on” direction.

3 Likes

Indeed - it seems that you can link a band as a member of a person who is a member of the band. I would say that this is not good practice :unamused: Also it seems possible to make a work part of another work which is part of the original work.
I had assumed that the directions might be intended to prevent this, but it would seem not. Indeed they appear rather to suggest which might be the more likely one-many relationship, at least

So yes, perhaps I was expecting too much. Unfortunately the resulting infinite loop blew up python and crashed Picard when running my Classical Extras plugin (which fetches all parent works). I’ll put in some code to catch it. Once I’ve tested the change, I’ll remove the erroneous medley relationship, but for now it’s handy for testing purposes!

3 Likes

This kind of circular relationship (same relationship type) will at least be caught by one of the “duplicate relationships” reports, e.g.: Works with possible duplicate relationships - MusicBrainz

3 Likes