Note that there are some explanatory texts on larger screens.

plurals
  1. PODatabase to track user notifications or activity (Facebook like)
    primarykey
    data
    text
    <p>I've just read the following posts on the same topic:</p> <p><a href="https://stackoverflow.com/questions/1887602/facebook-like-notifications-tracking-db-design">Facebook like notifications tracking (DB Design)</a> and <a href="https://stackoverflow.com/questions/2231886/database-design-to-store-notifications-to-users">Database design to store notifications to users</a></p> <p>Some solutions were offered but not exactly what I need and how it should be for a Facebook-like notification system.</p> <p>In a notification, we often have some links pointing to the user who took some action, link to a post or video he commented on, link to anything, and ofter we have several links in a single notification.</p> <pre><code>notification ----------------- id (pk) userid notification_type notification_text timestamp last_read </code></pre> <p>With this table structure we can show all notifications for a single user and it is pretty solid solution. But in this case, we can only display a plain text notification. We cannot simply link to a user or a wall post.</p> <p>I'm trying to come up with a solution to this problem. One is to store BB Codes in notification_text property, but then you need to write BB code parser both for web and mobile applications. Another would be creating another table which derives from this notification table with ID's for entities we need. An example:</p> <pre><code>PostCommentNotification : Notification ---------------------------------------- id userId (user who commented on a wall post) postId (post where comment was made) </code></pre> <p>Now we can write a template for displaying the notification (we don't need the text property in notifications table anymore now) and then handle displaying it. I'm not satisfied with this solution either since the number of tables deriving from notification table could be big (for each notification type).</p> <p>I'm looking for ideas! :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload