Lets say you have 3 or 4 site features like photos, videos, wall posts, etc. And each have the ability for you to leave a comment.
Should the DB have 1 table and insert all those comments in that one table with their respective unique IDs or should they have like 3 or 4 other tables like Photo_table, video_table, etc....
Better to put them in single table and add respective unique IDs of different features with one extra column type
(Because ids from those master tables can be same) which will indicate whether this comment is from Photo
,video
or anything else.
Suppose if project grow in future have some more features ie (10 features) then you do not have to create tables for all these.
You could implement it in a number of ways. If a comment has the same basic fields in all cases, you would probably have an easier time using one table. If the comments have different data depending on the type of comment, it would be easier to separate them out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With