Saturday, August 15, 2015

MJ [10] CanView Design

Question: 
Design a system to meet the following requirements:
boolean CanView(Viewer, Object, Owner);

Return true if viewer can read object of owner; otherwise return false.

object has one property which can be public or friends. If it is public, viewer can read object; if it is friends, only friend of owner can read object.


Ref
[1] http://www.mitbbs.com/article_t/JobHunting/33022171.html
[2] http://stackoverflow.com/questions/8663072/database-design-for-social-network-friends-list-friends-circle-post-sharing

No comments:

Post a Comment