Jump to content

News Feed Database Implementation


shintei

Recommended Posts

So for a web system I have been building, I want to use a news feed system that displays whats happened that involves the user while they where away/logged out

 

Ex.

  • Sue has sent you a message
  • Bobby has invited you to an event

 

My question is on how others would normally store this. My first though was to make a table which would hold one row per user. The row would then have two column, one called feed which would hold a concatenated listing of events that have occurred. The issue with that though is it would be a pain to try and remove old feeds. I don't need to store things that happened a month ago.

 

I also though of inserting a new row for each event, and then have a script that runs every so many days deleting feeds that are of X days old. The problem with this though, is I imagine that the table could get pretty large and could cause a lot of Overhead (correct me if I am wrong).

 

Does anyone know how this is usually done? I also apologizes in advance if this topic has been discussed prior. I did a quick search but didn't find much.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.