Difference between revisions of "History:Object Model"

From MusicBrainz Wiki
(started new base for collaborative work on "wtf is actually the problem"[TM] :-) (Imported from MoinMoin))
 
 
(39 intermediate revisions by 16 users not shown)
Line 1: Line 1:
=MusicBrainz Object Model=
+
'''Status:''' [[Image:Attention.png]] ''This page needs to be updated to reflect the results of the [[MusicBrainz Summit 7|MusicBrainzSummit7]]''
  
This page and its subpages form a document that tires to describe the reality that [[MusicBrainz]] deals with as abstract [[Object Model/Object|/Object]]s with [[Object Model/Property|Properties]] and [[Object Model/Relationship|/Relationship]]s. ''This document is not about a database schema.'' Its purpose is to understand what we are dealing with. Of course, this effort is strongly related to the creation of a [[Next Generation Schema|NextGenerationSchema]].  
+
This page and its subpages form a document that tries to describe the reality that [[MusicBrainz]] deals with as abstract [[Object Model/Object|/Object]]s with [[Object Model/Property|Properties]] and [[Object Model/Relationship|/Relationship]]s. ''This document is not about a database schema.'' Its purpose is to understand what we are dealing with. Of course, this effort is strongly related to the creation of a [[Next Generation Schema|NextGenerationSchema]].  
  
This document is written in the form of [[Collective We|CollectiveWe]], and you are invited to [[Be Bold|BeBold]] and write things like "we seem to (dis)agree" or "we have forgotten an important aspect...". This shold avoid lengthy threaded discussions. Those should better happen on the [[Experts Mailing List|ExpertsMailingList]].
+
This document is written in the form of [[Collective We|CollectiveWe]], and you are invited to [[Be Bold|BeBold]] and write things like "we seem to (dis)agree" or "we have forgotten an important aspect...". This should avoid lengthy threaded discussions.
  
 
==Definitions==
 
==Definitions==
Line 9: Line 9:
 
When talking about object definitions we need a well defined language. Here are the most important ones:  
 
When talking about object definitions we need a well defined language. Here are the most important ones:  
 
* [[Object Model/Object|/Object]]  
 
* [[Object Model/Object|/Object]]  
<ul><li style="list-style-type:none">An object is a "thing" in the object model. It does not have to be physical, but it needs ''boundaries'' that define what is and what is not an object of this class. Each object class has a [[Sub Page|SubPage]] of its own of the form <code><nowiki>/ThisObject</nowiki></code>. From the perspective of OO programming we are actually talking about object ''classes''.  
+
<ul><li style="list-style-type:none">An object is a "thing" in the object model. It does not have to be physical, but it needs ''boundaries'' that define what is and what is not an object of this class. Each object class has a [[Sub Page|SubPage]] of its own of the form <code><nowiki>/ThisObject</nowiki></code>. From the perspective of OO programming we are actually talking about object ''classes'', but it is tedious to always say "an object of the xy class".  
 +
<ul><li style="list-style-type:none">Note that [[Advanced Relationships|AdvancedRelationships]] are ''objects'' in the ObjectModel, since they have properties. An object-relationship cannot have properties.
 +
</ul>
 
</ul>
 
</ul>
 
* [[Object Model/Relationship|/Relationship]]  
 
* [[Object Model/Relationship|/Relationship]]  
Line 15: Line 17:
 
</ul>
 
</ul>
 
* [[Object Model/Group|/Group]]  
 
* [[Object Model/Group|/Group]]  
<ul><li style="list-style-type:none">a group (as in [[Track Grouping|TrackGrouping]]) is a an aspect of the reality [[MusicBrainz]] deals with. It groups all objects that represent this aspect. Currently there are three such groups: [[Object Model/Artist Group|/ArtistGroup]], [[Object Model/Album Group|/AlbumGroup]] and [[Object Model/Track Group|/TrackGroup]]. They help to get an overview.  
+
<ul><li style="list-style-type:none">A group (as in [[Track Grouping|TrackGrouping]]) is a an aspect of the reality [[MusicBrainz]] deals with. It groups all objects that represent this aspect. Currently there are three such groups: [[Object Model/Artist Group|/ArtistGroup]], [[Object Model/Album Group|/AlbumGroup]] and [[Object Model/Song Group|/SongGroup]]. They help to get an overview.  
 
</ul>
 
</ul>
 
* [[Object Model/Entity|/Entity]]  
 
* [[Object Model/Entity|/Entity]]  
Line 25: Line 27:
 
==The Object Model==
 
==The Object Model==
  
The actual obejct model currently cosists of the following elements:  
+
The actual object model currently consists of the following elements:  
* [[Object Model/Artist Group|/ArtistGroup]]  
+
* [[Object Model/Artist Group|/ArtistGroup]], or "diagonal bamboo":
 +
