How to convert between sqlite2 and sqlite3 database

Here’s a short guide on how to convert between sqlite2 to sqlite3 database file:

sqlite2 /path/to/mysqlite2.db .dump > backupfile
sqlite3 /path/to/mynewsqlite3.db < backupfile

Using the same method, you can convert sqlite3 db to sqlite2 db too!

p/s: Why you need to convert? because embedded device (read: iPhone and Android) only supports sqlite3 database, while PHP 5 by default supports sqlite2 database.

Thus, this method provide a convenient way to convert between the two different version of sqlite db format.

Recommended Reading

Sun Going to Acquire MySQL for USD 1 Billion

mysql.jpg

I guess you all have heard the news now. Sun Microsystem is going to acquire MySQL AB, the company behind the most popular open source database server, MySQL anytime soon.

After this acquisition, Sun would control the Java platform, JavaME embedded programming platform, SunOS/Solaris operating system, workstations, StarOffice suite, and now MySQL.

Seems appropriate to say “Everything under the Sun” now.