Correct. Common strategy is to either persist a setting into application settings or to save a value to a file at the very end of the process.
The logic becomes:
1. Is my special value there?
2. Yes - great, database is populated, business as usual
3. Nope - OK, load up the database
4. Last step after loading up the databes, set my special value
In the emulator if you rebuild or close and open then yes, you'll end up in steps 3 - 4.