What's on my mind

Import .sql file to sqlite

Yesterday , I had a problem. SQLite Manager with firefox 20 can’t import file any more. So, my .sql file that export from MySQL can’t import it. So, only way to use sqlite3 console.

In console , you can use like following

sqlite > .read import.sql

If you don’t want console , you can use following command in terminal

cat import.sql | sqlite3 mysqliteDB.db

Android SQLite preload database over 1 MB

Android only support 1 MB file size for asset. So, we can’t use preloaded database. If we want to use , we need to split database file. You can tutorial from . So, I tweeted about this problem on twitter and I got the reply from Ye Myat Min . Yes, we can use with mp3 file extension instead of .sqlite or .db .


I tried with mydb.mp3 . I can access sqlite database from android. My database have over 200 MB . Need to wait a bit time when installing . It’s good for development. For production , I recommend to use split method. Because split method , compress the file and your apk file size will be small. No compress method , apk file size have over 200 MB. However, I use split method, it only have around 100 MB. So, for production use split instead of .mp3 for no compress.
For , How to use pre loaded sqlite database with android