Php+mysql (MONGODB) implements user notification messages for lookup

Source: Internet
Author: User
Mainly want to know the next logical design, don't joke little brother problem superficial ha,

Just want to know the next app and the website of the message read, such as mass announcement, then the user did not read when the display is not read, after viewing the display has been read, then how to achieve?
If you use a single table to achieve, then each message has how many people read to add how many records, if 100,000 users, the monthly push 10, if all read it is not to add 1 million data ah, so the accumulation is too large, if all deleted then the user's mailbox will all show unread ... Younger brother foolish still hope the elder pointing under,


Reply to discussion (solution)

Status
0 or 1

Add a Lookup Time field

Status
0 or 1


The key is mass ah,

Add a Lookup Time field


Separate table records _log each user reads a record (message id+ time)?

Add a field Is_read = 0
If you've seen Is_read=1,

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.