<ul><li style="list-style-type:none">This is a refinement of [[Object Model/Artist Thoughts|/ArtistThoughts]]
 +
</ul>
 
** [[Object Model/Artist Object|/ArtistObject]]  
 
** [[Object Model/Artist Object|/ArtistObject]]  
 +
** [[Object Model/Release Artist Object|/ReleaseArtistObject]]
 +
<ul><li style="list-style-type:none">I propose renaming this to [[Object Model/Artist Label Object|/ArtistLabelObject]] as a [[Release Artist|ReleaseArtist]] is something different now --[[User:Shepard|Shepard]]
 +
<ul><li style="list-style-type:none">Why, is a [[Release Artist|ReleaseArtist]] not exactly what we are talking about? "the Artist that appears in the 'artist' field of a Release. There can only be one release artist for each release" (citing [[Release Artist|ReleaseArtist]]). The difference is that under [[Nadelnder Bambus|NadelnderBambus]] a release additionally belongs to an album which has one or more '[[Album Artist|AlbumArtist]]s', and that the '[[Release Artist|ReleaseArtist]]' is related to the Artists is is composed of. IMO the name is still ok. --[[User:DonRedman|DonRedman]]
 +
<ul><li style="list-style-type:none">[[Release Artist|ReleaseArtist]] now means the artist of a release object. What was meant here was "a label for the artist name how it is written on releases". This is especially different since it will be linked to release objects _and_ track objects! --[[User:Shepard|Shepard]] I think I can explain this better: it is about the role of the object. At the moment we have that an Artist object is called [[Release Artist|ReleaseArtist]] when it is linked to a Release object and [[Track Artist|TrackArtist]] when it is linked to a Track object. In NGS an [[Artist Label|ArtistLabel]] would be called [[Release Artist|ReleaseArtist]] when it is linked to a Release object and [[Track Artist|TrackArtist]] when it is linked to a Track object. So if you say [[Artist Label|ArtistLabel]] == [[Release Artist|ReleaseArtist]] that would be the same as saying Artist == [[Release Artist|ReleaseArtist]]. --[[User:Shepard|Shepard]]
 +
<ul><li style="list-style-type:none">OK, I got it. But [[Artist Label|ArtistLabel]] ist a terrible term. "Label" is something else in musical contexts. Using this only makes things worse IMO. I would not mind too much how the terminology of the object model fits with the current terminology. IIRC the alternative name we had on [[MusicBrainz Summit 7|MusicBrainzSummit7]] was [[Object Model/Attributed Artist|/AttributedArtist]]. Does that help? --[[User:DonRedman|DonRedman]]
 +
</ul>
 +
</ul>
 +
</ul>
 +
</ul>
  
* [[Object Model/Album Group|/AlbumGroup]]  
+
* [[Object Model/Album Group|/AlbumGroup]], or "vertical bamboo":
<ul><li style="list-style-type:none">God, we don't know yet. This is a terribly complicated area. See [[Album Handling Philosophy|AlbumHandlingPhilosophy]], [[Album Rework|AlbumRework]], [[Release Groups|ReleaseGroups]] and all the others.  
+
<ul><li style="list-style-type:none">Based on [[Release Handling Philosophy|ReleaseHandlingPhilosophy]], [[Album Rework|AlbumRework]], [[Release Groups|ReleaseGroups]] etc.  
 
</ul>
 
</ul>
* [[Object Model/Track Group|/TrackGroup]]  
+
** [[Object Model/Album Object|/AlbumObject]]
<ul><li style="list-style-type:none">This is mostly based on [[Track Grouping|TrackGrouping]]  
+
** [[Object Model/Release Object|/ReleaseObject]]
*  [[Object Model/Song Object|/SongObject]]  
+
*** [[Object Model/Release Event Object|/ReleaseEventObject]]
 +
 
 +
** [[Object Model/Medium Object|/MediumObject]]
 +
*** [[Object Model/TOC Object|/TOCObject]]
 +
 
 +
** [[Object Model/Track Object|/TrackObject]]
 +
 
 +
* [[Object Model/Song Group|/SongGroup]], or "horizontal bamboo":
 +
<ul><li style="list-style-type:none">This is mostly based on [[Track Grouping|TrackGrouping]]. There are also some thoughts about [[Object Model/Representing Remixes|/RepresentingRemixes]]  
 +
*  [[Object Model/Song Object|/SongObject]] (not part of the [[Next Generation Schema|NextGenerationSchema]])
 
*  [[Object Model/Composition Object|/CompositionObject]]  
 
*  [[Object Model/Composition Object|/CompositionObject]]  
*  [[Object Model/Arrangement Object|/ArrangementObject]]
+
*  [[Object Model/Recording Object|/RecordingObject]]  
*  [[Object Model/Performance Recording Object|/PerformanceRecordingObject]]  
 
 
*  [[Object Model/Mix Object|/MixObject]]  
 
