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
https://forums.phpfreaks.com/topic/227193-news-feed-database-implementation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.