10 Things I Learned Building a Django Backend for a NoSQL Database

March 27, 2026

Spoiler: Django really, really wants you to use PostgreSQL.

1. Django's ORM assumes SQL like fish assume water. Removing that assumption is like teaching a fish to ride a bicycle.

2. The words "IS NULL" mean something completely different in N1QL. So does "IS MISSING." So does "IS VALUED." Yes, these are three different things. No, I don't want to talk about it.

3. Migrations without schemas is like packing for a trip where the destination changes every day. Exciting? Sure. Stable? Absolutely not.

4. UPSERT is the best thing that ever happened to database operations. INSERT or UPDATE? Why choose? Just UPSERT and let the database figure it out.

5. The Django test suite assumes transactions exist. Couchbase laughs in document-oriented.

6. You will write a SQL-to-N1QL translator. It will work for 90% of queries. The other 10% will haunt your dreams.

7. Atomic counters are beautiful until you need to reset them. Then they're a nightmare wearing a tuxedo.

8. Every Django package assumes PostgreSQL. Every. Single. One. They don't say it out loud, but their code screams it.

9. The moment it all works — when Wagtail creates a page, stores it as JSON, and serves it perfectly — you feel like you've invented fire.

10. Would I do it again? In a heartbeat. But I'd bring more coffee.