What's the most efficient way to remember read/unread status across multiple items?

For example, let's take the format of a forum, where we have multiple users and multiple threads. Say this forum wants to track which users have read which threads and, say, use that information to mark which threads are unread when viewing the thread list.

The only solution I can imagine is something that drops a record into the database each time a user visits a thread. I suppose there could be a 'mark all as read' button, which could employ a time stamp to help lessen the sprawl in the database... regardless this isn't a solution that impresses me.

I have a feeling that I'm missing something here... maybe Thanksgiving morning isn't the time to think over one's programming problems.

Is there a better solution out there for this? Any ideas?

Answers


  1. Drop a record in the database for each user-thread combination
  2. Or store this information in a file - one file per user. It may need to be locked/unlocked in case multiple logins by the same user are allowed.

Using a database record sounds like the most promising to me. It will generate a table with millions of rows very quickly if you have an active forum but it would be the simplest solution to implement. It will give a lot of flexibility for querying which users are reading what too.


Need Your Help

C# - Copy an Image into an 8-bit Indexed Image

c# image bitmap

I want to create an 8-bit indexed image from a regular 32-bit Image object.