three column dataset - additions and deletions
draeath
draeath.spamtrap at gmail.com
Thu Dec 2 20:06:58 EST 2010
On Thu, 02 Dec 2010 22:55:53 +0000, Tim Harig wrote:
Thanks for taking the time to check in on this, Tim!
> So, basically, you want to store a local copy of the data and sync it to
> the original.
In a way. I only need to store one copy of the data, and make note of
changes between it and the current data.
> You need to differentiate between the in memory data model and the
> storage model. Since this data comes from a database in the first
> place, I would dump it to an sqlite3 database from the beginning. You
> can use this to store, modify, and change the values as you receive them
> from the database.
I thought of doing that, but given that I only need to store a single
instance of the data, a simple pickle will do the job nicely (am I
correct in reading that it can save/load any python object?)
> If you are looking for in-memory structures, then you haven't really
> provided us with enough information on the significance and organization
> of the data.
The data columns:
Long Int, String (under 30 chars), String (over 100 chars)
The rows can scale up to hundreds, perhaps thousands.
The integer is the database key, the shorter string is a user name, and
the longer string is an access control definition. The whole idea of this
script is to check, daily, for any added or removed users - or any
altered access control definition.
I realize this could likely all be done from inside the database itself -
but altering the DB itself is not an option (as the product vendor is
very touchy about that, and altering it can null our support agreement)
More information about the Python-list
mailing list