I'm trying to understand how data storage works in this application.
- How is data stored in the database?
- How is data stored locally on the device?
- If the database connection is unavailable, is the data stored locally? If so, where and how is it synchronized once the connection is restored?
- When the database connection is available, is the data still stored locally (for caching or offline support), or is it written directly to the database?
- Can someone explain the overall data flow for both online and offline scenarios?