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 <[email protected]>:

>
> 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 '[email protected]', '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:358060
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to