If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > design a table for recording people's activities

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-09, 21:33
chiefman chiefman is offline
Registered User
 
Join Date: Jan 2009
Posts: 23
design a table for recording people's activities

hi guys,
does anybody know the structure of the table that records people's activities on those SNS websites? e.g. facebook, when people perform some operations, there will be a message like "Person A uploads a photo", and their friends will know what they've done. I think there must be a table recording this. thanks
Reply With Quote
  #2 (permalink)  
Old 02-15-09, 22:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
yes, there is a table recording it

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-15-09, 22:16
chiefman chiefman is offline
Registered User
 
Join Date: Jan 2009
Posts: 23
thanks for the response. but do you know what its structure is? I guess it may be Activity(activityId, operatorId, operatedObject, objectId,...). if any wrong, please correct me.
Reply With Quote
  #4 (permalink)  
Old 02-15-09, 22:20
chiefman chiefman is offline
Registered User
 
Join Date: Jan 2009
Posts: 23
"Buy my book Simply SQL from Amazon "
congratulations on your new book! I wish it could be bought in China.

Last edited by chiefman; 02-16-09 at 20:37.
Reply With Quote
  #5 (permalink)  
Old 02-16-09, 04:28
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Wasn't the structure of facebook given in this thread?
Reply With Quote
  #6 (permalink)  
Old 02-16-09, 05:40
chiefman chiefman is offline
Registered User
 
Join Date: Jan 2009
Posts: 23
no. the thread you referred to is about how to store the relationship. my present question is about how to store the user's activity. they're different
Reply With Quote
  #7 (permalink)  
Old 02-16-09, 10:01
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
there will be a message like "Person A uploads a photo", and their friends will know what they've done. I think there must be a table recording this.
If it's not in the original facebook database then can't you just get a bit creative and create a table called UserActivity and simply store what the user does. You might want a flag to indicate whether to notify friends or not so important things can get notified out while lesser things might just be logged. You might want to include some form of optional id field etc to indicate what photo has been uploaded. Now when the user does anything interesting you can tell his friends about that activity ie
Code:
create table UserActivity (
  user_id
  activity_description
  notify_flag
  time_completed
)

insert UserActivity values ( 1234, 'added new photo',1,now() )
Reply With Quote
  #8 (permalink)  
Old 02-16-09, 20:43
chiefman chiefman is offline
Registered User
 
Join Date: Jan 2009
Posts: 23
thank mike_bike_kite. I think I got a little process on it.
Activity(activityId, operatorId, activity_description, operatedObject, objectId, happenTime). but it is not perfect.
Reply With Quote
  #9 (permalink)  
Old 02-18-09, 17:51
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On