how to pickle objects for database storage?

K

krishnakant Mane

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?
I know oracle has blob and clob and believe that mysql/ postgre sql
has some thing similar to store direct objects?
if not then should a pickeled object wrapped inside a file and then
stored in a database?
regards.
Krishnakant.
 
B

Bruno Desthuilliers

krishnakant Mane a écrit :
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?

Certainly, but that's one of the dumbest things to do IMHO. If you use a
relational DBMS, you'd better use it properly (FWIW, there's a pretty
good Python abstraction layer/ORM named SQLAlchemy). And if you don't
want a RDBMS, then there are good Python OODBMS (Zope and Durus to name
the most famous ones).

My 2 cents...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top