title: User Settings/Privacy Database Design
body: <p>I am developing a website using PHP and MySQL where users have options such as: </p>
  
  <ul>
  <li>receive notifications via email</li>
  <li>hide/display Facebook/Twitter links </li>
  </ul>
  
  <p>It will also allow users to control privacy of their profile from information viewable to friends/non-friends and what friends are able to view certain photos/albums.</p>
  
  <p>I was wondering how I would design this table to be robust and what things should I put into consideration.  How does Facebook manage each users privacy settings and options just out of curiosity?</p>
  
  <p>My solution so far is along the lines of this:</p>
  
  <p><strong>id</strong> - Primary Key</p>
  
  <p><strong>member_id</strong> - Primary Key and Foreign Key (Member tables 'id')</p>
  
  <p><strong>facebook_viewable</strong> -  int(1)  - 0 for No and 1 for Yes</p>
  
  <p><strong>email_notifications</strong> - int(1) - 0 for No and 1 for Yes</p>