Sunday, March 10th, 2024

The only real mistake is the one from which we learn nothing.

— John Powell

Multi tenant indexing

  • columns
    • Entity ID: unique column (to enable foreign keys on this column)
    • Tenant ID: foreign key to tenant table

Strategy 1

  • primary key on (tenant ID, entity ID)
  • unique constraint on entity ID (required for )
  • pros