title: Should I make new table for storing user's address in Rails
body: <p>I have created a rails app and
  my "users" table goes like this</p>
  
  <pre><code>create_table "users", force: :cascade do |t|
  t.string   "name"
  t.string   "email"
  t.string   "password_hash"
  t.string   "password_salt"
  t.integer  "country_id"
  t.integer  "state_id"
  t.integer  "pincode"
  t.string   "address"
  t.string   "phone_no"
  t.float    "latitude"
  t.float    "longitude"
  </code></pre>
  
  <p>Other tables <code>states , country , posts</code></p>
  
  <p>Associativity:</p>
  
  <pre><code>user has_many :posts
  user belongs_to :state
  </code></pre>
  
  <p>I have a <code>"states"</code> table for maintaining state names and other stuffs.I have a <code>"posts"</code> table in which each user can have multiple posts.</p>
  
  <p>Clearly I have more focus on location attributes of the user, also I need to frequently access these attributes while rendering posts of a user.</p>
  
  <p>So, should I fragment location related attributes into a new table <code>"addresses"</code>?</p>
  
  <p>Each user has only one address.</p>
  
  <p>I feel this one right but then I need to perform lengthy linking to access those attributes from <code>posts views</code></p>
  
  <p>Ex. to access state,</p>
  
  <pre><code>&lt;% @state = State.find(Address.find(User.find(@post.user_id).address_id)).state_id).name%&gt;
  </code></pre>
  
  <p>So, what should I do fragment users or just keep as it is?</p>
  
  <p>Thanks in advance!</p>