Android SQLite development

Published April 06, 2011
Advertisement
Spent some time getting to know SQLite a bit better tonight. I have code that reads an xml file and drops the data into a sqlite database. That works fine, but what I needed was to be able to 1. Create the database from the XML prior to distribution (wasteful to send xml with the program only to be written into the db), and 2. install the database during the initial use of the program. Did some digging around online and found some great resources on stackoverflow.com. The main issue I need to work out now is when I want to update the database in the future, meaning add additional tables, I need to be able to do that without blowing away other tables. I think I'll just start with a base db file, say database1, and when I want to update, i'll call it database2. During installation, maybe I can have the software copy database2 onto the device, open it, compare with database1 tables, and copy over any tables not already present, then delete database2.
0 likes 1 comments

Comments

Gaiiden
this entry could have been more notable if the resources you dug up on this topic were shared here as well. Just one of the things I look for when including entries in the weekly roundups on the front page
April 08, 2011 11:54 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement