Difference between revisions of "History:Work/Relationship Inheritance in Works Trees Proposal"
(→Discussion: more copy-editing, getting rid of work "entity".)
m (Update URL of RFC field with announcement of latest RFC.)
|Line 4:||Line 4:|
Revision as of 22:10, 5 November 2011
|Status: This page describes an active style guideline proposal and is not official.|
MusicBrainz can represent metadata about musical compositions, and portions 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 one more for each of its movements (I., II., III., IV.). A "Parts" relationship indicates that each movement's Work is a part of the Symphony's Work.
This structure of linked Work entities is referred to as a Work Tree. Any Work entity which has a Relationship, "is part of" another Work entity, is a child Work. The linked Work, containing the Child, is a parent Work. Any Work which is not a Child is called the root of a Work Tree. The ancestors of a Work are the Work's Parent, and the Parent's Ancestors. Similarly, the descendants of a Work are the Work's Children, and each Child's Descendants.
Any Work which has no "Parts" relationships is a stand-alone Work entity, a very simple Work Tree with a Root and no Children. These inheritance rules may be applied to a Stand-Alone Work. They turn out to have no effect.
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 for a part of the composition, that has a different meaning than attaching it to the root Work. The Parts Relationship Type sets up inheritance between the parent and child Works, so that a Relationship attached to one of the Works conveys a meaning about the other. The same inheritance applies for almost all Relationships on Work entities, not just the Composer Relationship.
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 a Work entity applies to the all of the composition (or part of a composition) to which the Work refers, and to any portion of it. This applicability is called full coverage.
- 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 (i.e., with full coverage).
- 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. This applicability is called partial coverage.
- 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.
- Inheritance 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.
- Inheritance status matters
- Anything which displays or interprets Relationships should present the distinction between inherited and direct Relationships, between inheritance from distant and immediately-linked relatives, and between full and partial coverage, in a way that's appropriate.
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). The Parts Relationship Type defines the parent-child structure, so it doesn't itself inherit.
Software which reads the MusicBrainz database is what implements Relationship inheritance for a Work in a Work Tree. This software traverses the Parts Relationship Type links, and reports which Relationships affect the starting Work. Some Relationships will be attached directly to the Work, some will be inherited from ancestors, some will be inherited from descendants. Some Relationships will apply to the whole Work, some will apply to just some portion (and maybe or maybe not all) of it. As of October 2011, MusicBrainz software does not implement these inheritance rules. (However, it performs similar link traversals in other contexts, e.g. to get the Recording artists for a Work.)
The inheritance rules do not themselves dictate a Style guideline on where to apply Relationships to Works in a Work Tree. Until MusicBrainz software implements inheritance rules, a style of applying Relationships to the lowest Work in the tree has the advantage that current software is most likely to detect them. However, it requires multiple Relationships to be applied to multiple child Works in the tree, with a chance that they will accidentally be different, or that some Works will be missed. A style of applying Relationships to the highest Work in a tree, where they are still correct, 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. However, until MusicBrainz software implements inheritance, the Relationships may be largely invisible.
It's completely valid to attach more than one Advanced Relationship of the same type to the same Work entity. For instance, the composition popularly known as the "Mozart Requiem" has Relationships to one composer (Mozart), one "additional" composer (Süßmayr), and three orchestrators (Mozart, Süßmayr, and Freystädtler). Also, MusicBrainz has no way to cancel or override Relationships. Thus, all the Relationships a Work inherits, or has directly attached, are valid. If there's a Work Tree where some Children need one Relationship "A", and other Children need a different relationship "B", then apply these Relationships to the Children. Do not apply either Relatioship, "A" or "B", to the Parent.
Why does inheritance status matter? For a Work entity, a directly attached Relationship has slightly different significance than the same exact Relationship inherited from an Ancestor. The meaning of the Relationship itself is the same: both have "full coverage", and link to the same other entity. But it's possible for editors to apply Relationships without realising how other Works in the Tree will inherit the Relationship. Also, Relationships inherited from Descendants have only partial coverage, while directly attached Relationships have full coverage. Because these differences are likely significant to users of MusicBrainz, they should be display in some appropriate way.
The definitions for ancestors and descendants above are recursive. This kind of definition works well for some people, and for mathematicians and computer scientists. It can be brain-twisting for many people. Here's another way to express those definitions. The Ancestors of a Work in a Work Tree are: that Work's Parent, the Parent's Parent, and so on back to the Root entity of the work tree. The Root Work itself has zero Ancestors. The Descendants of a Work in a Work Tree are: all of that Work's Children, and all of Children of the first Child, and all of Children of the second Child, and so on through all of the Work's Children, and all the Children's Children's Children, stopping at those final Works which themselves have no Children. Some Works in any Work Tree will have zero Children, and so zero Descendants.
Suppose there is one Work entity for Beethoven's Symphony No. 9 in D minor, Op. 125 "Choral". (We're basing this example on actual MusicBrainz entries, with some embellishment.) There is one more Work entities for each of its movements (I..., II..., III..., and IV. Finale. Presto - Allegro assai). Each movement's Work is linked to the root Work for the Symphony by a Parts Relationship Type.
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.
This structure is a work tree. It consists of six linked Work entities. They Symphony's entity is the root. The entities for Movements I-IV are children of the root. The entity for Ode an die Freude is a child of the entity for Movement IV.
Let's say there is a Composer relationship of Ludwig van Beethoven to attached to the Root entity, Symphony No. 9 in D minor, Op. 125 "Choral". There is a Librettist relationship of Friedrich Schiller attached to IV. Finale. Presto - Allegro assai.
This structure conveys several meanings.
- Each of the four movements has a 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 definition, not the inheritance rules.)
- The excerpt 'Ode an die Freude' aus Sinfonie No. 9, Op. 125 has the Composer relationship with Beethoven (Inheritance 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 composed 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, in this example.