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 > Database Server Software > MySQL > Orkut like privileged profile management

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-22-10, 15:08
samikchattopadhya samikchattopadhya is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
Orkut like privileged profile management

Orkut has a privileged profile management, where user can manage what to allow and to whom. What should be the database design to achieve this result.

Elaborated :

Say I have given permission to view my -
1. DOB only to my friends.
2. My email only to me.
3. My college name to all.
etc.

-----------------------------------------------------------------------------------------------------------
If I use the following table for profile details I cannot manage the privilege.

user(id, username, password)
profile(id, user_id, dob, email, college, ... )
N.B. - user_id (FK from user)
id - PK
-------------------------------------------------------------------------------------------------------------
On the other hand,

user(id, username, password)
profile(user_id,detail_id,privilege_id)
privileges(id,name) [ 1-Me, 2-Friends, 3-Friends of friends, 4-All ]
details(id,name) [1-email, 2-dob, 3-college, 4-gender etc.]
N.B. - user_id (FK from user)
detail_id(FK from details)
privilege_id(FK from privileges)
id - PK

The second case solves the previous problem, but brings a weaker programming dependency on data entry for the details table. Also this method will bring problem to search data on a specific field.


Please anyone help me design a perfect database on this regard.

Last edited by samikchattopadhya; 08-22-10 at 15:14.
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