What tables have the genre, the featured artists, etc

Tags: #<Tag:0x00007f9adf5a4430>

I’m not sure in which tables I can find the genre, the featured artists (since a medium links to multiple tracks, but I don’t see where the join of the track to artist gets one to many), the release year and the recording year (the year of the track, as opposed to the year of the release/album).

Possibly the recording year is under the recording table and not the medium/track tables?

How about the featured artists and the genre?

There’s no date directly associated with tracks/recordings. What you are looking for are date attributes on the link between recording and performing artist (or recording and place, or recording and work…)
Look at the l_artist_recording and link tables for this kind of information

e.g. the first SQL queries in https://loujine.github.io/musicbrainz-dataviz/4-performer_data.html

4 Likes

I will follow your tips next time. Not easy to figure this on one’s own.

1 Like

Thanks. How about the genre?

Genres are handled with folksonomy tagging, so you will find them in the tag tables (https://wiki.musicbrainz.org/MusicBrainz_Database/Schema#tag_table.2C_.26_the_.2A_tag_and_tag_raw_tables).

MB handles a whitelist which tags are considered genres.

2 Likes

Which can be found in the genre table, so if you (inner) join with genre where genre.name = tag.name, you should filter the results to only tags in the genre table.

3 Likes

How about featured artists, I’m having a hard time finding the table that has featured artists. Unlike
what I thought, they don’t show under the artist credit table.

Here an example, Gal Costa has a song called Chuva de Prata (“Silver Rain”), which is a collab with Roupa Nova, however Roupa Nova is nowhere to be seen:

I put the query and the results here:

SELECT
artist.Id as “ArtId”
,artist.name as “Art”
,artist.begin_date_year as “ArtBegYear”
,area.name as “ArtCountry”
,artist.type as “ArtTypeId”
,artist_type.Name as “ArtTypeName”

,artist_credit_name.artist_credit as “ArtCredNameId”
,artist_credit_name.Name as “ArtCredNameName”
,artist_credit.Name as “ArtCredName”
,artist_credit.artist_count as “ArtCredArtCount”

,release_group.Id as “AlbumGroupId”
,release_group.Name as “AlbumGroupName”
,release_group.artist_credit as “AlbumGroupArtCred”
,release_group_primary_type.name as “AlbumGroupPrimTypeName”
,release_group_meta.first_release_date_year as “AlbumGroupFirstYear”

,release.id as “AlbumId”
,release.Name as “AlbumName”
,release.Quality as “AlbumDQ”
,release_country.date_year as “AlbumYear”
,area2.Name as “AlbumCountry”
,language.Name as “AlbumLang”
,script.Name as “AlbumScrip”

,medium.Id as “MediuId”
,medium.Name as “MediuName”
,medium.track_count as “MediuTracks”
,medium_format.Name as “MediuFmtName”
,medium_format.Year as “MediuFmtYear”

,track.Id as “TrackId”
,track.Position as “TrackPos”
,track.Number as “TrackNo”
,track.Name as “TrackName”
,track.length as “TrackLen”

from artist
–inner join test on test.Nome = artist.Name

inner join artist_credit_name ON artist_credit_name.artist = artist.id

inner join artist_credit ON artist_credit.id = artist_credit_name.artist_credit

inner join release_group ON release_group.artist_credit = artist_credit.id

inner join release on release.release_group = release_group.id
left join release_country on release_country.release = release.id
left join area as area2 ON area2.id = release_country.country
left join language on language.id = release.language
left join script on script.id = release.script

inner join medium on medium.release = release.id

left join medium_format on medium_format.id = medium.id

inner join track on track.medium = medium.id

left join release_group_primary_type on release_group_primary_type.id = release_group.type

left join area ON artist.area = area.id

left join artist_type ON artist_type.id = artist.type

left join release_group_meta ON release_group_meta.id = release_group.id

where artist_credit.Name in (‘Gal Costa’,‘Roupa Nova’) and track.Id in (7896555,14932042,18671399);

–area2.Name in (‘Brazil’,‘United States’)
–and script.Name=‘Latin’;
–artist.name = ‘U2’
–and release_country.date_year=release_group_meta.first_release_date_year

That’s because no-one has ever added Roupa Nova to the song.

1 Like

It must be something else. I pulled all her tracks and in none the artist credits field shows more than herself.
She has done lots of collabs, these people never show in all her data, so something is wrong.

That’s because it hasn’t been added to MusicBrainz. Just look at one of the releases that contains the song in your example:

That’s really as bare-bones as you can get. There’s no additional relationships, no cover art, no release event. Picard can’t retrieve information that’s not there. If you want that information about collaborations and related artists, you’re probably going to have to add it yourself.

4 Likes

Again, wrong, she has LOTS of collabs, the MB tables dont show any of the artists she dueted with, or featured with.

Gal Costa is a much better singer than these canned american superstars, and she has no entries where her duets or collabs appear? How come?

But even if we forget about this serious lack of data on Gal, give me a Taylor swift collab, where does it appear on this Db? It’s a complete mystery to me and the documentation sucks balls, so I will not stress me over this, screw MB database, screw this.
I just went great lengths to populate my missing albums with MB data, but it’s not worth it, I’m gonna leave it as is, too much headache for nothing.
I’m tired of being the sucker who bangs his head for nothing.
I’ll worry about more important things.

Maybe there’s a language barrier here, because nothing I said was wrong.

I think that what you haven’t realized is MusicBrainz is a crowd-sourced database. Every bit of data after the initial import from FreeDb has been added by ordinary users like you and me. The reason the data on Gal Costa is incomplete, is no-one has cared enough to add it. Until now. Until you. If you want that data in the database, you will have to step up and add it. That album that I used as an example has been in the database since 2004 and has been barely touched since then. If you don’t add it, then who knows how long it’s going to be before another Gal Costa fan wanders in here to take care of it.

We all have our favorites. We all have our personal music collections. It’s just a sad fact that most of our editors are North American or European. It would be great if we had more South American contributors in here.

11 Likes

I understand you are very frustrated. But I wonder why you tried to run a local database at all. What exactly is the use case you try to solve with this? Running a local database and querying it directly with SQL for sure is not the easiest route to use MB data. There are other options, which might be better suited for your needs.

E.g. if you want to add MB data to your collection there is plenty of dedicated tagging software with MB support. And even if you are implementing custom software, in a lot of cases the MB web service API is sufficient. And of course there is the MB.org website as the most basic version to access the data, which is often sufficient if you e.g. just want to do some research on an artist or album.

Running a local database with synchronization is definitely intended for advanced use cases that cannot be covered by other options. And going this route definitely requires some experience in regards to running server side software and developing SQL server based software. Yes, the schema is complex, but so is the reality it tries to capture.

6 Likes