Updated DDL for SQL backend

Phil Longstaff plongstaff at rogers.com
Sat Oct 28 12:23:35 EDT 2006


On Sat, 2006-28-10 at 11:43 -0400, Derek Atkins wrote:
> Phil Longstaff <plongstaff at rogers.com> writes:
> 
> > Hi Daniel,
> >
> > thanks.  I made some modifications to fix most of the problems.  I have
> > both PostgreSQL and MySQL set up on my machine so I can test both dbs.
> > One compatibility problem I have run into is that pgsql doesn't support
> > BLOB as a data type (they have bytea instead).  This is needed for the
> > kvp slot binary type.
> 
> I think it's safe to ignore the kvp BINARY type.  I don't think it's
> used anywhere.  It /may/ also be safe to ignore the kvp LIST type,
> but I'm not as sure that that's never used.  I'm fairly confident,
> but not 100% sure.

It may be safe to ignore them now, but do you want to keep the
capability alive for future modifications?

Re slot table: even if lists aren't used, there is still the hierarchy
based on sub-frames.  A row in the slot table may still need a link to
its parent, and this can't be the guid which identifies the whole slot.
We will need some sort of secondary key, then, to represent the links
within the hierarchy of one complete slot.  Each row in a complete slot
would have the same guid, so that a complete slot could be deleted using
"delete from slots where guid='...'", the top level slot would have
parent = null and secondary_key = 0, and other rows in the slot would
have parent = secondary_key_of_parent.

Of course, if there are no lists, is there really any reason to bury a
single slot value in a hierarchy?  If lists are gone, sub-frames may be
gone too.

Phil



More information about the gnucash-devel mailing list