Confused about tags vs. genres in the database

Hi everyone,

I’m trying to understand how tags and genres work in the MusicBrainz database.
I noticed there’s a genre table linked to release_group through l_genre_release_group, but that link table only contains 9 rows.
At the same time, release_group_tag has many more entries.

So I’m wondering — what’s the actual difference between genres and tags here?
And how can I tell when a tag is considered a genre in the database?

Thanks in advance!

1 Like

It’s just based on the name of the tag. All genres are tags, but not all tags are genres. The name column in the genre table tells you which tags are considered genres.

Edit: We also support genre aliases (in the genre_alias table). So you could also use genre_alias.name to identify genre tags, but the aliases are just that, alternate names of an existing genre. But we don’t fully use those in the UI yet: MBS-12329.

l_genre_release_group is for advanced relationships, like {genre} is named after {release group}. The actual genres people have tagged release groups with are just in the release_group_tag table, together with all other tags.

4 Likes

Ok I got it.

Thanks a lot for your quick answer !

It helps a lot

2 Likes