title: What is advantage of using ROOM rather than saving as Static value?
body: <p>I'm thinking about using <code>Room</code> library for the new android application I am developing.</p>
  <p>I used to make a class for <code>Static value</code> and saved data gotten from a server in that class.</p>
  <p>for example,</p>
  <h3>StaticValue.kt</h3>
  <pre><code>class StaticValue {
      companion object {
          lateinit var users: ArrayList&lt;User&gt;
      }
  }
  </code></pre>
  <h3>Get data and save</h3>
  <pre><code>var tmpArr = ArrayList&lt;User&gt;()
  for (i in 0 until jsonObjArr.length()) {
     tmpArr.add(User(jsonObjArr[i] as JSONObject))
  }
  StaticValue.users = tmpArr
  </code></pre>
  <p>I think Google officially recommends using <code>Room</code> for the MVVM design pattern, but I am not sure about using <code>Room</code> just for saving and query data.</p>
  <p>Is there any advantage to use <code>Room</code> and query data from local DB, rather than saving data as <code>Static</code> and use it from <code>Activity</code> or <code>Fragment</code>?</p>
  <p>Thanks for all your help and advice.</p>
  <h3>Edit</h3>
  <p>Sorry for the lack of info on the question.</p>
  <p>The problem is that the app requires log-in, and all data gathered from the server must be deleted when log-in session expires.</p>
  <p>Is it better not to store and update data every time in the DB that only needs to be alive before the app shuts down or logs out, or just save as StaticValue? I wonder what the efficiency aspect is.</p>