title: MySQL - Database design - separate tables for users and profile
body: <p>From what I've been reading online, I understood that it's better to split the data into more tables, if possible because of the access times.</p>
  
  <p>Right now I have a table in which I am storing usernames, passwords and join date
  This is how my table looks:</p>
  
  <pre><code>'user'
  'user_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  user_username VARCHAR(80) NOT NULL,
  user_password VARCHAR(255) NOT NULL,
  user_join_date INTEGER UNSIGNED NOT NULL,
  PRIMARY KEY (user_id) ');
  </code></pre>
  
  <p>I am trying to create a new table called profiles in which I want to store first name, last name, email, age and gender. What I think is that I need a one-to-one relationship, so I should be using the user_id but I'm not really sure how to implement it.</p>
  
  <p>Should I create another table called profiles with 
  profiles</p>
  
  <pre><code>profiles_id
  first_name
  last_name
  email
  age 
  gender
  </code></pre>
  
  <p>and another one which should be the relationship ? e.g.</p>
  
  <pre><code>user_profiles
  ----------
  user_id
  profiles_id
  </code></pre>
  
  <p>Is this right? How would the SQL look for the user_profiles?</p>
  
  <p>Thanks </p>