What are the best practices for implementing local database storage such as CoreData, SQLite, or Realm?