*  [[Object Model/Mix Object|/MixObject]]  
 
*  [[Object Model/Master Object|/MasterObject]]  
 
*  [[Object Model/Master Object|/MasterObject]]  
*  [[Object Model/Track Object|/TrackObject]]  
+
* * [[Object Model/Fingerprint Object|/FingerprintObject]]
 +
 
 +
*  [[Object Model/Track Object|/TrackObject]] (yes, that one is in both groups)
 
</ul>
 
</ul>
 +
* The "pins" (these are not included in the graphic yet, sorry):
 +
** [[Object Model/Release Title Object|/ReleaseTitleObject]] (inbetween [[Object Model/Release Object|/ReleaseObject]] and [[Object Model/Release Artist Object|/ReleaseArtistObject]])
 +
** [[Object Model/Medium Title Object|/MediumTitleObject]] (of the [[Object Model/Medium Object|/MediumObject]])
 +
** [[Object Model/Track Title Object|/TrackTitleObject]] (inbetween [[Object Model/Track Object|/TrackObject]] and [[Object Model/Release Artist Object|/ReleaseArtistObject]])
 +
** and additionally 
 +
*** [[Object Model/Uber Title Object|/UberTitleObject]] and
 +
*** [[Object Model/Sub Title Object|/SubTitleObject]]
 +
 +
The following graphic describes the ObjectModel as refined on the summit (code-named "[[Nadelnder Bambus|NadelnderBambus]]"). Note that the names have changed and might change again. Sorry for that:
 +
 +
[[Image:NadelnderBambus_0_1.png]]
 +
 +
See the attachments page for some older graphs.
 +
 +
==Examples==
 +
 +
