Embed vs reference in MongoDB: a decision framework
Seven ordered questions that decide embed, reference or a hybrid, the mechanical cost of each choice, and a help desk schema worked through end to end.
#data-modeling#nosql#schema-design
Topic
Seven ordered questions that decide embed, reference or a hybrid, the mechanical cost of each choice, and a help desk schema worked through end to end.
#data-modeling#nosql#schema-design
SQLSTATE 40001 is how serializable isolation stays correct in a distributed database. Add client-side retries, cut contention, and know when READ COMMITTED fits.
#concurrency#transactions#troubleshooting
A session doing nothing can stop VACUUM from cleaning every table and stall your next migration. Find them, kill them safely and prevent them with the right timeouts.
#maintenance#mvcc#transactions
A reference comparison of PostgreSQL and MySQL: storage and MVCC, isolation defaults, DDL, data types, indexes, replication, licensing and tooling, with a decision summary.
#indexing#internals#replication
What WAL mode changes compared with the default rollback journal, what it costs, when not to use it, and how to turn it on, check it and switch back.
#concurrency#configuration#transactions
Error 1205 on a simple UPDATE, from code that doesn't even use transactions. Find the blocking session, spot the missing index that's locking too much and stop it coming back.
#locking#transactions#troubleshooting
A 200 GB .ldf for a 20 GB database? Shrinking only treats the symptom. log_reuse_wait_desc tells you the real cause, and here's how to fix each one.
#maintenance#transactions#troubleshooting
NOLOCK doesn't just risk dirty reads. It can skip rows, count rows twice and fail with error 601. Read Committed Snapshot Isolation removes the blocking without the wrong answers.
#concurrency#locking#transactions
Select-then-insert breaks under concurrency. Use a unique constraint plus one atomic statement: ON CONFLICT, ON DUPLICATE KEY UPDATE, or UPDLOCK/SERIALIZABLE in SQL Server.
#concurrency#schema-design#transactions
What each isolation level protects you from, what it costs, and why so many teams switch on READ_COMMITTED_SNAPSHOT.
#concurrency#locking#transactions