Python plain-text database or library that supports joins?

felciano felciano at gmail.com
Fri Jun 22 20:26:46 EDT 2007


>
> i don't think that using flat text files as a database is common these
> days. if you need relational database features what stops you from
> using rdbms? if the only reason for that is some legacy system then
> i'd still use in-memory sqlite database for all relational operations.
> import, process, export back to text if you need to.
>
These are often one-off operations, so those import + export steps are
non-trivial overhead. For example, most log files are structured, but
it seems like we still use scripts or command line tools to find data
in those files. I'm essentially doing the same thing, only with
operations across multiple files (e.g. merge records these two files
based on a common key, or append a column based on a look up value). I
may end up having to go to DB, but that seems like a heavyweight jump
for what are otherwise simple operations.

Maybe this is the wrong forum for the question. I prefer programming
in Python, but the use cases I'm looking is closer to shell scripting.
I'd be perfectly happy with a more powerful version of GNU textutils
that allowed for greater flexibility in text manipulation.

HTH,

Ramon




More information about the Python-list mailing list