why do you copy the SQLite DB before using it?

Everything I have read so far, it seems as though you copy the DB from assets to a "working directory" before it is used. If I have an existing SQLite DB I put it in assets. Then I have to copy it before it is used.

Does anyone know why this is the case?


I can see a possible application to that, where one doesn't want to accidentally corrupt database during write. But in that case, one would have to move database back when it's done working on it, otherwise, next time program is run will start from "default" database state.

That might be another use case - you might always want to start program execution with known data state. Previous state might be set from external application.

Need Your Help

Tab styling with HTML and scripting logic

html scripting tabstop

More of a stylistic question really, but how do you mix HTML tabs with scripting logic tabs in your source code? That might not be the best way to state the question, but I think a simple example w...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.