title: Database Connection - Database Design - Parent - Child - child of child
body: <p>I have a Questions on Database Designs - What and how is the best way to do it. this is how i usually do it. ^^</p>
  
  <p>Simple Example: i have 3 Tables</p>
  
  <p>Users Table</p>
  
  <pre><code>user_id      name     
  2           Name1     
  3           Name2 
  </code></pre>
  
  <p>Facility Table</p>
  
  <pre><code>facility_id      facility_name     user_id
  13                facility1            2
  14                facility2            3
  </code></pre>
  
  <p>Floor Table                                   ( this is what i do
                                                     i add user id here ^_^ )</p>
  
  <pre><code>floor_id      floor_name      facility_id       ( user_id )
  5             floor1             13                  2
  6             floor2             14                  3
  </code></pre>
  
  <p>So in here You don't have to add user connection to floor table because u have it to facility where floor table is connected.. </p>
  
  <p>but i tend to add it anyway for easier Query..   is this a bad Practice? </p>