Jump to content

[SOLVED] recent activity table


jonniejoejonson

Recommended Posts

Facebook is huge.  Their databases are mirrored, and so the "most recent activity" is not always the most recent.

 

To say you should JOIN all your tables really depends on your structure.  Do you have multiple tables that have their own events?  Or do you have one common table where events are published?

 

If you had the first design, then you would probably have to do something like what was said above.. but if you had the latter, you would only select the 10 most recent events..

 

So, it depends on your design.

Link to comment
Share on other sites

i have for example an images table. a videos table. a friends table etc...

each table has a user_id and a date fields.

therefore i could just inner join all the tables along userId and then select the 10 most recent activities for a user.

However facebook have the option to delete any recent activities, therefore this would require all my tables have a field that states whetehr a user has choosen to delete this from there recentacitivites.

therefore i would assume that facebook would have an entire table dedicated to recent activities.. i may well be wrong.. what do you think?... thanks J.

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.