"Dinesh B Vadhia" <dineshbvad...@hotmail.com> wrote
I want to pickle (very long) strings and save them in a sqlite db.

Why?
Why not just store the string in the database?
If that turns out to be a problem then think about other options - like splitting it into chunks say? But until you know you have a problem don't try to solve it!

- Is this a good approach for storing very long strings?

Probably not.

- Are the pickle'd strings stored in the sqlite db as a STRING or BLOB?

They could be stored either way, thats up to how you define your tables and write your SQL.

In general I expect databases to handle very large quantities of data
either as blobs or as references to a file. Is this a valid approach? Write the long string (assuming its many MB in size) into a text file and store that with a unique name. Then store the filename in the database.

But first check that you can't store it in the database directly or in chunks.


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to