Re: Database design
we do this with an type column. On May 27, 9:22 am, Braindead markus.he...@gmail.com wrote: Well, my problem is not directly related to CakePHP, but as it's about database design maybe I'll get some good answers. On my page I have news, downloads and users. These three can be commented. Additionally I have a shoutbox and a guestbook. The comments, shoutbox and guestbook have all the same fields. So they could reside in the same table. Is it best practice to only have one table for all comments (news, downloads, users), the shoutbox and the guestbook and actually filter based on a type column? Or is it better to separate everything into it's own table? Using only one table has the advantage, that I could use only one controller and a limited set of views, where as using multiple tables would mean multiple controllers and duplicated views (as they are all nearly the same). So what do you recomment? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Database design
we do this with an type column. On May 27, 9:22 am, Braindead markus.he...@gmail.com wrote: Well, my problem is not directly related to CakePHP, but as it's about database design maybe I'll get some good answers. On my page I have news, downloads and users. These three can be commented. Additionally I have a shoutbox and a guestbook. The comments, shoutbox and guestbook have all the same fields. So they could reside in the same table. Is it best practice to only have one table for all comments (news, downloads, users), the shoutbox and the guestbook and actually filter based on a type column? Or is it better to separate everything into it's own table? Using only one table has the advantage, that I could use only one controller and a limited set of views, where as using multiple tables would mean multiple controllers and duplicated views (as they are all nearly the same). So what do you recomment? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---