There are many reasons why SQLite has become the relational database of choice for mobile handsets—it is scalable, fast, written in native C, and very portable, and has the added bonus of an exceptionally small footprint. We need local databases on our devices in order to store data when devices are offline, or even to store data that is only required locally (high scores in a game, for instance).
Additionally, the caching of remote data can help speed up data access times in our applications—particularly important when mobile devices may have limited connectivity and bandwidth.
There are two ways to create SQLite databases in your application, one—create the database in code using SQL and two—copy and attach an existing database to your app via the 'install' method. In this recipe we will explain how to create a database via SQL statements.