That would have been my suggested approach as well. I would suggest adding a sharewithall flag to tbl_shared_things so that the user has the option. I can be tedious to individually share information that you would gladly provide to anyone who asked for it, like office email, phone and fax. It also allows that the information could be easily displayed on an open profile if desired.
Dave -----Original Message----- From: Michael van Leest [mailto:mvanle...@gmail.com] Sent: Thursday, March 20, 2014 10:30 PM To: cf-talk Subject: Re: database design conundrum That's basically it. Depending how your would query the data is entirely up on the specific use, so that is something fun to play with. This way you have all the flexibility you need, good luck! Michael 2014-03-21 2:38 GMT+01:00 PT <cft...@gmail.com>: > > so ... > > tbl_users (containing things that don't need to be shared) > ----- > userid > displayName > archived > lastLoginDate > lastLoginLocation > joinDate > ... > > tbl_things_that_can_be_shared > ----- > thingid > thing ("emailAddress", "phoneNumber", "birthday") > > > tbl_shared_things (standard join table) > ----- > (pk) userid (fk to users.userid) > (pk) thingid (fk to things.thingid) > (pk) toShareWithUserID (fk to users.userid) (if they are in this > table, then they are shared, so no boolean is needed) > > tbl_user_things > ----- > (pk) userid (fk to users.userid) > (pk) thingid (fk to things.thingid) > thingContents (the actual contents of the things for the user in > question, like 'b...@example.com', '8885551212', '01/01/1980') > > Then make a view of the > tbl_users->tbl_things_that_can_be_shared->tbl_user_things > relationships to approximate a more traditional users table for easier > querying. > > ? > > > On 3/20/2014 8:56 PM, Michael van Leest wrote: > > > > I would build it like this: > > > > - tbl_users (userID etc) > > - tbl_user_things (thing id so you can add extra "things" without > changing > > the DB) > > - tbl_user_join_thing (userID, thingID, setting (boolean 1/0) and a > > optional toShareWithUserID) > > > > Hope this helps > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358061 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm