Re: database design conundrum
Aye. Thought of that. There will be predefined groups, kind of like Facebook's Only Me, Friends, Friends of Friends, Everyone groups, but I wanted users to be able to exclude specific people from an entire group share in addition to adding individuals, should they desire. Hence the slightly overcomplicated design. Who knows? the feature might not ever get used or might end up being too resource intensive to keep, but better to build it into place now than try to cram it in later ... as long as it doesn't break anything. On 3/21/2014 10:02 AM, David Phelan wrote: 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 ~| 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:358062 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
database design conundrum
I have a design issue I can't seem to get my head around. Say I have a table full of users with certain fields containing information they can share with or hide from other users. users_table -- userid thing_to_share_or_not_1 thing_to_share_or_not_2 thing_to_share_or_not_3 ... There are a lot of things The default is to hide. What is the most efficient way to denote that a user is sharing specific info with another user? I immediately thought about a joining table sharing_table -- userid_of_sharer userid_of_user_being_shared_with I can't figure out how to join what specific piece of information is being shared. I thought about including a varchar in the share table with the name of the shared field in it, but, while doable, seems a clumsy hack. What obvious thing am I overlooking? Todd Ashworth Janty Networks ~| 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:358055 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: database design conundrum
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:358059 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Dojo tutorials/guides/examples
I have begun working with Dojo. It is interesting, but I need some clearer examples. The web site tutorials are pretty generic/abstract. What I would love to see are working examples of it doing something useful ... a full user login implementation, perhaps, or something along those lines. I am looking for examples that go from start to finish accomplishing a task. Examples using CF would be most excellent. I could just google what I am after, but I am hoping someone here has had some experience with Dojo and could point me to a useful, trusted source. Thanks. Todd Ashworth Janty Networks ~| 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:358054 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cf-database vs cf-java-database
MySQL, or one of the NoSQL variants, though I am still investigating. Twitter's DB solution offers a lot of promise, but it is only designed to handle = 30% of what I am looking for and is still beta. I have been ignoring SQL Server in favor of open source alternatives, but I will give it another look. Thanks! On 7/14/2012 4:48 AM, Russ Michaels wrote: What database are you using? If sql server then it has a native xml query engine which you can access via url and form posts through iis, so could cut cf or any middleware out of the loop. Regards Russ Michaels ~| 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:351891 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cf-database vs cf-java-database
server and its database connections are never the problem in my experience. Jumping to Java would be a bad call. nathan strutz [www.dopefly.com] [hi.im/nathanstrutz] [about.me/nathanstrutz] On Fri, Jul 13, 2012 at 9:57 PM, PT cft...@gmail.com wrote: Is there any advantage to having a CFC hand off database operations to java or some derivative over letting cfquery handle them itself? I have seen people use the CFC as a wrapper for using another language to handle the database access, but I have never seen a concrete explanation for doing this. I am looking for speed advantages, mainly. Is there any language that is faster at database interactions than CF on a large scale, or does it even matter? I am pretty sure no matter what I do, the database is going to be the choke point, but every little bit helps, especially when scaling up and things get wonky. ~| 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:351892 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cf-database vs cf-java-database
Is there any advantage to having a CFC hand off database operations to java or some derivative over letting cfquery handle them itself? I have seen people use the CFC as a wrapper for using another language to handle the database access, but I have never seen a concrete explanation for doing this. I am looking for speed advantages, mainly. Is there any language that is faster at database interactions than CF on a large scale, or does it even matter? I am pretty sure no matter what I do, the database is going to be the choke point, but every little bit helps, especially when scaling up and things get wonky. ~| 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:351888 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm