Skip to main content
Back to Standards
MusicBrainz Database Schema logo

MusicBrainz Database Schema

The relational database schema underlying MusicBrainz, an open music encyclopedia and metadata repository. The schema defines entities for artists, recordings, releases, release groups, works, labels, events, places, instruments, genres, areas, series, and URLs, along with a rich relationship system linking entities across types. Currently at schema version 30, it supports community-edited music metadata used by millions of applications worldwide.

Overview

The MusicBrainz Database Schema defines the relational structure behind MusicBrainz, one of the largest open music metadata repositories in the world. Maintained by the MetaBrainz Foundation, the schema has evolved over two decades to support community-curated metadata for millions of artists, recordings, releases, and works, serving as critical infrastructure for music identification, tagging, and discovery applications.

Background

MusicBrainz was founded in 2000 as an open alternative to the proprietary Compact Disc Database (CDDB/Gracenote). The project aimed to build a comprehensive, community-edited music encyclopedia with freely accessible data. The database schema has gone through 30 major versions, with each iteration refining the data model to better represent the complexity of music metadata -- from simple disc-based lookups to a rich entity-relationship model capable of expressing the full lifecycle of musical works, recordings, and releases.

Purpose & Scope

The schema is designed for developers querying the MusicBrainz PostgreSQL database directly or building applications that consume MusicBrainz data. It defines:

  • Primary entities: Area, Artist, Event, Genre, Instrument, Label, Place, Recording, Release, Release Group, Series, URL, and Work -- thirteen entity types that can be edited, searched, linked through relationships, and referenced by MusicBrainz Identifiers (MBIDs)
  • Secondary entities: Artist Credit, Medium, and Track -- entities linked through foreign keys rather than the relationship system
  • Complementary data: Aliases, annotations, edits, IPI/ISNI codes, MBID redirects, ratings, tags, and type classifications
  • Relationship system: A flexible link-type architecture with l_* tables for every combination of primary entity types, supporting typed, dated, and attributed connections
  • Archive structures: Cover Art Archive and Event Art Archive tables for managing artwork
  • CD Stubs: Tables for unverified disc submissions

Key Entities

Entity Description
Artist Musicians, groups, and other music professionals
Recording A unique mix or edit of audio, with title, duration, and ISRCs
Release A real-world product (CD, vinyl, digital download) with date, country, catalog number
Release Group Abstract album/single/EP grouping related releases
Work Compositional layer above recordings (songs, compositions)
Label Imprints and record labels
Event Concerts, festivals, and other live performances
Place Venues, studios, and other music-related locations
Instrument Musical instruments and instrument groupings
Genre Style and convention descriptors
Area Geographic entities (countries, regions, cities)
Series Sequences of related entities with a common theme
URL Links to external resources

Serializations & Technical Formats

The schema is defined as PostgreSQL SQL scripts maintained in the MusicBrainz Server GitHub repository. Data is available through:

  • PostgreSQL database dumps released regularly by MetaBrainz
  • JSON/XML API via the MusicBrainz web service
  • Live Data Feed for real-time replication of edits

Governance & Maintenance

The schema is maintained by the MetaBrainz Foundation, a non-profit organization based in Barcelona. Changes are discussed in the community forums and tracked via the MetaBrainz bug tracker. Schema upgrades are versioned and announced on the MetaBrainz blog with migration instructions. The community of volunteer editors makes all data changes through a voting and review system.

Core data (facts about music) is released into the public domain under CC0. Supplementary data (user ratings, tags) is available under CC BY-NC-SA 2.0.

Notable Implementations

MusicBrainz data and its schema underpin numerous applications:

  • MusicBrainz Picard -- the official audio file tagger
  • Spotify, BBC, Amazon -- use MusicBrainz identifiers for music cataloging
  • ListenBrainz, BookBrainz, AcousticBrainz -- sibling projects in the MetaBrainz ecosystem
  • Mp3tag, Yate Music Tagger, AudioRanger -- third-party taggers using the MusicBrainz API

Further Reading