From: John P. C. <jp...@jp...> - 2001-08-19 21:46:06
|
On Sun, Aug 19, 2001 at 01:49:25PM -0400, John Donagher wrote: > On Sun, 19 Aug 2001, Andreas Aderhold wrote: > > > OK, will that work for the 4NF ? > > i.e. "get all interest names for user with this id" > > > > user_id > > user_interests -> userinterests > > > > userinterests: > > user_id > > interest_id-> interests > > > > interests: > > interest_id > > interest_desc > > This seems like an example of a multi-lined "owned object". I didn't go back and read the original mail, so I hope this is useful. There would be 3 entities: user, userinterest, interest. The owned object would be "userinterest", with a parententity of user. In the parent entity, you define how a parent relates to it's "owned objects" like this: 'ownedobjects' => array ( 'fkey' => 'PATH1', // from userinterest 'invfkey' => 'PATH2', // from user 'entity' => 'userinterest', // the ownedobject entity 'path' => 'USERINTERESTS', // how to reference from the parent object ) and in the owned object entity: 'parententity' => 'user' Once all the meta data work is done, then all the linking of user and userinterests will be done automatically (thanks to ent2qry). There will also be a ready made multiline UI for choosing interests to associate with this user (assuming the user layout file is correct). More concrete examples can be given as needed. HTH, jpc |