In my asp.net MVC app, I'm planning a user notification system similar to SO's. Here's the table structure I'm thinking of:
Message table
--------------------------------
PK MsgId BigInt
FK UserId UniqueIdentifier
Body nvarchar(200)
IsRead TinyInt
DateSent DateTime
First, does this DB structure look ok? is there a better way?
A ribbon at the top will show the user has unread messages. The message automatically becomes read when the user visits that message's page (no need to click a "mark as read" button. [changes the IsRead field to 1]
Building the ribbon to always be visible when there is an unread message is easy. How do you build it to let the user hide the ribbon, even if they have unread messages - and then NOT load the ribbon on the next internal page the user visits?