Should there be one SQLiteOpenHelper for each table in the database?

Matteo Bononi 'peorthyr' picture Matteo Bononi 'peorthyr' · Dec 14, 2012 · Viewed 7.5k times · Source

Is it better to have a single big SQLiteOpenHelper subclass that defines onCreate and onUpgrade methods for every table in the database, or is better to have many SQLiteOpenHelper subclasses, one for each table?

Is there a best practice? Or are both acceptable, but with different good and bad side effects?

Answer

MysticMagicϡ picture MysticMagicϡ · Dec 14, 2012

You should have a single SQLiteOpenHelper class for all the tables. Check this link.