how to pickle objects for database storage?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • krishnakant Mane

    #1

    how to pickle objects for database storage?

    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.
  • Bruno Desthuilliers

    #2
    Re: how to pickle objects for database storage?

    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...

    Comment

    Working...