See below prefixed by [Phil]. I've also prefixed Derek's comments with [Derek] where there might be confusion.
Phil --------- I used to be a hypochondriac AND a kleptomaniac. So I took something for it. ________________________________ From: Derek Atkins <warl...@mit.edu> To: John Ralls <jra...@ceridwen.us> Cc: Phil Longstaff <plongst...@rogers.com>; Gnucash Devel Mailing List <gnucash-devel@gnucash.org> Sent: Mon, January 3, 2011 12:00:14 PM Subject: Re: Splitting the slots table John Ralls <jra...@ceridwen.us> writes: > We need to re-think KVP entirely: It doesn't match up very well with > the relational model. Yeah. The KVP model works great for XML extensibility. It does suck for SQL extensibility. [Derek] As we move forward I think we need to think about both methods. We have some requirements in that object A needs to somehow mark/tag object B but Object B doesn't know about said tagging. I'm not sure how you go about doing that in a full relational database. I suppose you could have a "object B tag from object A" table using a foreign key, but then you have to do a table join to get the data out, [Phil] Which object would do the join? For object B to load the info, it needs to know about object A's table. I suppose object A could load a sub-object and tack it onto object B. That might, in fact, be the best option. Object B loads its stuff as normal. Object A then loads its stuff into a struct and registers that struct with object B using the name "Object A's additions". It could then get its stuff back, and when registering, there could be added callbacks to be used when object B is deleted or saved. [Derek] and you need to make sure that you remove the data from this new table if the object is removed from the main table..... [Phil] Can this not be done with the foreign key constraint using ON DELETE CASCADE (I think that's it)? It all gets very complicated very quickly. -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 warl...@mit.edu PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel