Best way to process table rows from an RDBMS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dananrg@yahoo.com

    #1

    Best way to process table rows from an RDBMS

    I can handle making the connections and running queries, but what's the
    best way to process table rows returned in Python? What about turning a
    table definition into an object? Just looking for ways to be efficient,
    since I know I will be hitting the same external RDBMS from Python and
    regularly processing a fixed set of tables with a certain fixed set of
    attribute columns.

    Is there something better than tuples for this?

  • bruno at modulix

    #2
    Re: Best way to process table rows from an RDBMS

    dananrg@yahoo.c om wrote:[color=blue]
    > I can handle making the connections and running queries, but what's the
    > best way to process table rows returned in Python?[/color]

    depends on what you want to do with them.
    [color=blue]
    > What about turning a
    > table definition into an object? Just looking for ways to be efficient,
    > since I know I will be hitting the same external RDBMS from Python and
    > regularly processing a fixed set of tables with a certain fixed set of
    > attribute columns.[/color]

    Before ReinventingTheS quareWheel(tm), you may want to have a look at
    existing Python ORMs like SQLObjects or SQLAlchemy...


    --
    bruno desthuilliers
    python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
    p in 'onurb@xiludom. gro'.split('@')])"

    Comment

    Working...