Products > Database > DatabaseDocumentation > DatabaseSchema > Releases
Database Schema: Releases
See the Database Schema page for an overview of the MusicBrainz Database and links to pages which describe each parts of the schema in more detail (like this page).
Each release lives in the album table, and is attributed to a single release artist.
For efficiency reasons, a few tidbits of information are kept in de-normalised form in the albummeta table. The rows in this table normally correspond one-to-one with those in the album table - in other words, the "id" used is exactly the same as that in the album table. If the albummeta row is missing, it is re-calculated and inserted the first time it is requested by the application. The albummeta holds information like the number of tracks, disc IDs and TRM IDs on that release, such that they do not have to be recalculated every time from the child tables. This number is recalculated, if any of the child element changes (i.e. if a track is added using an add track edit).
DiscIDs are stored in three forms:
the track count, track offsets (track 1 to track 99), and leadout figures (where each of them is just an integer)
the CD TOC, which is essentially all of the above numbers listed listed together in one long string (joined by spaces)
the MusicBrainz Disc ID (a 28-character string)
The track count, offsets and leadout are stored in the toc table, the TOC is stored in the discid table, and the 28-character disc ID is stored in both the discid and toc tables. When a client is requesting release information based on a given disc ID, then the matching record is found in the discid table (the toc table could have been used instead, but using the "discid" table is more efficient, because it has fewer columns). When we try to find a release using a "fuzzy" TOC match, then we look up the data in the "toc" table.
id - unique number that references the release.
artist - integer that corresponds to the id field in the artist table.
name - name of the release.
gid - a MBID that uniquely identifies the release for its whole lifecycle. Currently, the MBIDs of releases that are merged into others are lost, there is a pending RFE for this.
modpending - an integer representing the total number of mods pending on the release. This does not including mods pending for the individual tracks, only release data.
attributes - a PostgreSQL array field that holds several integers. Each integer has a meaning as specified in
Album.pm page -
language - an integer that corresponds to the id field of the language table
script - an integer that corresponds to the id field of the script table
modpending_lang - an integer that corresponds to the id field of the language table relating to the pending moderations
CategoryWikiDocsPage CategoryDevelopment







