M.O.S. Studios Posted May 26, 2009 Share Posted May 26, 2009 Hey guys, Im working on a site that will have streaming video, for each video their will be a ability to comment on it much like you tube. I'm torn between two ways to build this, the final goal will be minimizing loading time and strain on the server. option 1. Each video have 2 tables, one for the video information, the other for its comments. option 2. all the coments are stored in one table with a reference number linking it to the video any other sugestions are welcome, any ideas? thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/159690-solved-comments-on-a-youtube-style-site/ Share on other sites More sharing options...
corbin Posted May 26, 2009 Share Posted May 26, 2009 Aren't those two the same? Anyway, you will want to have separate tables. Perhaps something like: ---videos--- video_id, poster_id, video_name, video_desc ---comments--- video_id, user_id, comment_content Quote Link to comment https://forums.phpfreaks.com/topic/159690-solved-comments-on-a-youtube-style-site/#findComment-842396 Share on other sites More sharing options...
M.O.S. Studios Posted May 26, 2009 Author Share Posted May 26, 2009 no, one all the comments are stored in one table regardless of what video they are for, the other way each comment is put into a different table depending what video they are for. how ever, you described the 1st way Quote Link to comment https://forums.phpfreaks.com/topic/159690-solved-comments-on-a-youtube-style-site/#findComment-842470 Share on other sites More sharing options...
kickstart Posted May 26, 2009 Share Posted May 26, 2009 Hi A seperate table for each videos comments would rapidly get out of hand. MySQL has no problems coping with a massive number of rows if they are properly indexed. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/159690-solved-comments-on-a-youtube-style-site/#findComment-842474 Share on other sites More sharing options...
M.O.S. Studios Posted May 26, 2009 Author Share Posted May 26, 2009 thanks thats what i needed to know Quote Link to comment https://forums.phpfreaks.com/topic/159690-solved-comments-on-a-youtube-style-site/#findComment-842518 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.