Of course, the database is not deleted. I assume that you are doing it "right." In this case, the database is permanent. (of course, if you decide to create a database in a temporary directory or something similar, then it will not work properly).
Think of it this way. A database is basically a text file. What you do with the database is changing the contents of this text file (leave it a little more difficult in real life, but this is a good way to think about it).
After you make changes to the database (for example, add a line), the database file is saved to disk, thereby saving it. If the phone is turned off or the application is completed, the database file is saved and you can continue to connect to it in the future.
source share