My use case is fairly simple. I just need the release mbid, release title and the artist name in the same table so the rest of the data is not of much use to me. I have been looking at the release and artist file in the data dumps and so far I have not been able to find a way to connect artists with releases. I just need some guidance on how to connect the release to artists so i can create a new table locally that has release name and artist name in the same row.
Do you want an entry for each artist involved in a release, or just the string for the release artist?
That is: if you have “Very Cool Release”, by “Jazz Dude 1” and “Pop Dude 2”, do you want to have two entries, one per Dude, or something like “Jazz Dude 1 and Pop Dude 2”?
If you want the second, you don’t need the artist table at all, but the artist credit one.
Thanks a lot for your response. Yes i want it like the second one. I have got the following records from the dump.
This is a record from release table
2001185 Yordano & Franco de Vita 2 2 2017-05-15 15:35:17.613531+00
And this is a record from artist_credit table
202094 Ani & Beau 1 6 2011-05-16 16:32:11.963929+00
How do i get their relationship? I thought “202094” in the artist credit was the id from the release table but its not. So how do i connect them. My end goal is to have a tuple like
If I’m not mistaken you should look at the release table, then join it with artist_credit on release.artist_credit = artist_credit.id, and take out release.gid, release.name and artist_credit.name. So, if you want every release:
SELECT release.gid, release.name, artist_credit.name FROM release JOIN artist_credit ON release.artist_credit = artist_credit.id
Ok so I dont have a db setup and am looking at raw files in the dump. I will be generating a db by running a script on this data. This is a record form release table
115687 bc0cc120-24ed-47cf-abdb-bab8f581fb41 Thriller 519 488118 1 \N 120 28 828767252025 0 -1 \N
Can you please point to which one is the artist credit foreign key here? I will be very grateful.