Im making an application where users are able to comment on a lot of things, like blog posts, uploaded songs, pictures and so on.
Is it better to store ALL comments in one table where you have a column that points to what the comment was posted, e.g. blog, picture etc.
Or is it better to store them in separate tables, like “blogcomments” table, “picturecomments” table etc? Say for a site with 10000 plus users?
Thanks
If all comments have the same data being stored (e.g. comment content, user who posted the comment, etc), then it would make the post sense to keep them all in a single table. If they have different formats, then put them in separate tables.