|
such as:
I have three tables, the product table, the enterprise table, and the publication activity table. The user has to comment on these three tables that are not related and have different structures, so I have a review table.
Comment form details:
F_Id int identiy (1,1), primary key
Entity_Id int, or product ID, or enterprise ID, or publishing activity ID ------- Question?
F_Bound tinyint, the scope of the review, is the product, business or event
User_Id varchar (20), user ID
F_Title varchar (50), comment title
F_DateTime datetime, comment time
F_Content varchar (500)
How can I set the foreign key of this table? If a foreign key is set, there is a master-slave table relationship, but the Entity_Id does not correspond to only one table. How to make it a foreign key for three tables ??????? |
|