| |
|
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.
|
 |

02-15-09, 21:33
|
|
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
|
|

02-15-09, 22:01
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
yes, there is a table recording it

|
|

02-15-09, 22:16
|
|
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.
|
|

02-15-09, 22:20
|
|
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.
|

02-16-09, 04:28
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
Wasn't the structure of facebook given in this thread?
|
|

02-16-09, 05:40
|
|
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
|
|

02-16-09, 10:01
|
|
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() )
|
|

02-16-09, 20:43
|
|
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.
|
|

02-18-09, 17:51
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|