Android Database Table export to CSV – Part 1

The best way to export data out of Android Sqlite database is create a copy the DB file into the SDCard.

Copy the Android database into DB File –

Advantages –

  • The import and export of the database would be a lot easy.
  • All tables could be backed up using a single file. ( This can have the backup of the user defined configuration of the program also ).

Disadvantages –

  • We need special tools to read this DB file which makes it difficult to be portable.

Copy a table into CSV file –

Advantages –

  • Only data required by the user can be given.
  • It is the more readable and portable format.

In my application I have decided to have both this methods. Will be updating soon.