[petsc-dev] Writing rich state

Dmitry Karpeev karpeev at mcs.anl.gov
Wed Feb 24 12:58:46 CST 2010

It seems like optional attributes can be relatively easily implemented
by adding just two
extra columns to the table: "key" and "value" and then constructing
the corresponding
SQL queries something like (I haven't looked at SQL in a long time)
(WHERE(key="precision", value="double")), etc.

I think there are Python bindings for BerkeleyDB, or am I imagining it?


On Wed, Feb 24, 2010 at 12:53 PM, Jed Brown <jed at 59a2.org> wrote:
> On Wed, 24 Feb 2010 09:25:39 -0600, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
>> Here's the main problem that I see: are file attributes stored in the database
>> fixed?  That could be somewhat inflexible (what if some attributes don't apply
>> to a given file?  what if I want to add another attribute?).  The alternative
>> is to manage this with (key,value) string pairs (e.g., ("precision",
>> "double") etc).
> Some attributes would be mandatory, but they certainly need to be
> extensible.
>> Is there a way to encode that in a relational database and maintain
>> good performance?
> I think that to first order, performance is a non-issue because it's so
> small compared to the real files.  I would expect that even with a
> million time steps, it would be pretty hard to make the DB a bottleneck.
> In any case, I think it will be more challenging to make the DB smart
> enough than to make it fast enough.  Maybe someone who knows something
> about databases (Matt?) can comment.
> Jed

More information about the petsc-dev mailing list