On Nov 21, Joachim Selke <[EMAIL PROTECTED]> wrote: > I tried it but there is no SQL command "BEGIN TRANSACTION" in > DB2. The DB2 equivalent is called "BEGIN COMPOUND" -- but it seems > it is used in a different way; just replacing this in your code is > not enough.
When you've time, you can try to find a way to make transactions work using the -e command line option; the --sqlite-transactions option does the equivalent of: -e 'BEFORE_EVERY_TODB:BEGIN TRANSACTION;' -e 'AFTER_EVERY_TODB:COMMIT;' -e 'BEFORE_INDEXES:BEGIN TRANSACTION;' -e 'END:COMMIT;' See README.sqldb, under "ADVANCED FEATURES", for more information. > Have you thought of using SQLAlchemy's Session feature? Can't be done easily within imdbpy2sql.py: it uses SQLObject/SQLAlchemy only to drop/create the tables and to get names of tables/columns; after that, for performance reasons, a cursor is extracted and its executemany method used. > Hm, why is it truncated to VARCHAR(255)? Errr... I admit that now I'm Officially Embarrassed(tm). ;-) I wrote that code not even a month ago, and I was pretty sure that some server had limits on the length of VARCHAR. I've checked now, and you're right: no problem of any sort (despite the fact that I've written in the comments that up to 333 chars nobody complains... I'm wondering why I wrote it). I should control documentation about MySQL 4, but to be honest it would not be a big issue: MySQL 4 users can always use SQLObject or switch to MySQL 5. > Before I wait another 8 hours: Do you know what VARCHAR size is > needed to store all these names? I checked: the problems are in _character_ names: three names are more than 255 chars (max: 479), and other 3 are over 200. Longest movie title is 242, longest person name is 84 and the longest company name is 176 chars. Now I'm worried about the costs, in terms of wasted space and insert time, using a VARCHAR(512) instead of a TEXT or VARCHAR(255) column. I admit that I don't know very much about how databases works, at this level. Thanks, -- Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel