title: Android MVVM ViewModel and Repositories for each entity?
body: <p>With the Android Architecture components and the MVVM pattern I have some question.</p>
  <p>Based on most examples around the web there are usually simple examples.</p>
  <ol>
  <li>Have an entity for Room</li>
  </ol>
  <pre><code>   @Entity
     public class User{
     ...
     }
  </code></pre>
  <ol start="2">
  <li>Have a DAO</li>
  </ol>
  <pre><code>    @Dao
      public interface UserDao{
      ...
      }
  </code></pre>
  <ol start="3">
  <li>Have a repository</li>
  </ol>
  <pre><code>   public class UserRepository{
      }
  </code></pre>
  <ol start="4">
  <li>ViewModel</li>
  </ol>
  <pre><code>    public class UsersListViewModel extends AndroidViewModel{
      ....
      }
  </code></pre>
  <p>Now let's extend this and beside <code>user</code> have <code>user_access</code> and <code>user_actions</code> for instance, so have 3 tables.</p>
  <p>Questions:</p>
  <ol>
  <li><p>For each table in Room I create entities. Should I have 3 <code>Dao</code> one for each entity (userDao, userAccessDao, userActionsDao) or just a general <code>AppDao</code> class?</p>
  </li>
  <li><p>Same goes for Repository. One repository for the entire app or Repositories for each Entitiy (RepositoryUser, RepositoryUserAccess, RepositoryUserActions?</p>
  </li>
  <li><p>If my app has one main activity and multiple fragments, should I create one ViewModel for each fragment?</p>
  </li>
  </ol>