New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
10 recipes Β· 68 steps Β· about 64 minutes of reading
Python classes for my data, but no tables yet, and no safe way to change them later.
My orders and products already connect fine through a plain many-to-many table, but the business also needs the quantity and the price recorded for every single line in an order.
My endpoint returns a list of orders with their customers, and it works, but the database log shows one extra query per order.
One call creates the order, another adds its line items. If the second one fails, the order is left half-made.
Some of my ORM queries have five joins and take forever to write. Should I just hand-write the SQL instead?
I need to delete a record but keep it for compliance. Will a naive is_deleted flag come back to bite me later?
My API returns a 500 the moment it tries to read a relationship, but only sometimes, and the trace points at code that never touches the database.
Works fine in dev. Under real load, timeouts start, all blaming a connection pool that's out of connections.
My CSV import inserts rows one at a time. It works fine on my laptop, but on the real dataset it's still crawling twenty minutes in.
Adding a NOT NULL column to a table that's already full and read constantly, without taking the site down.
Cookbook badge
Finish all 10 recipes to earn this.