How we use SQL
On the phone, apps use SQLite through Room, SwiftData or Drift. The schema decisions made at version one decide how painful version five will be, so we design tables around real queries, such as all tasks for this week, and write a tested migration for every change.
On the server we work with PostgreSQL, writing queries by hand where performance matters and checking them with EXPLAIN ANALYZE against realistic data volumes. Indexes are added for measured reasons, and migrations are reversible wherever the data allows.
What we build with it
- On-device SQLite schemas for offline apps
- PostgreSQL databases for APIs
- Migrations that keep user data across app versions
- Query and index tuning
Toolkit
- SQLite
- PostgreSQL
- Room
- Flyway
- EXPLAIN ANALYZE
How we keep SQL code healthy
- A migration test for every schema version
- Queries reviewed alongside the code that runs them
- Backups tested by restoring them
- No personal data in test databases
Questions about SQL
What happens to user data when an app updates?
Each schema change ships with a migration that is tested on data from every earlier version.
Do you use an ORM?
On the device, yes, through Room or SwiftData. On the server we often write SQL directly for clarity.