Guided Notes
Working with Data: JSON, SQLite & Databases
Choosing storage, using a database from Node, parameterised queries, connection pooling, ORMs vs query builders, and migrations.
Choosing storage
Slide 1 / 5| Option | Good for | Watch out |
|---|---|---|
| In-memory objects | Demos, caches | Lost on restart; not shared between instances |
| JSON files | Small config, prototypes | Concurrent writes, no queries |
| SQLite | Single-server apps, tools, tests | One writer at a time |
| PostgreSQL / MySQL | Most production apps | Run and back up a server (or use managed) |
| MongoDB | Document-shaped data | Schema discipline still needed |
| Redis | Caching, queues, sessions | Not a primary store by default |
