How do the attention and mutual attention in the social class app design the data table?

how are data tables designed for attention and mutual attention in the social class app? Like Weibo. Is
stored in a separate table or in a json field in the user table?

Sep.26,2021

many-to-many relationships generally need to be associated with an additional table, and a join table query is required when querying.

but storing some necessary information in a separate line and checking additional information when more information is needed can improve a lot, so I feel that using json will improve a lot, but you also have a problem of updating Synchronize, so you can use it in combination with

appropriately.

each user should have a unique id, that uses this field to identify whether the user is following you. There can be a user table and a user row in the database. There are two fields, such as "who follows" and "who is followed", so the only id, of the user is stored in these two fields. If someone follows you, "who follows" adds the id, of the user who follows you. At the same time, the user who follows you will also add your user id in the "people who follow" field of his own line. In this way, Synchronize can update the follow information, and at the same time, we can also query the information of these two fields to determine whether there is already followed.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30838-2bd22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30838-2bd22.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?