in Ram database?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John D.

    in Ram database?

    Does anyone know if there is an "in-ram" dictionary based database
    for Python.

    I can see some applications where this can really be powerful in
    applications requiring 10,000 records or less.

    Is such a database available? If so, who is working on it,
    or where is it?

    I've heard that Python supports a stand-alone database. I looked
    for it in the Docs, and see the "dbm" module. I haven't found
    any examples of code, so don't know how to use them. I'm one
    of those guys that learn through examples, and have very little
    luck in figuring out how to use anything unless I can see examples
    of their use.

    My idea is that ALL datums would be Python Dictionary objects, so
    not only can you store data, but python objects as well.

    Storage to disk would be through pickled files, or through CSV
    format, allowing easy import and export from other databases.

    I'm sure something like this exists, I just haven't found it yet,
    and if not, then I'm well on my way of implementing one myself.

    I kinda like the idea of being able to define smaller tables as
    "in-memory" types, and the really large massive ones in other forms
    managed by mySQL, PostGres, or bsddb3 databases.

    Any leads you guys???

    JD



  • Ganesan R

    #2
    Re: in Ram database?

    >>>>> "John" == John D <lists@webcrunc hers.com> writes:
    [color=blue]
    > I kinda like the idea of being able to define smaller tables as
    > "in-memory" types, and the really large massive ones in other forms
    > managed by mySQL, PostGres, or bsddb3 databases.[/color]

    Use PySQLite (http://pysqlite.sf.net). Make sure that you have at least
    version 2.8.1 of SQLite and give the database name as :memory: (this is not
    obvious from the documentation). Since SQLite can handle databases upto 2
    terabytes, you use it to store "really massive ones" on disk too :-).

    Ganesan

    --
    Ganesan R

    Comment

    • John J. Lee

      #3
      Re: in Ram database?

      "John D." <lists@webcrunc hers.com> writes:
      [...][color=blue]
      > Is such a database available? If so, who is working on it,
      > or where is it?[/color]

      Gadfly, PySQLite.

      [color=blue]
      > I've heard that Python supports a stand-alone database. I looked
      > for it in the Docs, and see the "dbm" module. I haven't found
      > any examples of code, so don't know how to use them. I'm one
      > of those guys that learn through examples, and have very little
      > luck in figuring out how to use anything unless I can see examples
      > of their use.[/color]

      These sorts of dbs aren't in-memory. Still, if you want to find some
      simple examples, I'm sure a few queries like 'group:comp.lan g.python
      bsddb example' in Google Groups will find something.

      [color=blue]
      > My idea is that ALL datums would be Python Dictionary objects, so
      > not only can you store data, but python objects as well.[/color]

      Sounds like you might want ZODB (again, not in-memory). It's more of
      an object persistence system + BTrees than it is a DBMS, since there's
      no query system. IndexedCatalog is a query system built on top of
      ZODB, but it's quite feasible to roll your own simple
      application-specific queries with BTrees (and the other data
      structures it provides). BTrees are rather like dictionaries, but
      they support on-demand loading of data, so not everything has to be in
      memory at once.

      [color=blue]
      > I kinda like the idea of being able to define smaller tables as
      > "in-memory" types, and the really large massive ones in other forms
      > managed by mySQL, PostGres, or bsddb3 databases.[/color]

      That sounds like a recipe for extra work to me. If you need a big
      DBMS, use that for everything.


      John

      Comment

      • John Roth

        #4
        Re: in Ram database?


        "John D." <lists@webcrunc hers.com> wrote in message
        news:mailman.10 62728122.8678.p ython-list@python.org ...[color=blue]
        > Does anyone know if there is an "in-ram" dictionary based database
        > for Python.
        >
        > I can see some applications where this can really be powerful in
        > applications requiring 10,000 records or less.
        >
        > Is such a database available? If so, who is working on it,
        > or where is it?
        >
        > I've heard that Python supports a stand-alone database. I looked
        > for it in the Docs, and see the "dbm" module. I haven't found
        > any examples of code, so don't know how to use them. I'm one
        > of those guys that learn through examples, and have very little
        > luck in figuring out how to use anything unless I can see examples
        > of their use.
        >
        > My idea is that ALL datums would be Python Dictionary objects, so
        > not only can you store data, but python objects as well.
        >
        > Storage to disk would be through pickled files, or through CSV
        > format, allowing easy import and export from other databases.
        >
        > I'm sure something like this exists, I just haven't found it yet,
        > and if not, then I'm well on my way of implementing one myself.
        >
        > I kinda like the idea of being able to define smaller tables as
        > "in-memory" types, and the really large massive ones in other forms
        > managed by mySQL, PostGres, or bsddb3 databases.
        >
        > Any leads you guys???[/color]

        Look at Prevalyar. While it's a Java project, it might give
        you some ideas about what's possible if you forget "data base"
        and simply think "persistanc e."

        John Roth[color=blue]
        >
        > JD
        >
        >
        >[/color]


        Comment

        • Romuald Texier

          #5
          Re: in Ram database?

          John D. wrote:
          [color=blue]
          > Does anyone know if there is an "in-ram" dictionary based database
          > for Python.
          >
          > I can see some applications where this can really be powerful in
          > applications requiring 10,000 records or less.
          >
          > Is such a database available? If so, who is working on it,
          > or where is it?
          >
          > I've heard that Python supports a stand-alone database. I looked
          > for it in the Docs, and see the "dbm" module. I haven't found
          > any examples of code, so don't know how to use them. I'm one
          > of those guys that learn through examples, and have very little
          > luck in figuring out how to use anything unless I can see examples
          > of their use.
          >
          > My idea is that ALL datums would be Python Dictionary objects, so
          > not only can you store data, but python objects as well.
          >
          > Storage to disk would be through pickled files, or through CSV
          > format, allowing easy import and export from other databases.
          >
          > I'm sure something like this exists, I just haven't found it yet,
          > and if not, then I'm well on my way of implementing one myself.
          >
          > I kinda like the idea of being able to define smaller tables as
          > "in-memory" types, and the really large massive ones in other forms
          > managed by mySQL, PostGres, or bsddb3 databases.
          >
          > Any leads you guys???
          >[/color]

          Why not just use Dictionaries, or an object tree? Why do you want tables or
          SQL abstraction if it is "in-memory"? Nothing else but your app will be
          able to access the "live" data, anyway.

          Comment

          • John Roth

            #6
            Re: in Ram database?


            "Andy Todd" <andy47@halfcoo ked.com> wrote in message
            news:mailman.10 62776296.7505.p ython-list@python.org ...[color=blue]
            > John Roth wrote:
            >[color=green]
            > > "John D." <lists@webcrunc hers.com> wrote in message
            > > news:mailman.10 62728122.8678.p ython-list@python.org ...
            > >[color=darkred]
            > >>Does anyone know if there is an "in-ram" dictionary based database
            > >>for Python.
            > >>
            > >>I can see some applications where this can really be powerful in
            > >>application s requiring 10,000 records or less.
            > >>
            > >>Is such a database available? If so, who is working on it,
            > >>or where is it?
            > >>
            > >>I've heard that Python supports a stand-alone database. I looked
            > >>for it in the Docs, and see the "dbm" module. I haven't found
            > >>any examples of code, so don't know how to use them. I'm one
            > >>of those guys that learn through examples, and have very little
            > >>luck in figuring out how to use anything unless I can see examples
            > >>of their use.
            > >>
            > >>My idea is that ALL datums would be Python Dictionary objects, so
            > >>not only can you store data, but python objects as well.
            > >>
            > >>Storage to disk would be through pickled files, or through CSV
            > >>format, allowing easy import and export from other databases.
            > >>
            > >>I'm sure something like this exists, I just haven't found it yet,
            > >>and if not, then I'm well on my way of implementing one myself.
            > >>
            > >>I kinda like the idea of being able to define smaller tables as
            > >>"in-memory" types, and the really large massive ones in other forms
            > >>managed by mySQL, PostGres, or bsddb3 databases.
            > >>
            > >>Any leads you guys???[/color]
            > >
            > >
            > > Look at Prevalyar. While it's a Java project, it might give
            > > you some ideas about what's possible if you forget "data base"
            > > and simply think "persistanc e."
            > >
            > > John Roth
            > >[color=darkred]
            > >>JD
            > >>[/color][/color]
            >
            > Or you could look at the Python port of Prevayler (well, thats how it
            > started out);
            >
            > http://www.orbtech.com/wiki/PyPerSyst[/color]

            Thanks for the reference.

            John Roth[color=blue]
            >
            > Regards,
            > Andy
            > --
            > --------------------------------------------------------------------------[/color]
            ------[color=blue]
            > From the desk of Andrew J Todd esq - http://www.halfcooked.com/
            >
            >
            >[/color]


            Comment

            Working...