title: It is better to call a Room DataBase query many times or create a variable?
body: <p>It is something that may seem very new but I have this doubt, I will do it with a simple example:</p>
  <p>I have a database with a table that contains, among many other things, a &quot;name&quot; column</p>
  <p>When I want to use the name of id 1 many times, what is the best practice?</p>
  <p>Option 1: Create a String variable called &quot;name&quot; to make a single query in the database
  Option 2: Call &quot;name&quot; directly from the database every time it is to be used</p>
  <p>I always create a variable to avoid many queries in my database but I don't know if I'm right</p>
  <pre><code>String name = appDataBase.tableDao().getName(id);
      textView1.setText(name);
      textView2.setText(&quot;Employee: &quot; + name);
      .
      .
      .
  </code></pre>