Difference between revisions of "MusicBrainz Database/Schema"

From MusicBrainz Wiki
m (14 revision(s))
Line 1: Line 1:
=Simplified NGS=
+
== Objects ==
  
<ul><li style="list-style-type:none">[[Image:Attention.png]] '''Status''': Old braindump, needs updating. Go to [[Next Generation Schema|NextGenerationSchema]] instead for now. :)
+
=== Artist ===
</ul>
 
  
There is a lot of ideas about [[Next Generation Schema|NextGenerationSchema]]. Unfortunately the resources to implement them are limited, and complex models like [[Object Model|ObjectModel]], [[Track Grouping|TrackGrouping]] and [[Album Rework|AlbumRework]] are probably not going to happen in near future. So, I've decided to simplify these proposals to implementable shapes and then try to start working on them.  
+
Same as our current [[Artist|artist]] entity, but with new "country" and "genre" attributes.
  
==Entities==
+
=== Artist Credit ===
  
===Work===
+
List of artists, variations of artist names and pieces of text to join the artist names. Examples:
  
This the most abstract entity, a musical work. In terms of [[Track Grouping|TrackGrouping]], it can represent songs, composition, arrangements, recordings and mixes. Works can be interlinked with [[Advanced Relationships|AdvancedRelationships]] (covers, remixes, ...).
+
* "''[[Artist:0383dadf-2a4e-4d10-a46a-e9e041da8eb3|Queen]] & [[Artist:5441c29d-3602-4898-b1a1-b77fa23b8e50|David Bowie]]''" -- two artists ("Queen" and "David Bowie"), no name variations, joined with " & "
 +
* "''[[Artist:86e2e2ad-6d1b-44fd-9463-b6683718a1cc|Jean-Michel Jarre]]*''" -- one artist ("Jean Michel Jarre"), name variation "Jean-Michel Jarre"
  
===Track===
+
=== Release Group ===
  
Track is a work on a specific release and can have attached PUIDs. Tracks will have no AR types, all track ARs will be transparently added to works instead.  
+
Represents an abstract "album" entity. Technically it's a group of releases, with a specified type. The type is the same as current [[Release Type|release type]]. Examples:
  
===Disc===
+
* Single "''Under Pressure''" by "''[[Artist:0383dadf-2a4e-4d10-a46a-e9e041da8eb3|Queen]] & [[Artist:5441c29d-3602-4898-b1a1-b77fa23b8e50|David Bowie]]''"
 +
* Album "''The Wall''" by "''[[Artist:83d91898-7763-47d7-b03b-b92132375c47|Pink Floyd]]''"
  
This is what MB used to call "album", now "release". It's simply a list of tracks and can have attached [[Disc ID|DiscID]]s. This entity will only visible as a part of a release, never on it's own.
+
=== Release ===
  
===Release===
+
Real-world release object you can buy in your music store. It has release date and country, list of catalog number and label pairs, packaging type and release status. Example:
  
Release is a set of discs, with date, country, label and catalog number. MB currently calls it "release event" and it's linked to "discs", but the other way around. Instead of the current "disc A was released on X and Y" and "disc B was released on Y", it will be "release X contains disc A" and "release Y contains discs A and B". The relation between discs and releases contains information about disc number, title and format (e.g. it's possible to use single disc for both vinyl and CD releases). A release can't have multiple "release events" -- if it has a different catalog number, it's simply a different release.
+
* 1984 US release of "''The Wall''" by "''[[Artist:83d91898-7763-47d7-b03b-b92132375c47|Pink Floyd]]''", release on label "''Columbia Records''" with catalog number "C2K 36183" and UPC "074643618328", it's an official release and comes with two CDs in jewel case.
  
===Album===
+
=== Medium ===
  
Album is a group of releases. This can be used link all editions or re-releases of an album, maybe also for series of compilations, etc.  
+
Piece of physical media, included in a release. It has information about the format, position in the release and an optional title. Example:
  
==Proposed Roadmap==
+
* CD1 of the 1984 US release of "''The Wall''" by "''Pink Floyd''"
 +
* CD2 of the 2005 UK release of "''Aerial''" by "''Kate Bush''", named "''A Sky of Honey''"
  
# [[Image:Checkmark.png]] Add label, cat# and barcode fields to release events.
+
=== Tracklist ===
# Remove the '''albumjoin''' table. This is technically not necessary, but we don't need N:M relations here and can save the DB load for other new features.
 
# Add the "Work" entity (table '''work''').
 
# Add table '''album_release''' to allow N:M relations between discs and releases.
 
# Reverse the meaning '''album_release''' and make releases the primary entities on the website.
 
# Add the "Album" entity (table '''album2''').
 
  
==Database Schema==
+
Simple list of tracks, tracklists are used by mediums.
  
The new schema is actually not very different from the current one. The main difference are two new tables "work" and "album2" (I wanted to avoid renaming of existing tables) and reversed relation between tables "release" and "album".
+
=== Tracklist Track ===
  
[[Image:LukasLalinsky/ngs.png]]
+
This object is not visible to users on it's own, only in the context of a tracklist. It contains a link to a track, title, artist credit and the position on the tracklist.
  
