- MySQL – INSERT
Putting rows in. Single-row and multi-row INSERT and why the multi-row form is dramatically faster, INSERT ... SELECT, leaving AUTO_INCREMENT and DEFAULT columns out, INSERT IGNORE and what it actually swallows, ON DUPLICATE KEY UPDATE for an upsert, REPLACE and why it is usually the wrong one, and LOAD DATA for a bulk load.
- MongoDB – Why NoSQL, and When Not To
What a document store actually buys you, what it costs, and the four cases where a relational database is still the right answer.
- MySQL – Window Functions
Aggregating without collapsing the rows. OVER (PARTITION BY ... ORDER BY ...), ROW_NUMBER, RANK and DENSE_RANK and the difference ties make, LAG and LEAD for comparing a row to the one before it, running totals with a frame clause, NTILE, and the top-N-per-group problem — which is genuinely awkward without window functions and three lines with them.
- LeetCode 47 – Permutations II
Permutations with duplicates, and the extra line is a different extra line from the one Combination Sum II uses — which catches people who think they already learned this trick. With no start index, used[] is the only signal of depth, so the rule becomes !used[i-1]. All three de-duplication rules compared side by side.
- MySQL – Common Table Expressions (WITH)
WITH, added in MySQL 8, and the reason a long query stops being unreadable. A CTE versus a derived table versus a view, chaining several CTEs so each step is named, referencing one twice, and RECURSIVE — walking a parent-child tree and generating a gap-free date series to report on days that had no orders at all.