Retrieve all the track for a release given

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieve all the track for a release given

Julien Plu
Hi,

I cannot find all the track of a release given. The only query that I found is :

SELECT musicbrainz_db.musicbrainz.track_name.name FROM musicbrainz_db.musicbrainz.track_name
INNER JOIN musicbrainz_db.musicbrainz.track ON musicbrainz_db.musicbrainz.track.name = musicbrainz_db.musicbrainz.track_name.id
INNER JOIN musicbrainz_db.musicbrainz.artist_credit ON musicbrainz_db.musicbrainz.artist_credit.id = musicbrainz_db.musicbrainz.track.artist_credit
INNER JOIN musicbrainz_db.musicbrainz.release ON musicbrainz_db.musicbrainz.release.artist_credit = musicbrainz_db.musicbrainz.artist_credit.id
WHERE musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'

But with that, all what I have is all the track of an artist given. Have an idea of what query I need for having what I want ?

Thanks in advance.

Best.

-------------------------------------------------------------------------------------------------------------------------------
Julien Plu

Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à l'université Montpellier 2.
Responsable de la rubrique Web sémantique de Developpez.com.
Mes projets Web sémantique: http://data.lirmm.fr
Page personnelle: http://jplu.developpez.com
Fichier FOAF (version RDF): http://jplu.developpez.com/julien
Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
Adresse mail personnelle: [hidden email]
Adresse mail universitaire: [hidden email]


_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve all the track for a release given

Nicolás Tamargo de Eguren
On Thu, Jun 28, 2012 at 7:59 PM, Julien Plu
<[hidden email]> wrote:

> Hi,
>
> I cannot find all the track of a release given. The only query that I found
> is :
>
> SELECT musicbrainz_db.musicbrainz.track_name.name FROM
> musicbrainz_db.musicbrainz.track_name
> INNER JOIN musicbrainz_db.musicbrainz.track ON
> musicbrainz_db.musicbrainz.track.name =
> musicbrainz_db.musicbrainz.track_name.id
> INNER JOIN musicbrainz_db.musicbrainz.artist_credit ON
> musicbrainz_db.musicbrainz.artist_credit.id =
> musicbrainz_db.musicbrainz.track.artist_credit
> INNER JOIN musicbrainz_db.musicbrainz.release ON
> musicbrainz_db.musicbrainz.release.artist_credit =
> musicbrainz_db.musicbrainz.artist_credit.id
> WHERE
> musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'
>
> But with that, all what I have is all the track of an artist given. Have an
> idea of what query I need for having what I want ?

