Difference between revisions of "Relationships"

From MusicBrainz Wiki
(migration fix, removed absolete parts (covered elsewhere) (Imported from MoinMoin))
(Trying to make some real documentation. (Imported from MoinMoin))
Line 1: Line 1:
=This page is a stub for the future AdvancedRelationships documentation=
+
=Advanced Relationships Documentation=
  
'''Status:''' ''This page is absolute work in progress, it is not a documentation of what AdvancedRelationships is but of the issues that we have with it now. --[[User:DonRedman|DonRedman]]''  
+
'''Status:''' ''This page is work in progress''  
  
 
==Introduction==
 
==Introduction==
 
''Here's some introductory text I wrote to explain AR.  I don't know whether it belongs here or on the main AdvancedRelationships page'' --[[User:MatthewExon|MatthewExon]]
 
  
 
Advanced Relationships is a way to represent all the "miscellaneous" relationships between [[Artist]]s, [[Album]]s and [[Track]]s that are stored in the [[MusicBrainz Database|MusicBrainzDatabase]].  For example:  
 
Advanced Relationships is a way to represent all the "miscellaneous" relationships between [[Artist]]s, [[Album]]s and [[Track]]s that are stored in the [[MusicBrainz Database|MusicBrainzDatabase]].  For example:  
Line 12: Line 10:
 
* The Metallica album [http://musicbrainz.org/album/5997cf87-5225-4830-9edf-358638a24905.html St. Anger] was produced by [http://musicbrainz.org/artist/4f0730d0-fd52-4818-8a5d-f3f69ce8f378.html Bob Rock] & [http://musicbrainz.org/artist/65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab.html Metallica].  
 
* The Metallica album [http://musicbrainz.org/album/5997cf87-5225-4830-9edf-358638a24905.html St. Anger] was produced by [http://musicbrainz.org/artist/4f0730d0-fd52-4818-8a5d-f3f69ce8f378.html Bob Rock] & [http://musicbrainz.org/artist/65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab.html Metallica].  
  
All of this information is stored in a single table in the database, and there is a single user interface for adding new information.  
+
All of this information is stored in a single table in the database, and there is a single user interface for adding new information. In this way, [[MusicBrainz]] has a fairly simple way to deal with extremely complicated data.
 +
 
 +
==Getting Started==
 +
 
 +
There is a tutorial at [[Advanced Relationship Tutorial|AdvancedRelationshipTutorial]].
 +
 
 +
==Advanced Relationship Types==
  
 
Each relationship entered by a user belongs to one [[Advanced Relationship Type|AdvancedRelationshipType]].  These types define:  
 
Each relationship entered by a user belongs to one [[Advanced Relationship Type|AdvancedRelationshipType]].  These types define:  
Line 19: Line 23:
 
* The [[Link Phrase|LinkPhrase]]s of the relationships, which describe how to write the relationship information in English sentences.  
 
* The [[Link Phrase|LinkPhrase]]s of the relationships, which describe how to write the relationship information in English sentences.  
  
These [[Advanced Relationship Type|AdvancedRelationshipType]]s are themselves simply entries in another database table.  This means that new ones can be defined, old ones deleted, and existing ones modified through the same editing and voting system used for any other kind of [[MusicBrainz]] data.  Since this data is much more critical than any other individual entries, editing of [[Advanced Relationship Type|AdvancedRelationshipType]]s is limited to selected users, called [[Relationship Editor|RelationshipEditor]]s.  However, there are more relationship editors than developers, and the process of adding a new relationship type is much simpler than adding a new database table.  
+
For example, the advanced relationship type "[[Performer Relationship Type|PerformerRelationshipType]]" can be used to link an artist (for example, [http://musicbrainz.org/artist/618b6900-0618-4f1e-b835-bccb17f84294.html Eric Clapton]) to a track on which they performed (for example, [http://musicbrainz.org/track/64d0220a-0587-43c9-b7e3-809e8c06542b.html Runaway Train]).  The definition of [[Performer Relationship Type|PerformerRelationshipType]] allows an optional attribute to specify the instrument he played ([[Instrument Relationship Attribute|InstrumentRelationshipAttribute]]), so you can say if he played guitar.  The definition also says how to construct an English sentence out of this data, so that the website can display the words "Runaway Train was performed by Eric Clapton".
 +
 
 +
These [[Advanced Relationship Type|AdvancedRelationshipType]]s are themselves simply entries in another database table.  This means that new ones can be defined, old ones deleted, and existing ones modified through the same editing and voting system used for any other kind of [[MusicBrainz]] data.  Since this data is much more important than any other individual entries, editing of [[Advanced Relationship Type|AdvancedRelationshipType]]s is limited to selected users, called [[Relationship Editor|RelationshipEditor]]s.  There are more relationship editors than developers, and the process of adding a new relationship type is much simpler than adding a new database table, so this is a very fast way to expand and improve the [[MusicBrainz Database|MusicBrainzDatabase]].  
  
Therefore, the AdvancedRelationships system represents a way to extend the [[MusicBrainz]] schema quickly and easily, and thus store far more diverse and complicated data.  
+
A list of all of the relationship types defined so far is kept at [[Advanced Relationship Types|AdvancedRelationshipTypes]].  That page also links to documentation for each individual type.  
  
 
==ArtistRoleInheritance==
 
==ArtistRoleInheritance==

Revision as of 14:46, 22 August 2005

Advanced Relationships Documentation

Status: This page is work in progress

Introduction

Advanced Relationships is a way to represent all the "miscellaneous" relationships between Artists, Albums and Tracks that are stored in the MusicBrainzDatabase. For example:

All of this information is stored in a single table in the database, and there is a single user interface for adding new information. In this way, MusicBrainz has a fairly simple way to deal with extremely complicated data.

Getting Started

There is a tutorial at AdvancedRelationshipTutorial.

Advanced Relationship Types

Each relationship entered by a user belongs to one AdvancedRelationshipType. These types define:

  • Which entities will be related (artists, albums, tracks, etc)
  • What AdvancedRelationshipAttributes go along with the relationship
  • The LinkPhrases of the relationships, which describe how to write the relationship information in English sentences.

For example, the advanced relationship type "PerformerRelationshipType" can be used to link an artist (for example, Eric Clapton) to a track on which they performed (for example, Runaway Train). The definition of PerformerRelationshipType allows an optional attribute to specify the instrument he played (InstrumentRelationshipAttribute), so you can say if he played guitar. The definition also says how to construct an English sentence out of this data, so that the website can display the words "Runaway Train was performed by Eric Clapton".

These AdvancedRelationshipTypes are themselves simply entries in another database table. This means that new ones can be defined, old ones deleted, and existing ones modified through the same editing and voting system used for any other kind of MusicBrainz data. Since this data is much more important than any other individual entries, editing of AdvancedRelationshipTypes is limited to selected users, called RelationshipEditors. There are more relationship editors than developers, and the process of adding a new relationship type is much simpler than adding a new database table, so this is a very fast way to expand and improve the MusicBrainzDatabase.

A list of all of the relationship types defined so far is kept at AdvancedRelationshipTypes. That page also links to documentation for each individual type.

ArtistRoleInheritance

There are now multiple levels at which an artist's role on a song can be recorded: you can relate the artist to the song, to the album, or to the band that recorded the song. So it's now non-trivial to figure out the full list of people who should be credited for any given track. The page ArtistRoleInheritance goes into the implications of this in some depth.