hassank1 Posted January 15, 2008 Share Posted January 15, 2008 Hey I am working on a social network site (friends - groups etc..) . so I want to create mini-feeds so every users get some information about his friends , groups he joined etc.. example when he sign in he get something like : X send friend request to Y. X joined group G1. Z and Y are now friends Z wrote in the group G1 .. X updated his profile etc.. my tables are (groups - friends - users - requests (for friend requests) .. etc...) so I want to know how should I design this concept .. (ex:creating one table in the db ? many tables ?) what should I put in these tables (fields ) .. is there a good programming practice I must follow ... and if you know something else that might help please let me know thanks. Quote Link to comment https://forums.phpfreaks.com/topic/86199-social-network-site-mini-feeds/ Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 Take a look at the free book in my sig, in that book is a chapter on database normalization. Quote Link to comment https://forums.phpfreaks.com/topic/86199-social-network-site-mini-feeds/#findComment-440248 Share on other sites More sharing options...
hassank1 Posted January 15, 2008 Author Share Posted January 15, 2008 am kind of familiar about the normalization concept.. however,I was asking if I can get some tips about this specific topic (mini-feeds)..btw I've checked the book .. good work .. thx Quote Link to comment https://forums.phpfreaks.com/topic/86199-social-network-site-mini-feeds/#findComment-440259 Share on other sites More sharing options...
torb Posted June 8, 2008 Share Posted June 8, 2008 Sorry about the incredibly late reply. I've done something similar to a forum some time ago. What I did was that I set up a separate table for the feed. It contains these fields - User id (to join in with the user table) - Feed id (smallint, for unique identification. key, auto-increment) - Feed story (for the basic text, plus links etc) - Where the feed was generated (was it from the gallery? the download center? great for stats) - Visibility (in my system, people can chose to be invisible in the feeds, but admins can always see the activity) - Timestamp (so that you have a period to pick from later) I prune the table sometimes though, it grows big quite soon Quote Link to comment https://forums.phpfreaks.com/topic/86199-social-network-site-mini-feeds/#findComment-560419 Share on other sites More sharing options...
keeB Posted June 8, 2008 Share Posted June 8, 2008 Great idea torb. Quote Link to comment https://forums.phpfreaks.com/topic/86199-social-network-site-mini-feeds/#findComment-560538 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.