<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>drawDB blog</title>
    <link>https://www.drawdb.app/blog</link>
    <description>Database schema design, data modeling and SQL, from the team behind drawDB.</description>
    <item>
      <title>How to design an idempotency keys table for payment APIs and webhooks</title>
      <link>https://www.drawdb.app/blog/idempotency-key-table</link>
      <guid>https://www.drawdb.app/blog/idempotency-key-table</guid>
      <pubDate>Wed, 04 Nov 2026 00:00:00 GMT</pubDate>
      <description>The idempotency_keys table, the race-free claim, and when a unique column or a processed-events table is enough. Tested SQL, plus what 100 real schemas do.</description>
    </item>
    <item>
      <title>Enum, lookup table or CHECK constraint: how to store a status column in SQL</title>
      <link>https://www.drawdb.app/blog/enum-vs-lookup-table</link>
      <guid>https://www.drawdb.app/blog/enum-vs-lookup-table</guid>
      <pubDate>Tue, 03 Nov 2026 00:00:00 GMT</pubDate>
      <description>567 status columns in our 100-schema gallery, zero native enums. When a CHECK constraint, an ENUM or a lookup table wins, with the DDL for six databases.</description>
    </item>
    <item>
      <title>How to store a user-reorderable list in SQL: integer positions, fractional keys or a linked list</title>
      <link>https://www.drawdb.app/blog/reorderable-list-sql</link>
      <guid>https://www.drawdb.app/blog/reorderable-list-sql</guid>
      <pubDate>Sun, 01 Nov 2026 00:00:00 GMT</pubDate>
      <description>75 hand-ordered lists in our 100-schema gallery, and the three ways they break: tied defaults, decimals that run out after 50 drags, and collation.</description>
    </item>
    <item>
      <title>How do you generate an ER diagram from an existing PostgreSQL or MySQL database?</title>
      <link>https://www.drawdb.app/blog/generate-er-diagram-from-database</link>
      <guid>https://www.drawdb.app/blog/generate-er-diagram-from-database</guid>
      <pubDate>Mon, 26 Oct 2026 00:00:00 GMT</pubDate>
      <description>Four ways to reverse-engineer a live database into an ER diagram, and what came back when we round-tripped 87 schemas through a catalog query.</description>
    </item>
    <item>
      <title>When should you split a table into a one-to-one relationship, and how do you enforce it?</title>
      <link>https://www.drawdb.app/blog/one-to-one-relationship-sql</link>
      <guid>https://www.drawdb.app/blog/one-to-one-relationship-sql</guid>
      <pubDate>Sun, 25 Oct 2026 00:00:00 GMT</pubDate>
      <description>Unique foreign key or shared primary key, which side holds it, NULLs under UNIQUE per dialect, and what 43 one-to-one links in our gallery got wrong.</description>
    </item>
    <item>
      <title>How to store a tree in SQL: adjacency list, materialized path, ltree or closure table</title>
      <link>https://www.drawdb.app/blog/hierarchical-data-sql</link>
      <guid>https://www.drawdb.app/blog/hierarchical-data-sql</guid>
      <pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate>
      <description>Every tree in our 100-schema gallery is a parent_id column. When that is enough, when to add a path or closure table, and the constraints most trees skip.</description>
    </item>
    <item>
      <title>How do you design a double-entry ledger in SQL?</title>
      <link>https://www.drawdb.app/blog/double-entry-ledger-schema</link>
      <guid>https://www.drawdb.app/blog/double-entry-ledger-schema</guid>
      <pubDate>Thu, 22 Oct 2026 00:00:00 GMT</pubDate>
      <description>Accounts, journal entries and postings that sum to zero, enforced by PostgreSQL at commit. Tested on PostgreSQL 16 and MySQL 8, with two gallery schemas.</description>
    </item>
    <item>
      <title>How do you design a many-to-many relationship in SQL?</title>
      <link>https://www.drawdb.app/blog/many-to-many-relationship-sql</link>
      <guid>https://www.drawdb.app/blog/many-to-many-relationship-sql</guid>
      <pubDate>Wed, 21 Oct 2026 00:00:00 GMT</pubDate>
      <description>Composite key or surrogate id, the reverse index most junction tables miss, and what 169 junction tables in our gallery chose. Measured on PostgreSQL 16.</description>
    </item>
    <item>
      <title>Should you store an account balance or calculate it from transactions?</title>
      <link>https://www.drawdb.app/blog/account-balance-vs-ledger</link>
      <guid>https://www.drawdb.app/blog/account-balance-vs-ledger</guid>
      <pubDate>Sun, 18 Oct 2026 00:00:00 GMT</pubDate>
      <description>Append-only ledger plus a cached balance, written in one transaction. Tested on PostgreSQL 16, with how 18 balance-holding schemas in our gallery do it.</description>
    </item>
    <item>
      <title>How to soft delete rows without breaking unique constraints in PostgreSQL, MySQL and SQLite</title>
      <link>https://www.drawdb.app/blog/soft-delete-unique-constraint</link>
      <guid>https://www.drawdb.app/blog/soft-delete-unique-constraint</guid>
      <pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate>
      <description>Partial unique indexes, generated columns and restore conflicts, tested on PostgreSQL 16, MySQL 8 and SQLite, with 32 soft-deleted tables from our gallery.</description>
    </item>
    <item>
      <title>Multi-tenant database design: shared tables, schema per tenant, or database per tenant</title>
      <link>https://www.drawdb.app/blog/multi-tenant-database-design</link>
      <guid>https://www.drawdb.app/blog/multi-tenant-database-design</guid>
      <pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate>
      <description>How to choose a multi-tenant database model, with schema rules measured on real SaaS schemas and PostgreSQL row-level security you can copy and test.</description>
    </item>
    <item>
      <title>Database schema design best practices, measured across 100 schemas and 1,232 tables</title>
      <link>https://www.drawdb.app/blog/database-schema-design-best-practices</link>
      <guid>https://www.drawdb.app/blog/database-schema-design-best-practices</guid>
      <pubDate>Thu, 15 Oct 2026 00:00:00 GMT</pubDate>
      <description>We audited all 1,232 tables in the drawDB schema gallery: primary keys, naming, timestamps, money, ON DELETE rules and foreign key indexes, with fixes.</description>
    </item>
  </channel>
</rss>
