title: MySQL Structure for a social network
body: <p>I'm experimenting by making a social network from scratch in PHP/MySQL, but I'm having trouble thinking of the optimal MySQL structure for it, currently I have:</p>
  <p>This is a table which stores all user info:</p>
  <pre><code>fname varchar (300),
  sname varchar (300),
  pass varchar (400),
  email varchar (300),
  gender varchar (300),
  dob varchar (200),
  uid varchar (300),
  PRIMARY KEY (id)
  </code></pre>
  <p>This is created when a user signs up, their own personal table:</p>
  <pre><code>id int(20) NOT NULL auto_increment,
              uid varchar (300),
              photo_url varchar (400),
              pfid varchar (300),
              phototime datetime,
              video_url varchar (400),
              vfid varchar (300),
              videotime datetime,
              status longtext,
              sid varchar (300),
              statustime datetime,
              blog longtext,
              bid varchar (300),
              blogtime datetime,
              about_bio longtext,
              about_current_job longtext,
              about_secondary_school longtext,
              about_primary_school longtext,
              about_college longtext,
              about_university longtext,
              about_workemail longtext,
              about_homeemail longtext,
              about_phonenumber longtext,
              about_relationshipstatus longtext,
              about_relationshipwith longtext,
              PRIMARY KEY (id)
              )&quot;;
  </code></pre>
  <p>The sessions table to track whether someone is logged in or not:</p>
  <pre><code>id int(20) NOT NULL auto_increment,
  sid varchar(300),
  uid varchar(300),
  PRIMARY KEY (id)
  </code></pre>
  <p>Haven't gotten onto relationships yet but I was thinking:</p>
  <pre><code>id int(20) NOT NULL auto_increment,
  requestby varchar(200),
  requestto varchar(200),
  status varchar(200)
  </code></pre>
  <p>(Before anyone asks, this is purely just for the learning experience, nothing more)</p>