Reputation: 2705
I'm using PHP and MySQL for social network system
I have MySQL table named member_feed , in this table I save feeds for each member, my table structure is :
|member_feed_id | member_id | content_id | activity_id | active
in this table I have more than 120 million record, and every member has set of record.
I do this queries on this table :
1 - select * from member_feed where memebr_id= $memberId
2- update memebr_feed set active = 1 where member_id = $member_id
3- insert into member_feed (member_id, content_id,activity_id,active values(2,3,59,1) )
for each member daily I have at least new 50 feed by beanstalkd system and I have more than 60000 member.
I currently work to migrate from MySQL to MongoDB and I'm new on MongoDB. so I need to convert this table to collection in MongoDB.
is this use cases good for mongodb and good solution for my system to increase system performance?
Upvotes: 4
Views: 515
Reputation: 1344
Well, In mongodb joins between two collection is not available so, my question is where you will store member,content, activity? i believe these should embedded in the member_feed.
Example: member_feed Structure:
{_id:1,member:{_id:2,name:"Anuj"},activity:{details:"xyz"},active:false}
Hope that helps!!!
Thanks
Upvotes: 1