From: Jamey Cribbs Date: 2005-09-14T04:02:42+09:00 Subject: Re: KirbyBase rubyhacker@gmail.com wrote: >Ezra Zygmuntowicz wrote: > > >>What if you were to store an array of keys in the >>'relationshipkey' field that specifies the relationships(separate >>from the primary key). Then your one to many relationship could >>actually be a one to one from an element in the array to the child in >>the other table. >> >> >> > >[snippage] > >I did think of something like this, but it just seemed too hairy, >too daunting. I didn't even mention it to Jamey. KB has no way to >store an array field as such in the first place, nor do I know how >you'd really implement it. > > I thought about this, too, when I started thinking about how to implement one-to-many links. The problem with this approach is that what happens, for example, if one of the child records is deleted. Now, KirbyBase has to go through every parent record, check to see if it's array holds that deleted child records key, and then delete key from the array. Feels a little kludgy. It also doesn't solve the main problem that Hal has with one-to-many links, the fact that they are really only good for #selects, not #inserts, or #updates. As far as the way the KirbyBase beta implements the mechanics of one-to-many links, IMO I think it is a pretty sound implementation (of course, I'm a little biased). I think what is up in the air now is, how much farther do we push one-to-many links (and possibley other special types). Do we leave them the way they work now, which, to me is pretty similar to how a traditional RDBMS would work, or, do we work to make them truly "object symetrical" (how's that for making up a non-sensical term) so that, no matter how you push/pull/bend/stretch the one-to-many link "thing", KirbyBase does the right thing. Kind of like Silly Putty; you can stretch it out and plaster it all over the Sunday Comics and it still fits back inside it's egg. :-) Jamey Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.