title: Using two different structures in one Firebase database
body: <p>I'm currently working on a project where I need two different types of non-related datastructures in my Java Android app. One being users, the other being types of food. </p>
  
  <p>Users are set up like this:</p>
  
  <p>users</p>
  
  <ul>
  <li>userid
  
  <ul>
  <li>name</li>
  <li>age</li>
  <li>gender</li>
  <li>weight</li>
  <li>height</li>
  </ul></li>
  </ul>
  
  <p>But, I also need one that looks like this, which must be searchable:</p>
  
  <p>foods</p>
  
  <ul>
  <li>name
  
  <ul>
  <li>carbohydrate</li>
  <li>fat</li>
  <li>protein</li>
  </ul></li>
  </ul>
  
  <p>Is it possible to user the same database (preferrable Firebase, as I'm already using that), or do I need to add another database to the app I'm making?</p>
  
  <p><strong>Edit:</strong> I ended up exporting the JSON, rewriting it according to the good answers given here, and then importing it again. It works flawlessly. Thanks for your answers!</p>
  
  <pre><code>{
    "foods" : {
        "name" : {
          "carbohydrates" : "5",
          "fats" : "5",
          "proteins" : "5"
      }
    },    
    "users" : {
      "FjtMNTcDrOP2wcaPAa0E0Cc1jRz2" : {
        "activity" : "Moderate Exercise (3–5 days/week)",
        "age" : "40",
        "gender" : "Male",
        "height" : "180",
        "name" : "Flex",
        "weight" : "86"
      }
    }
  }
  </code></pre>