How to design sub-table rules for commodity evaluation table?

Shopping system, how to make the sub-table in the commodity evaluation table?

on the one hand, users need to check the reviews they have written, and
on the other hand, merchants also need to check the reviews of their products.

it will be troublesome to find the merchant for evaluation if you divide the table according to the user"s id, and you need to look for data in multiple tables.
on the contrary, it is the same with the merchant id subtable, it will be very troublesome to find the user"s evaluation.

the solutions that come to mind now are:

  1. store two copies of data directly, one by the merchant"s id and the other by the user"s id.
Aug.07,2021
Menu