Home  >  Article  >  Backend Development  >  Mysql user messaging system design doubts

Mysql user messaging system design doubts

WBOY
WBOYOriginal
2016-09-24 09:15:131079browse

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?

Reply content:

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn