Allowing the user to add and remove items from an application database, directly or indirectly, can be very useful in all sorts of scenarios. Perhaps though, we want to start the user out with a standard data set, or maybe provide some default settings for the user to manipulate down the road? These scenarios call for the ability of the application to provide itself with a default database. In this recipe, we will demonstrate how to handle this intelligently through the file system.
In this recipe, we will be bundling an already established SQLite database file within our application directory. If you do not have access to a SQLite database file already, you can either use some of the other recipes in this chapter to generate one, else use any one of a variety of other freely available mechanisms for creating these portable little database files.