DB design document

Bill Gribble grib@gnumatic.com
Mon, 18 Dec 2000 12:10:09 -0600


On Mon, Dec 18, 2000 at 01:00:56PM -0500, Derek Atkins wrote:
> This is a reasonable approach, although I think we still want (need?)
> to be flexible enough to make some rather robust queries.  For
> example, I can certainly see where you might want to search for
> transactions in an account between specific dates, or certain reports
> might want to make certain more extensive queries.  

I think at the minimum any database backend should support the
complete gnucash query API as it exists now (src/engine/Query.c).

That's not terribly complicated: just AND-OR trees of simple terms
where each term consists of one of about 6-8 different predicates and
a handful of parameters.  Value comparisons, date range comparisons,
string comparisons, etc.  I would expect most of the predicates to be
either directly supported or simple to code in any real database, with
the possible exception of regular expression matching in strings, and
the and-or structure could be trivially traversed (I think) to create
a single SQL query statement.

Bill Gribble