History:Work/Relationship Inheritance in Works Trees Proposal
|Status: This page describes an active style guideline proposal and is not official.|
MusicBrainz can represent metadata about musical compositions, and parts of those compositions, by using multiple Work entities linked together with "Parts" relationships. For instance, there is one Work entity for Beethoven's Symphony No. 9 in D minor, Op. 125 "Choral", and four more for each of its movements (I., II., III., IV.).
The MusicBrainz database represents the fact that a composer composed a musical work by means of a Composer Relationship between the Artist entity for the composer and the Work entity for the composition. If this relationship is attached to the Work entity for part of the composition, that has a different meaning than attaching it to the Work entity for just one movement. The Parts Relationship Type sets up inheritance between the parent and child Work entities, so that a relationship attached to one of the Work entities has a meaning about the other entity.
Relationship Inheritance Rules
Given two Work entities, which we'll call Parent and Child, with a Parts Relationship Type saying "Child is a part of Parent", then the meaning of relationships to either Work entity (which are not Parts Relationship Type themselves) is as follows:
- Any relationship to Parent applies to the all of the composition to which Parent refers, and to any portion of it.
- All of Child inherits from Parent
- Any relationship to Parent, be it from an Artist, ReleaseGroup, Release, Label, URL, or Work (except for Work-Work Parts Relationship Type), means that the same relationship applies also to the entire portion of the musical composition to which Child refers, whether or not a corresponding relationship entry to Child is explicitly recorded.
- Some of Parent inherits from Child
- Any relationship to Child, be it from an Artist, ReleaseGroup, Release, Label, URL, or Work (except for Work-Work Parts Relationship Type), means that the same relationship applies to some non-zero portion, and maybe or maybe not all, of Parent, even if no corresponding relationship entry to Parent is explicitly recorded.
- Siblings don't inherit
- Given another Work entity, Child 2, which also has a Parts Relationship Type saying "Child 2 is a part of Parent", then any relationship to Child does not imply any meaning about that relationship and Child 2. Inheritance passes between parent and child, but not from one child to another of the same parent.
- Inheritence is transitive
- Given yet another Work entity, Grandchild, which has a Parts Relationship Type saying "Grandchild is a part of Child", then any relationship which Child inherits from Parent, Grandchild in turn inherits from Child (its parent). Any relationship which Child inherits from Grandchild (its own child), Parent in turn inherits from Child.
These rules cause inheritance for any between a Work and any other entity (Artist, ReleaseGroup, Release, Label, URL, or Work), except for the Parts Relationship Type (Work-Work). This relationship defines the parent-child structure, so it doesn't itself inherit.
The inheritance rules do not themselves dictate where to apply Relationships to Work entities in a Parts Relationship Type tree. As of October 2011, MusicBrainz software does not implement these inheritance rules. So, applying Relationships to the lowest Work entity in the tree has the advantage that current software is most likely to detect them. However, this means multiple Relationships need to be applied to multiple partial-work entities in the tree, with a chance that they will accidentally be different, or that some entities will be missed. Applying Relationships to the highest Work entity in a tree, where it still applies, has the advantage that relationships inherited to the lowest Works in the tree will be consistent and have complete coverage. It also has the advantage of lower data entry effort and lower storage requirements, though these are less important factors.
It is an error to connect Works in a cycle with Parts Relationship Type. In other words, if Work entity Child has the Relationship is part of a Work entity Parent, then it is an error for Parent to have the Relationship is part of the Work entity Child.
- There are four more Work entities for each of its movements (I..., II..., III..., and IV. Finale. Presto - Allegro assai). Each movement is linked to the parent Work entity for the Symphony by a Parts Relationship Type.
- There is a Librettist relationship of Friedrich Schiller to IV. Finale. Presto - Allegro assai.
- There is another Work entity 'Ode an die Freude' aus Sinfonie No. 9, Op. 125, and let's say it refers only to the part with the singing. It is linked to the IV. movement with a relationship, ... is a part of IV. Finale. Presto - Allegro assai.
- There is a Composer relationship of Ludwig van Beethoven to the top-level Work entity, Symphony No. 9 in D minor, Op. 125 "Choral".
This structure conveys several meanings.
- Each of the four movements has Composer relationship with Beethoven, even though they have no direct Composer relationship defined (All of Child inherits from Parent).
- Beethoven is the Composer of every portion of every movement (All of Child inherits from Parent).
- Schiller has the Librettist relationship with some portion, but maybe or maybe not all, of the overall Symphony No. 9 in D minor, Op. 125 "Choral" (Some of Parent inherits from Child)
- Schiller does not have the Librettist relationship with movements I, II, and III (Siblings don't inherit)
- Schiller has the Librettist relationship with the excerpt, 'Ode an die Freude' aus Sinfonie No. 9, Op. 125 (All of Child inherits from Parent).
- If the Librettist relationship with Schiller were attached to the overall Symphony No. 9 in D minor, Op. 125 "Choral" instead of movement IV., then Schiller would have the Librettist relationship with movements I., II., and III. also (All of Child inherits from Parent). It turns out that these movements are entirely instrumental; they have no words. Whether it's meaningful for an instrumental movement to have a Librettist is a matter for Librettist Relationship Type, not here.
- The excerpt 'Ode an die Freude' aus Sinfonie No. 9, Op. 125 has the Composer relationship with Beethoven (Inheritence is transitive).
- If the Librettist relationship with Schiller were attached to the excerpt 'Ode an die Freude' aus Sinfonie No. 9, Op. 125, instead of to movement IV., then the Librettist relationship with the overall Symphony No. 9 in D minor, Op. 125 "Choral" would be unchanged: the Librettist relationship would be with some portion, but maybe or maybe not all, of the overall composition (Inheritence is transitive).
Without relationship inheritance, a search for Releases that had Recordings of performances of works by Beethoven wouldn't turn up many instances of the Symphony No. 9. Most Releases would put each movement of the symphony on a separate Track, and each Track would link to a corresponding Recording, and the Recording is most accurately linked to the child Work for the movement. But the Composer relationship for Beethoven is attached to the overall Symphony No. 9 work, not the child works for each movement. It is the relationship inheritance which connects the Release to the Composer.