Re: Tags implementation
Thanks RyOnLife !! Finding a tag details from the suggested design by you, need to find from all tables so extra 4 SQL Join query will be perform 1. tags_users (tag_id, user_id) (SQL Join) 2. brands_tags (brand_id, tag_id) 3 products_tags (product_id, tag_id) 4 posts_tags (post_id, tag_id) Should I go ahead without worry abt SQL performance? Thanks On Oct 26, 4:14 am, RyOnLife [EMAIL PROTECTED] wrote: I'm having some trouble with save/delete HABTM myself, but I can at least help you on your table design. Following Cake conventions (plural, lowercase, abc order) and assuming you want everything taggable, your join tables would be: tags_users (tag_id, user_id) brands_tags (brand_id, tag_id) products_tags (product_id, tag_id) posts_tags (post_id, tag_id) -- View this message in context:http://n2.nabble.com/Tags-implementation-tp1376700p1377213.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Tags implementation
Hi, I want to implement tag functionality for my site. I have four modal 1 Tag 2 User 3 Brand 4 Product 5 Post I am thinking to make two tables tags : id, tag_name entities_tags : tag_id, entity_id, entity_type here entity is User, Brand, Post and their corresponding ids.. Should I follow this above design or make a different join table for each entity like; tags : id, tag_name tags_users : tag_id, user_id brands_tags: brand_id, tag_id posts_tags: post_id, tag_id please tell me in terms of save, edit, delete, get..searching for a tag name which one is best design for CakePHP thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Tags implementation
I'm having some trouble with save/delete HABTM myself, but I can at least help you on your table design. Following Cake conventions (plural, lowercase, abc order) and assuming you want everything taggable, your join tables would be: tags_users (tag_id, user_id) brands_tags (brand_id, tag_id) products_tags (product_id, tag_id) posts_tags (post_id, tag_id) -- View this message in context: http://n2.nabble.com/Tags-implementation-tp1376700p1377213.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---