1. The current website is divided into two types of messages, the first: site-wide messages, and the second: private messages. (Private messages are better designed and I won’t go into details. The key is site-wide messages. The design of n*m is estimated to explode with 10,000 member tables...)
2. The desired effect of the design:
<code>1、用户可以自由删除消息。 2、可以判断当前有多少条未读消息。 3、节省数据库资源。 </code>
How to design?
1. The current website is divided into two types of messages, the first: site-wide messages, and the second: private messages. (Private messages are better designed and I won’t go into details. The key is site-wide messages. The design of n*m is estimated to explode with 10,000 member tables...)
2. The desired effect of the design:
<code>1、用户可以自由删除消息。 2、可以判断当前有多少条未读消息。 3、节省数据库资源。 </code>
How to design?
You definitely can’t use mysql for this kind of thing
At least you have to use redis