I have a table called Comment
which stores comments of users. This Comment
table should reference different types of content: revisions, posts, and other comments (using tables Revision
, Post
, and Comment
respectively).
How should I design the database so that this can be achieved?
Edit: Just for clarity.
I have several types of content: Revision, Post, Comment. It is possible that other types may be addded in the future. For each type of content a user is able to comment. How do I construct my tables and references so that a Comment
can be linked to the different types of content.