how to pickle objects for database storage?

Discussion in 'Python' started by krishnakant Mane, Apr 11, 2007.

  1. 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.
     
    krishnakant Mane, Apr 11, 2007
    #1
    1. Advertising

  2. 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...
     
    Bruno Desthuilliers, Apr 11, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward C. Jones

    Pickle vs. eval for deeply nested objects

    Edward C. Jones, Feb 18, 2004, in forum: Python
    Replies:
    0
    Views:
    495
    Edward C. Jones
    Feb 18, 2004
  2. a pickle's pickle

    , Aug 2, 2005, in forum: Python
    Replies:
    4
    Views:
    393
  3. sarathy
    Replies:
    2
    Views:
    677
    sarathy
    Jul 17, 2006
  4. krishnakant Mane
    Replies:
    2
    Views:
    247
    Bruno Desthuilliers
    May 4, 2007
  5. Michele Simionato
    Replies:
    2
    Views:
    1,911
    Michele Simionato
    May 23, 2008
Loading...

Share This Page