I saw through digging around the instruments list that there is a relational database behind each instrument (derived and further derivations) as well as a wikidata code.
Is this database available? I’m looking for a controlled vocabulary to use to describe songbooks and songs that includes what instrument they’re for. The Musicbrainz data seems perfect for this. The wikidata codes are exactly the sort of thing that ONIX can carry.
What I’m aiming to get is basically the relationships between, the wikidata number, the instrument name, and the instrument families.
We’re interested to see if this can be used to specify instruments as subject schemes for songbooks. Navigating the entire tree as produced on the website here and noting them down seems possible but labor intensive.
Getting them out of the database appears to take installing the server software and then importing the database and maybe at that point I’d have a table that I could reference? I see the instrument file in the database that I downloaded, but it has no column headings, so I don’t know what all the columns mean. And it doesn’t look it it has the wikidata number.
For instance, the end result of where we want to use the data might look like this:
This kind of relation is stored in the l_instrument_instrument table. You can find an example of SQL query using it on 6-instrument_family_tree
You can install the database alone, I think there’s one project called mbslave for that. If you don’t need to keep your base up to date (instruments change rarely), it could be easier to use the json dumps (e.g. Index of /pub/musicbrainz/data/json-dumps/) and have all the info in the instrument.tar.xz file.