To aid creating Openmusic-Compatible servers, and for educational purposes.
OMDB (Openmusic Database) is the worlds largest openly downloadable database with metadata for over 154 million songs, 28 million albums, and 5 million artists. (4x larger than MusicBrainz, ~same as Discogs [1])
fulldb.tar 80.3 GB -> 172 GB, Created Oct 2 2024, Expires Dec 21 2024
154,331,239 tracks, 28,046,579 albums, 5,779,932 artists, 154,494,422 playbacks
litedb.tar 12.8 GB -> 32 GB, Created Oct 2 2024, Expires Dec 21 2024
23,171,125 tracks, 4,773,576 albums, 6,639,289 artists, 23,234,561 playbacks
The OMDB is for research purposes only. Public use of the database is permitted, however it is your responsibility to ensure that copyright laws for your country are followed. Failure to do so may result in legal pursuit by the owners of the content you are infringing on. Research your country's copyright laws before proceeding.
fulldb.tar
is a dump of a PostgreSQL 15 database. To use it, you must first create an empty PostgreSQL 15 database, and then restore using the tar file.
DO NOT unzip the tar file. For that matter, do not unzip/open any file downloaded from the internet, unless you're using the proper tools as shown below.
fulldb.tar
restores into a database that is 175 GB, and litedb.tar
into 27 GB. Make sure you have sufficient storage before proceeding.
I recommend using a GUI such as pgAdmin, or you can use the terminal.
This will create an empty database called fulldb, assuming PostgreSQL is installed in /Library
:
/Library/PostgreSQL/15/bin/createdb -W fulldb
Next, write fulldb.tar to the database fulldb:
/Library/PostgreSQL/15/bin/pg_restore -W -d fulldb < fulldb.tar
On my Macbook Pro (M1 Pro 2021), this step takes about 4 hours with this file. Once restored, you can query the database via pgAdmin, or a library such as pg (Node JS) or psycopg2 (Python). Your first step should be to run "ANALYZE" to speed up full-text search.
- Description: Stores information about artists.
- Columns:
ID
: TEXT, Primary KeyName
: TEXTProfile_Photo
: TEXTSubscribers
: INT
- Description: Stores information about albums.
- Columns:
ID
: TEXT, Primary KeyTitle
: TEXTArtwork
: TEXTType
: TEXTYear
: INT
- Description: Stores playback data, including the audio and video YouTube ID.
- Columns:
ID
: SERIAL, Primary KeyAudio_YTID
: TEXTVideo_YTID
: TEXTAudio_Live
: TEXTIs_Explicit
: INT
- Description: Stores information about tracks, including indexed search vectors and trigram indexes.
- Columns:
ID
: TEXT, Primary KeyPlayback_Clean
: INT, ReferencesPlaybacks(ID)
Playback_Explicit
: INT, ReferencesPlaybacks(ID)
MXID
: TEXTTitle
: TEXTRuntime_Seconds
: INTViews
: INTAlbum_Index
: INTAlbum
: TEXT, ReferencesAlbums(ID)
TitleTrgm
: TEXTAlbumTrgm
: TEXTArtistsTrgm
: TEXTtitle_vector
: tsvectoralbum_vector
: tsvectorartist_vector
: tsvectorcombined_vector
: tsvector
- Description: Defines an Album's base album. "Album 1" and "Album 1 (Deluxe)" have equal baseIDs.
- Columns:
relatedID
: TEXTbaseID
: TEXT
- Description: Relationship between artists and albums.
- Columns:
Artist_ID
: TEXT, ReferencesArtists(ID)
Album_ID
: TEXT, ReferencesAlbums(ID)
- Composite Primary Key: (
Artist_ID
,Album_ID
)
- Description: Relationship between artists and tracks.
- Columns:
Artist_ID
: TEXT, ReferencesArtists(ID)
Track_ID
: TEXT, ReferencesTracks(ID)
- Composite Primary Key: (
Artist_ID
,Track_ID
)
- Description: Relationship between featured artists and tracks.
- Columns:
Artist_ID
: TEXT, ReferencesArtists(ID)
Track_ID
: TEXT, ReferencesTracks(ID)
- Composite Primary Key: (
Artist_ID
,Track_ID
)