Here is a version with renamed tables:
+
=== Track ===
  
[[Image:ngs_fixed.png]]  
+
Represents the "master" track. Has title, artist credit, duration, list of [[PUID]]s and [[ISRC]]s.
  
==Questions==
+
=== Label ===
  
Why is there an artist column in WORK? --[[User:davitof|davitof]] 2007-03-16
+
Same as our current [[Label|label]] entity.
<ul><li style="list-style-type:none">Because I think WORKs should be assigned to artists. Not all WORKs have to be linked to TRACKs, so we need a way to determine the artist 
 
<ul><li style="list-style-type:none">As usual, I wasn't clear enough. I meant: aren't there cases where there is more than one ARTIST and shouldn't the artist(s) be linked to the work by a 1-n relation? Here I feel that NGS is not precise enough. Using 1-n relations would avoid creating ARTISTs for collaborations more often than when they are really historically meaningful. Furthermore, it would allow to make the ARTIST - WORK relation more abstract: an artist may have composed, written the text, arranged... the work. OTOH, your NGS proposal is identical to the current MB schema, so my question can be for a future evolution. --[[User:davitof|davitof]] 2007-03-16
 
<ul><li style="list-style-type:none">The idea is that the ARTIST column for WORK/TRACK/RELEASE/ALBUM is a "label" - it doesn't specify who did what, only who it's usually credited to. If the single artist column is not enough for this, then I'd rather drop it at all. For more detailed ARTIST - WORK relations we have ARs. I don't think we need to duplicate them and implement one more "generic" linking system.  Btw, there is some more info about this on [[Getting Rid Of Featuring Artist Style|GettingRidOfFeaturingArtistStyle]]. After thinking about it, I'm starting to like this solution again... And yes, DB-wise is the schema very similar to the current one. But a big difference is the presentation layer. My primary goal is to avoid duplication:
 
  * If a TRACK appears on N DISCs, there is no need to add "composed by" ARs to each of them.
 
  * If two DISCs are released on one RELEASE, there is no need to have two RELEASE entities, each attached to each disc. Ok, let's forget about it.. for now ;-) --[[User:davitof|davitof]] 2007-03-16
 
 
 
</ul>
 
</ul>
 
</ul>
 
 
 
--[[User:LukasLalinsky|LukasLalinsky]] 
 
 
 
I suggest renaming RELEASE to something else to avoid confusions with the current release concept in MB (I know, there has already been a discussion about what term should be used for this) --[[User:davitof|davitof]] 2007-03-16
 
<ul><li style="list-style-type:none">I don't think there will be much confusion. "release events" used to be called RELEASE, in database and the server code still are called that way, and in fact ''are'' releases. The only problem is in the way they are linked to DISCs. --[[User:LukasLalinsky|LukasLalinsky]]
 
</ul>
 
 
 
From a documentation (and [[Wiki Wardening|WikiWardening]]) point of view, does this means that the term ''release'' will be replaced by ''album''? I am wondering since I'm currently fixing the [[Bad Terminology|BadTerminology]] Album -> ''Release'' -- [[User:murdos|murdos]] 21:01, 24 April 2007 (UTC)
 
<ul><li style="list-style-type:none">No, what's currently ''release'' will most likely become ''disc''. But don't take anything from this page too seriously, it's just an old idea. I already have a couple of changes in my mind. -- [[User:LukasLalinsky|LukasLalinsky]] 21:20, 24 April 2007 (UTC)
 
</ul>
 

Revision as of 21:07, 6 April 2009

Objects

Artist

Same as our current artist entity, but with new "country" and "genre" attributes.

Artist Credit

List of artists, variations of artist names and pieces of text to join the artist names. Examples:

  • "Queen & David Bowie" -- two artists ("Queen" and "David Bowie"), no name variations, joined with " & "
  • "Jean-Michel Jarre*" -- one artist ("Jean Michel Jarre"), name variation "Jean-Michel Jarre"

Release Group

Represents an abstract "album" entity. Technically it's a group of releases, with a specified type. The type is the same as current release type. Examples:

Release

Real-world release object you can buy in your music store. It has release date and country, list of catalog number and label pairs, packaging type and release status. Example:

  • 1984 US release of "The Wall" by "Pink Floyd", release on label "Columbia Records" with catalog number "C2K 36183" and UPC "074643618328", it's an official release and comes with two CDs in jewel case.

Medium

Piece of physical media, included in a release. It has information about the format, position in the release and an optional title. Example:

  • CD1 of the 1984 US release of "The Wall" by "Pink Floyd"
  • CD2 of the 2005 UK release of "Aerial" by "Kate Bush", named "A Sky of Honey"

Tracklist

Simple list of tracks, tracklists are used by mediums.

Tracklist Track

This object is not visible to users on it's own, only in the context of a tracklist. It contains a link to a track, title, artist credit and the position on the tracklist.

Track

Represents the "master" track. Has title, artist credit, duration, list of PUIDs and ISRCs.

Label

Same as our current label entity.