Suppose you want to create a database for some web application. This database already contains many tables, and you may need to expand it in the future.
In addition, you want the end user to be able to comment on any object in the database.
I would like to find a solution for this, it would be general enough that I do not have to expand it every time I add a new table to the database.
I thought of the following:
Table Name : Comment
the columns
- id: comment id
- user_id: id of the user making the comment
- object_table_name: the table in which the marked object
- object_id: identifier of the commented object in the object_table_name table.
- text: text
- date: date
, , , - , (, object_id ).
, - , .
? , ?
.-