I am making a pokemon like game that will utilize SQLite DBs for storage and I’m trying to figure out how to best set it up.
I would like to have three tables:
- One for all the “pokemon” and their stats
- One for all the “pokemon” moves
- One for the player’s “pokemon”
I was thinking of having the app download the DB from my website so that I can add new “pokemon” and update/balance stats, but I want the player’s “pokemon” list to stay the same unless they add/remove them from their teams.
Should I set up a DB with 2 tables for the “pokemon” and moves, and a second DB just for the player’s “pokemon”? And how should I manage downloading/storing the DB? Currently I have it set up to download the sqlite DB to the SD card then have the app create a new SQLite DB passing the file location. What could I do to update the DB after I’ve made changes?
My advice is to change the way the database is being updated.
Instead of downloading the whole database as a file, as that seems to be what you’re doing, a more suitable solution could be to have the application look for updates through a webservice and, if new updates are available, return them as XML / JSON / etc.
Your application could then parse the received data to generate SQL statements that would update the database without affecting current player stats.