I have an app with a simple table stored in a common sqlite database. The app has a mainview and several other views say, view1, view2, ....,viewN. From a mainview, the user go to view1 by this code section:
screen.modalTransitionStyle=UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screen animated:YES];
in view1, the user will access the database, doing something, then update the database, quite view1 back to the mainview:
[self dismissModalViewControllerAnimated:YES];
The user will do the same thing for the other views, i.e., accessing the database, doing something, updating the database, then back to the mainview.
My question is how should I organize the database in my case, using a singleton to create a common object to open the database at the mainview, then all views will access the database, updating it or each view will open the database, accessing it, then update individually or is there any other efficient way. Thank you