jonniejoejonson Posted August 26, 2011 Share Posted August 26, 2011 I am creating a social network. Like is common in many social networks I want a page that lists a users recent activity. To do this Would you. 1. Create a table called recentActivity, and every time a user does anything add this action to the table. or 2. Join all your relevant tables and select the most recent things the user has done based on the date. I am leaning towards 2... what are your thoughts.. regards J Quote Link to comment https://forums.phpfreaks.com/topic/245750-recent-activity-architecture/ Share on other sites More sharing options...
kickstart Posted August 26, 2011 Share Posted August 26, 2011 Hi 2nd option is the most correct way to do it (avoids duplicating data). However if they are busy tables I would be tempted to use the 1st option. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/245750-recent-activity-architecture/#findComment-1262222 Share on other sites More sharing options...
fenway Posted August 26, 2011 Share Posted August 26, 2011 You're supposed to do both -- (2) leave the data intact, where you expect it to be, properly related and normalized; (1) is your summary table. Quote Link to comment https://forums.phpfreaks.com/topic/245750-recent-activity-architecture/#findComment-1262235 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.