How does CDDB work?

Posted:
in General Discussion edited January 2014
I never thought to use the CDDB function in iTunes since I thought it would choke on my pathetic 56k line. But apparently I was wrong...



Anyway, does anyone know how this whole thing works? I've been trying to work it out for myself, but I can't think of anything.

Comments

  • Reply 1 of 6
    chychchych Posts: 860member
    Well, it just checks your album (something in it that makes it unique) against a database (cddb, now known as gracenote, <a href="http://www.gracenote.com)" target="_blank">www.gracenote.com)</a> and gets you track names for your album... only downloads less than a KB or so...
  • Reply 2 of 6
    costiquecostique Posts: 1,084member
    Technically, they [Gracenote] keep a database (most likely, mySQL) with PHP front-end. This database is regularly updated by users who submit new albums. iTunes sends an HTTP query just like you with your browser. And just like your browser receives a web page with the search result, iTunes receives it in short form (without HTML tags).

    You'd ask how the hell they identify albums. There are several things such as album length in min:sec:frames, which is fairly unique by itself, and tracks count. There may be some more info taken from an audio CD. If you are interested in further details, here they are: <a href="http://www.gracenote.com/developer/"; target="_blank">http://www.gracenote.com/developer/</a>;
  • Reply 3 of 6
    dfilerdfiler Posts: 3,420member
    Couple more tidbits not obvious to non-super-techies:



    CDDB doesn't require much bandwidth at all and should work nearly as quick over a modem as it does over a T3. This is because there is very little information being transfered. As one of the previous posters asserted, probably less than 1k of data.



    Sometimes more than one person has submitted the song info and you'll have to choose from a list of possible matches. These may differ only slightly, including minor capitalization or punctuation differences. If noone has ever submitted info for a disc, iTunes will give you the option of entering and submitting the information yourself.



    There are multiple, competing CDDB-esqe services but iTunes only interacts with one.



    CDDB also contains support for seldom used information like images of the album's cover.



    Discs created from sound files which were at one time compressed into mp3s will no longer be properly identified by CDDB. It only works on original discs or copies of the original which have never been converted to any other audio format.
  • Reply 4 of 6
    [quote]Originally posted by chych:

    <strong>Well, it just checks your album (something in it that makes it unique) against a database (cddb, now known as gracenote, <a href="http://www.gracenote.com)" target="_blank">www.gracenote.com)</a> and gets you track names for your album... only downloads less than a KB or so...</strong><hr></blockquote>



    Thanks for the info, guys. I knew it had to be a database, but the thing that really puzzled me last night was how CDDB/Gracenote *knew* the CD iTunes was asking for was Shostakovich's "Leningrad" symphony, and not, say, Celine Dion. <img src="graemlins/lol.gif" border="0" alt="[Laughing]" />



    [ 12-16-2002: Message edited by: rampancy ]</p>
  • Reply 5 of 6
    hmurchisonhmurchison Posts: 12,419member
    Every Pressed CD contains a certain ID string unique to that CD. Ever wonder how Apple's CD player remembers the track name you enter for CD's as well. It's this ID. CDDB simply cross refrences that ID with what's in their Database and returns you the results. Pretty simple in Theory.
  • Reply 6 of 6
    Responses that are all very enlightening; kudos!
Sign In or Register to comment.