On May 23, Jon Sabo <[EMAIL PROTECTED]> wrote: > I was wondering, is there any part of code I might have to change > if I decide to use a MySQL database to access the data instead of > imdb's servers (besides when I initially create the IMDb object)?
Besides the initialization, IMDbPY is as much as polymorphic as it can be. There are some obvious limitations: some data are not available in local/sql (they are not in the plain text data files) and very few have a slightly different format - but this doesn't seem to affect your case. Oh, the person.personID and movie.movieID are different beasts, since every data access system has its own way to refer to a Movie or a Person object ('http', 'httpThin' and 'mobile' share the same representation, but 'local' and 'sql' have different ones). This can't be helped: in the plain text data files we don't have the movieID and personID used by IMDb on their web site. > As in, search_person and search_movie still work the same way and > all of the person or movie objects will have the same data as if > I was using the http access system? Yup, they just happen to have different personID/movieID. Ah, another very subtle difference: retrieving data about a movie (let's say the all-time classic "Ninja Terminator", movieID 0199849) from the IMDb server. In the movie['cast'] list you'll have our beloved Ninja master Harry (even if we all know he's much more ninjesque when called "Gordon" ;-) as a Person instance with personID 0365835, and with person['long imdb canonical name'] set to "Harrison, Richard", being his name listed in the cast of the movie without the imdbIndex used to discriminate between homonymous people. Doing an ia.update(person) is enough to retrieve the full name, completed with imdbIndex. In our example, person['long imdb canonical name'] will turn to "Harrison, Richard (II)" In 'local' and 'sql' the movie['cast'] list always contains Person instances with the name complete of imdbIndex. Not a big deal, but may create confusion. -- Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel