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.

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.

thanks for your response, but i am self taught and was wandering how to go about something... was just using facebook as an example because it is doing the same thing that im trying to do. so would you use a seperate table? or simply join all the tables?... thanks J

thanks for your response... but you dont sound convinced... like i said i am self taught so i am simply guessing as to what would be best... if you were trying to create a recents activity would you create a seperate table for it? thanks... J

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.