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
OptionGood forWatch out
In-memory objectsDemos, cachesLost on restart; not shared between instances
JSON filesSmall config, prototypesConcurrent writes, no queries
SQLiteSingle-server apps, tools, testsOne writer at a time
PostgreSQL / MySQLMost production appsRun and back up a server (or use managed)
MongoDBDocument-shaped dataSchema discipline still needed
RedisCaching, queues, sessionsNot a primary store by default