I don't have enough "Stack Overflow fu" yet to have found a previous answer to this.
One of my apps has its data in a SQLite database and I've used the Apple SQLiteBooks sample as primary inspiration -- however, SQLiteBooks has only a single table and a single view. I've got multiple (related) tables accessed as distinct views in a tab bar -- e.g. Cookbooks, Recipes, Ingredients, Utensils, etc. Some issues with the sample code:
1) It seems that the sample code initializes too early (in applicationDidFinishLaunching: when I'm leaning towards viewDidLoad:)
2) The static SQL query strings need to be different per class (on the other hand, they generally only differ by the table being accessed, so can I use "?" in the static string and then bind the table ID as needed?)
3) If I follow the lead of TheElements sample code, which uses plists as data store, I seem to spend too much time and memory "pre-building" the data sources of the not-yet-viewed tabs.
Does anyone have pointers to best practices as to how/where to define multiple instances of the single class from the sample while keeping performance high and memory low?