Now that we have completed a first stab at the objects, we need to check whether they actually fit the reality. Big thanks to everybody who contributed to this list in the [http://www.nabble.com/Next-Generation-Database-Schema-t614803c2885.html#a1641780 Next Generation Database Schema thread] on the [[Users Mailing List|UsersMailingList]].
 +
# [[Object Model/Fela ITT Example|/FelaITTExample]], showing an release that is a merge of two previously released releases, and a track that is a merge of two previously separated tracks.
 +
# [[Object Model/Giant Xmas Example|/GiantXmasExample]], showing a Japanes one-time project as [[Release Artist|ReleaseArtist]].
 +
# [[Object Model/Shuuji And Akira Example|/ShuujiAndAkiraExample]],  showing different [[Release Artist|ReleaseArtist]] and [[Track Artist|TrackArtist]]s plus confusing aliases and [[Performance Name|PerformanceName]]s.
 +
# [[Object Model/Terra Revolution Example|/TerraRevolutionExample]], showing one release with a single track being a megamix of another release.
 +
# [[Object Model/Party People Example|/PartyPeopleExample]], showing an release containing one track being a megamix of all other tracks.
 +
# [[Object Model/Cassetteboy Example|/CassetteboyExample]], showing an artist who changes his performance name for every track.
 +
# [[Object Model/Run Time All Stars Example|/RunTimeAllStarsExample]], showing varying and vague artist collaboration that had only this one release.
 +
# [[Object Model/Ahhco Example|/AhhcoExample]], showing one track by another artist on a single artist release.
 +
# [[Object Model/Electric Light Orchestra Example|/ElectricLightOrchestraExample]], showing an release that has a different name in one country
 +
# [[Object Model/Angeldust Example|/AngeldustExample]], showing two releases with exact same content, but released under different artist and title.
 +
# [[Object Model/Chants Magnetiques Example|/ChantsMagnetiquesExample]] , showing two localized variants onf one release.
 +
# [[Object Model/Don Sebsky Example|/DonSebskyExample]], showing the case of a Jazz composer.
 +
# [[Tracks With Multiple Artists|TracksWithMultipleArtists]] contains an example of its own, showing tracks that consist of more than one song by more than one artist
 +
# [[Object Model/Queen Platinum Collection Example|/QueenPlatinumCollectionExample]], showing releases that were re-released as a box set without remastering.
 +
# [[Object Model/Gyllene Tider Example|/GylleneTiderExample]], showing releases that were re-released as a box set without remastering, and later as single  remastered releases.
 +
# [[Object Model/Jesus Christ Superstar Example|/JesusChristSuperstarExample]], which has tracks containing two songs and poses a challenge to the [[Track Group|TrackGroup]] and AR.
 +
# [[Object Model/Depeche Mode Remixes Example|/DepecheModeRemixesExample]], showing identical discs on different releases and other problems.
  
[[Category:To Be Reviewed]]
+
[[Category:History]] [[Category:Development]]

Latest revision as of 20:08, 25 October 2011

Status: Attention.png This page needs to be updated to reflect the results of the MusicBrainzSummit7

This page and its subpages form a document that tries to describe the reality that MusicBrainz deals with as abstract /Objects with Properties and /Relationships. This document is not about a database schema. Its purpose is to understand what we are dealing with. Of course, this effort is strongly related to the creation of a NextGenerationSchema.

This document is written in the form of CollectiveWe, and you are invited to BeBold and write things like "we seem to (dis)agree" or "we have forgotten an important aspect...". This should avoid lengthy threaded discussions.

Definitions

When talking about object definitions we need a well defined language. Here are the most important ones:

  • An object is a "thing" in the object model. It does not have to be physical, but it needs boundaries that define what is and what is not an object of this class. Each object class has a SubPage of its own of the form /ThisObject. From the perspective of OO programming we are actually talking about object classes, but it is tedious to always say "an object of the xy class".
    • Note that AdvancedRelationships are objects in the ObjectModel, since they have properties. An object-relationship cannot have properties.
  • A relationship is what links two objects together. This is not a relation as in relational database. So please do not talk about 1:n or n:m relations. A relationship has two such pairs. E.g. An AObject can own 0--many BObjects. A BObject is owned by 0--1 AObjects.
  • An entity is an actual element of the database schema. While this document is not about entities, we might want to talk about them nonetheless. E.g. which objects should be merged into one entity?

These were the most important. The rest is for later.

The Object Model

The actual object model currently consists of the following elements:

  • I propose renaming this to /ArtistLabelObject as a ReleaseArtist is something different now --Shepard
    • Why, is a ReleaseArtist not exactly what we are talking about? "the Artist that appears in the 'artist' field of a Release. There can only be one release artist for each release" (citing ReleaseArtist). The difference is that under NadelnderBambus a release additionally belongs to an album which has one or more 'AlbumArtists', and that the 'ReleaseArtist' is related to the Artists is is composed of. IMO the name is still ok. --DonRedman
      • ReleaseArtist now means the artist of a release object. What was meant here was "a label for the artist name how it is written on releases". This is especially different since it will be linked to release objects _and_ track objects! --Shepard I think I can explain this better: it is about the role of the object. At the moment we have that an Artist object is called ReleaseArtist when it is linked to a Release object and TrackArtist when it is linked to a Track object. In NGS an ArtistLabel would be called ReleaseArtist when it is linked to a Release object and TrackArtist when it is linked to a Track object. So if you say ArtistLabel == ReleaseArtist that would be the same as saying Artist == ReleaseArtist. --Shepard
        • OK, I got it. But ArtistLabel ist a terrible term. "Label" is something else in musical contexts. Using this only makes things worse IMO. I would not mind too much how the terminology of the object model fits with the current terminology. IIRC the alternative name we had on MusicBrainzSummit7 was /AttributedArtist. Does that help? --DonRedman

The following graphic describes the ObjectModel as refined on the summit (code-named "NadelnderBambus"). Note that the names have changed and might change again. Sorry for that:

NadelnderBambus 0 1.png

See the attachments page for some older graphs.

Examples

Now that we have completed a first stab at the objects, we need to check whether they actually fit the reality. Big thanks to everybody who contributed to this list in the Next Generation Database Schema thread on the UsersMailingList.

  1. /FelaITTExample, showing an release that is a merge of two previously released releases, and a track that is a merge of two previously separated tracks.
  2. /GiantXmasExample, showing a Japanes one-time project as ReleaseArtist.
  3. /ShuujiAndAkiraExample, showing different ReleaseArtist and TrackArtists plus confusing aliases and PerformanceNames.
  4. /TerraRevolutionExample, showing one release with a single track being a megamix of another release.
  5. /PartyPeopleExample, showing an release containing one track being a megamix of all other tracks.
  6. /CassetteboyExample, showing an artist who changes his performance name for every track.
  7. /RunTimeAllStarsExample, showing varying and vague artist collaboration that had only this one release.
  8. /AhhcoExample, showing one track by another artist on a single artist release.
  9. /ElectricLightOrchestraExample, showing an release that has a different name in one country
  10. /AngeldustExample, showing two releases with exact same content, but released under different artist and title.
  11. /ChantsMagnetiquesExample , showing two localized variants onf one release.
  12. /DonSebskyExample, showing the case of a Jazz composer.
  13. TracksWithMultipleArtists contains an example of its own, showing tracks that consist of more than one song by more than one artist
  14. /QueenPlatinumCollectionExample, showing releases that were re-released as a box set without remastering.
  15. /GylleneTiderExample, showing releases that were re-released as a box set without remastering, and later as single remastered releases.
  16. /JesusChristSuperstarExample, which has tracks containing two songs and poses a challenge to the TrackGroup and AR.
  17. /DepecheModeRemixesExample, showing identical discs on different releases and other problems.