Entity-Relationship Diagram

Derek Atkins warlord at MIT.EDU
Fri Apr 22 10:00:19 EDT 2011


Christian Stimming <stimming at tuhh.de> writes:

> Am Freitag, 22. April 2011 schrieb John Ralls:
>> The ERD is finally done and available for download at
>> https://github.com/downloads/jralls/gnucash/gnucash_erd.png.
>> 
>> For ease of access I've added a link to it on the SQL wiki page.
>> 
>> One comment: It's a bit scary how much has gotten stuffed into KVP over the
>> years. I think I found it all...
>
> Thanks a lot for collecting all these relations! Indeed the KVP contains way 
> too much stuff...
>
> The "post_date" field of the Transaction is stored in two places, not (only) 
> in KVP: It is stored directly in the object as a DATETIME field. Additionally, 
> a year ago I added storing that date as a GDATE in the KVP, so that we can get 
> rid of the timezone issue sometime in the future (because DATETIME is simply 
> the wrong type for that field, 
> https://bugzilla.gnome.org/show_bug.cgi?id=137017 ). However, the GDate kvp is 
> currently only being set - I think it is never read anywhere, because the 
> DATETIME field is used everywhere and I haven't gotten around to implement the 
> actual usage code for that. Can you recognize this explanation in the code, or 
> did I mess up my memories already?
>
> Also, the two fields in Account which are stored as KVP should IMHO be moved 
> into real fields ASAP. But indeed, currently they are stored as KVP.

The problem is that moving data from KVP to "real fields" invalidates
the older XML files.  If you load the newer XML with an older GnuCash
you'll lose that data.  It will fail to read it in, and then when it
writes the file back out it wont be there.

For any data fields that we want to move we should make 2.4 aware of
them now so then we can do the real move in 2.6.

> Regards,
>
> Christian

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list