how to pickle objects for database storage?

Laszlo Nagy gandalf at designaproduct.biz
Wed Apr 11 14:25:56 EDT 2007


Laszlo Nagy írta:
> krishnakant Mane írta:
>   
>> hello,
>> I have a strange but very interesting requirement?
>> provided that a database can provide for an object data type like
>> binary large object (blob), can I store a pickeled python object in
>> it?
>>   
>>     
> Why not?
>   
>> I know oracle has blob and clob and believe that mysql/ postgre sql
>> has some thing similar to store direct objects?
>>     
Hmm, this is what I left out:

- There is also a 'bytea' type ("byte array") in Pg, but I haven't used it
- I'm not sure about MySQL, but I bet it has a better blob field type.

By the way, do you think you could use ZODB?

http://www.zope.org/Products/StandaloneZODB

Best,

   Laszlo




More information about the Python-list mailing list