Data Table Design of like system

how should a like collection system design a data table?
I intend to add an array to the user table, put the id of the like content in it, cancel the like, and then remove the id from the array

.

find a better way

Mar.06,2021

should be pulled out separately to do it with the cache, and then it can be persisted to the database on a regular basis. If you do it directly with the database, for example, when there is a large concurrency scene in a short time (dozens of likes are instantly added to the posts of online celebrities), there may be bottlenecks.

of course, consider your specific scenarios as well.

Menu