MusicBrainz Database/Schema: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
Line 64: Line 64:


[[Image:ngs.png|500px|border]]
[[Image:ngs.png|500px|border]]

Because we are adding new core entities, and there are plans for adding more, ARs between them need to be optimized. Only the absolutely necessary information is in l_*_* tables, everything else is shared:

[[Image:ngs-ars.png|300px|border]]

== Code Changes ==

TODO

http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

Revision as of 08:08, 7 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:

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. Examples:

  • Album version of the track "Into the Blue" by "Moby"
  • Remix "Into the Blue (Buzz Boys Main Room Mayhem mix)" by "Moby"
  • Remix "Into the Blue (Underground mix)" by "Moby"

Work

One layer above the master tracks ("song", "composition", etc.). While track represents unique audio data, work represents the abstract idea behind the track.

  • Song "Into the Blue" by "Moby" -- all the tracks listed above will be linked to this object

Label

Same as our current label entity.

Database Schema

This diagrams shows the core database tables and relationships between them:

ngs.png

Because we are adding new core entities, and there are plans for adding more, ARs between them need to be optimized. Only the absolutely necessary information is in l_*_* tables, everything else is shared:

ngs-ars.png

Code Changes

TODO

http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html