Overview
Simple Manager Mobile uses SQLite for local data storage. The data model is designed to be simple yet flexible, supporting various types of records with optional metadata.Database Schema
Records Table
Therecords table is the primary storage for all record data:
Field Specifications
Primary key for the record. Uses TEXT type to support UUID or other string-based identifiers.
Record title with a maximum length of 50 characters. Cannot be empty or duplicated.
Optional subtitle field for additional context.
Optional field for storing JSON or other structured data as text.
Required field indicating the record type or category.
Optional user identifier for multi-user scenarios.
ISO 8601 timestamp stored as text.
ISO 8601 timestamp stored as text.
Boolean flag stored as INTEGER (0 or 1) for soft delete functionality.
Data Constraints
The data model enforces several important constraints:- Title uniqueness: Record titles cannot be duplicated
- Title length: Maximum 50 characters
- Required fields:
titleandtypemust always have values - Title minimum length: At least 3 characters
- Type minimum length: At least 3 characters
Database Connection
The application uses Expo SQLite for database management:Design Decisions
Why SQLite?
SQLite provides:- Local-first data storage
- No network dependency
- Fast queries
- Built-in support through Expo
Soft Deletes
TheisDeleted flag enables soft deletion, allowing records to be recovered and maintaining data integrity for audit purposes.