Extendable accessing of sqlite database on android platform

Posted by mscriven on Stack Overflow See other posts from Stack Overflow or by mscriven
Published on 2011-01-10T15:43:34Z Indexed on 2011/01/10 15:54 UTC
Read the original article Hit count: 139

Hi,

I am fairly new to the android sdk and databases and have been searching for an answer to this quite some time.

I am trying to build an app which has multiple tables within a database. e.g. one for weapons, armours etc.

However, my DatabaseManager class which handles all of my table creating, DatabaseHelper inner class and populating of data is creating for an extremely large class requiring high maintenance. Every time I would like to add or remove a table column I need to change quite a few areas of code, - Every reference to the addition of a row in that table with data - The method that the above calls - The method returning all of the database rows - The code in the helper class creating the table - Any specific update methods

My question is this: Surely there must be some better way of coding this system, maybe using a database isn't the best way to go, or am i just not used to such large classes having only learned java at university and my largest class consisting of a mere 400-600 lines of code.

Thanks for any help!

© Stack Overflow or respective owner

Related posts about java

Related posts about android