If you are referring to this forum (which is
not a blog or CMS and requires very different logic than those applications), it is just a standard phpBB forum, customized with our logo. It probably required more than a man-year to write, by very experienced programmers. I commend you on your eagerness to learn, and writing software from scratch is an excellent way to learn, but you need to start with a much simpler project. When you ask a simple question about a complex topic, you're likely to get answers that won't fit your needs. Your original question was:
since both comments table will have the same columns, can i merge them? so that they can reference from 2 tables? is it possible?
The answer to that question would depend on a whole lot of other factors. The short answer is
Yes, anything is possible. That's what feyd meant in his response. The long answer involves everything else in your database, as to whether merging tables makes sense. In relational database theory, a table represents an
entity in the part of the real world that your database is modeling, so unless I know exactly what you are trying to model, I can't give you any useful answer as to how to structure your tables. It would take a lot of discussion and analysis. In some cases, all the Comments should be in the same table, in other cases, they should not. It all depends on the rest of your data and their relationships.
If you find this discussion too complex or too boring, it's because this is the business of database design. There are no shortcuts. It's complex and sometimes boring.