I think you need to join the medium table too (see
http://wiki.musicbrainz.org/-/images/5/52/ngs.png )

> Thanks in advance.
>
> Best.
>
> -------------------------------------------------------------------------------------------------------------------------------
> Julien Plu
>
> Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à
> l'université Montpellier 2.
> Responsable de la rubrique Web sémantique de Developpez.com.
> Mes projets Web sémantique: http://data.lirmm.fr
> Page personnelle: http://jplu.developpez.com
> Fichier FOAF (version RDF): http://jplu.developpez.com/julien
> Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
> Adresse mail personnelle: [hidden email]
> Adresse mail universitaire: [hidden email]
>
>
> _______________________________________________
> MusicBrainz-users mailing list
> [hidden email]
> http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users



--
Nicolás Tamargo de Eguren

_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve all the track for a release given

Julien Plu
Thanks for your answer.

Even if I use the table "medium" that doesn't works, I have an error. Here the query :

SELECT musicbrainz_db.musicbrainz.track_name.name FROM musicbrainz_db.musicbrainz.track_name
INNER JOIN musicbrainz_db.musicbrainz.track ON musicbrainz_db.musicbrainz.track.name = musicbrainz_db.musicbrainz.track_name.id
INNER JOIN musicbrainz_db.musicbrainz.tracklist ON musicbrainz_db.musicbrainz.tracklist.id = musicbrainz_db.musicbrainz.track.tracklist
INNER JOIN musicbrainz_db.musicbrainz.medium ON musicbrainz_db.musicbrainz.medium.tracklist = musicbrainz_db.musicbrainz.tracklist.id
INNER JOIN musicbrainz_db.musicbrainz.release ON musicbrainz_db.musicbrainz.release.id = musicbrainz_db.musicbrainz.medium.release
WHERE musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'

But maybe I do something wrong in my query ?

-------------------------------------------------------------------------------------------------------------------------------
Julien Plu

Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à l'université Montpellier 2.
Responsable de la rubrique Web sémantique de Developpez.com.
Mes projets Web sémantique: http://data.lirmm.fr
Page personnelle: http://jplu.developpez.com
Fichier FOAF (version RDF): http://jplu.developpez.com/julien
Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
Adresse mail personnelle: [hidden email]
Adresse mail universitaire: [hidden email]



2012/6/28 Nicolás Tamargo de Eguren <[hidden email]>
On Thu, Jun 28, 2012 at 7:59 PM, Julien Plu
<[hidden email]> wrote:
> Hi,
>
> I cannot find all the track of a release given. The only query that I found
> is :
>
> SELECT musicbrainz_db.musicbrainz.track_name.name FROM
> musicbrainz_db.musicbrainz.track_name
> INNER JOIN musicbrainz_db.musicbrainz.track ON
> musicbrainz_db.musicbrainz.track.name =
> musicbrainz_db.musicbrainz.track_name.id
> INNER JOIN musicbrainz_db.musicbrainz.artist_credit ON
> musicbrainz_db.musicbrainz.artist_credit.id =
> musicbrainz_db.musicbrainz.track.artist_credit
> INNER JOIN musicbrainz_db.musicbrainz.release ON
> musicbrainz_db.musicbrainz.release.artist_credit =
> musicbrainz_db.musicbrainz.artist_credit.id
> WHERE
> musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'
>
> But with that, all what I have is all the track of an artist given. Have an
> idea of what query I need for having what I want ?

I think you need to join the medium table too (see
http://wiki.musicbrainz.org/-/images/5/52/ngs.png )

> Thanks in advance.
>
> Best.
>
> -------------------------------------------------------------------------------------------------------------------------------
> Julien Plu
>
> Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à
> l'université Montpellier 2.
> Responsable de la rubrique Web sémantique de Developpez.com.
> Mes projets Web sémantique: http://data.lirmm.fr
> Page personnelle: http://jplu.developpez.com
> Fichier FOAF (version RDF): http://jplu.developpez.com/julien
> Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
> Adresse mail personnelle: [hidden email]
> Adresse mail universitaire: [hidden email]
>
>
> _______________________________________________
> MusicBrainz-users mailing list
> [hidden email]
> http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users



--
Nicolás Tamargo de Eguren

_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users


_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve all the track for a release given

Julien Plu
My bad the query works correctly, that was an error from my ODBC driver. Now it works like a charm.

Thanks for your help.

-------------------------------------------------------------------------------------------------------------------------------
Julien Plu

Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à l'université Montpellier 2.
Responsable de la rubrique Web sémantique de Developpez.com.
Mes projets Web sémantique: http://data.lirmm.fr
Page personnelle: http://jplu.developpez.com
Fichier FOAF (version RDF): http://jplu.developpez.com/julien
Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
Adresse mail personnelle: [hidden email]
Adresse mail universitaire: [hidden email]



2012/6/29 Julien Plu <[hidden email]>
Thanks for your answer.

Even if I use the table "medium" that doesn't works, I have an error. Here the query :


SELECT musicbrainz_db.musicbrainz.track_name.name FROM musicbrainz_db.musicbrainz.track_name
INNER JOIN musicbrainz_db.musicbrainz.track ON musicbrainz_db.musicbrainz.track.name = musicbrainz_db.musicbrainz.track_name.id
INNER JOIN musicbrainz_db.musicbrainz.tracklist ON musicbrainz_db.musicbrainz.tracklist.id = musicbrainz_db.musicbrainz.track.tracklist
INNER JOIN musicbrainz_db.musicbrainz.medium ON musicbrainz_db.musicbrainz.medium.tracklist = musicbrainz_db.musicbrainz.tracklist.id
INNER JOIN musicbrainz_db.musicbrainz.release ON musicbrainz_db.musicbrainz.release.id = musicbrainz_db.musicbrainz.medium.release
WHERE musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'

But maybe I do something wrong in my query ?


-------------------------------------------------------------------------------------------------------------------------------
Julien Plu

Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à l'université Montpellier 2.
Responsable de la rubrique Web sémantique de Developpez.com.
Mes projets Web sémantique: http://data.lirmm.fr
Page personnelle: http://jplu.developpez.com
Fichier FOAF (version RDF): http://jplu.developpez.com/julien
Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
Adresse mail personnelle: [hidden email]
Adresse mail universitaire: [hidden email]



2012/6/28 Nicolás Tamargo de Eguren <[hidden email]>
On Thu, Jun 28, 2012 at 7:59 PM, Julien Plu
<[hidden email]> wrote:
> Hi,
>
> I cannot find all the track of a release given. The only query that I found
> is :
>
> SELECT musicbrainz_db.musicbrainz.track_name.name FROM
> musicbrainz_db.musicbrainz.track_name
> INNER JOIN musicbrainz_db.musicbrainz.track ON
> musicbrainz_db.musicbrainz.track.name =
> musicbrainz_db.musicbrainz.track_name.id
> INNER JOIN musicbrainz_db.musicbrainz.artist_credit ON
> musicbrainz_db.musicbrainz.artist_credit.id =
> musicbrainz_db.musicbrainz.track.artist_credit
> INNER JOIN musicbrainz_db.musicbrainz.release ON
> musicbrainz_db.musicbrainz.release.artist_credit =
> musicbrainz_db.musicbrainz.artist_credit.id
> WHERE
> musicbrainz_db.musicbrainz.release.gid='37939008-1f3c-49d4-a96d-5aad90f0d897'
>
> But with that, all what I have is all the track of an artist given. Have an
> idea of what query I need for having what I want ?

I think you need to join the medium table too (see
http://wiki.musicbrainz.org/-/images/5/52/ngs.png )

> Thanks in advance.
>
> Best.
>
> -------------------------------------------------------------------------------------------------------------------------------
> Julien Plu
>
> Etudiant en 2ème année de Master Ingénierie en Intelligence Artificielle à
> l'université Montpellier 2.
> Responsable de la rubrique Web sémantique de Developpez.com.
> Mes projets Web sémantique: http://data.lirmm.fr
> Page personnelle: http://jplu.developpez.com
> Fichier FOAF (version RDF): http://jplu.developpez.com/julien
> Fichier FOAF (version RDFa): http://jplu.developpez.com/julien.html
> Adresse mail personnelle: [hidden email]
> Adresse mail universitaire: [hidden email]
>
>
> _______________________________________________
> MusicBrainz-users mailing list
> [hidden email]
> http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users



--
Nicolás Tamargo de Eguren

_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users



_______________________________________________
MusicBrainz-users mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-users