I'me developing an iOS chat application and working on the db design for the contacts feature. There are 2 kinds of contacts-
- Unsaved Contacts - Contacts with who you've conversed with, but not saved as a contact
- Saved contacts - Contacts saved by the user. These are synced with the server as well. Saved contacts can fall under different "groups". Whenever the contact list is synced with the server, the local list needs to be updated as well (contacts no longer in the results need to be removed from saved contacts, new contacts need to be saved, etc.)
There's really not much of a difference between #1 and #2 (for now). So I had 2 approaches for the db design- 1. Have just one table for contacts, with an extra boolean column - isMyContact which is true for saved contacts. 2. Have a different table for saved contacts. This just references the other table on a key unique to every contact (an id or a url)
Which approach would be a better design decision? P.S- I'm using Sqlite.