PDA

View Full Version : Table Scheme Help


Guest190829
08-10-2005, 06:59 AM
Hello fellow coders!

I'm hear looking at my table layout for vbspace, and have a question. The hack will have the ability for comments to be added to

1.) The users "space" page as user comments
2.) The users Blog page as comment for entries
3.) The users Galler Page for comments on pictures.

What would be the most logical and optimized way of the storing the comments?

1.)Having one table with is_gallery, is_blog, and is_space, fields to determine where they belong?

2.) Or seperate tables for each type of comment. (Ex. gcomments, scomments, bcomments)

I'm thinking the 2nd choice would be best, since the tables wouldn't contained redundant/null fields. But I could be wrong of course. ;)

Any help will be greatly appreciated!

Guest190829
08-11-2005, 07:26 PM
Bump-a-roonie. :)

AN-net
08-11-2005, 08:02 PM
i would personally put all in one table and just use a field and numbers to distinguish them but then again if it becomes very popular requests to a large table can cause some usage increases and slow down the table.

Guest190829
08-11-2005, 08:03 PM
Yeah, the chances for it becoming a large table is high. So I guess it would be best to have seperate tables...any other input on this?

Reeve of shinra
08-11-2005, 08:14 PM
Do you plan to move posts from one to the other in anyway? That could be a consideration too.

Guest190829
08-11-2005, 08:24 PM
Do you plan to move posts from one to the other in anyway? That could be a consideration too.

Not sure what you mean. Comments won't be moved, but they will be edited and deleted sometimes.