Using Snowflakes for database IDs | Matteo Contrini
matteosonoio.it · 1,534 words · saved by 1 readers
A practical example of using Snowflake for database keys without a centralized service, with .NET and Entity Framework Core.
Table of Contents Snowflakes in .NET Generating a unique instance ID Value generators vs manual generation When designing a database, the most common choice for primary keys and IDs has historically been auto-incrementing numeric values . There are several reasons why you may want to avoid that strategy: for example, avoiding leaking records count information (and the rate of new records) when IDs are exposed in URLs, avoiding the penalty of locks for generating the next number, or supporting distributed systems scenarios. Alternative solutions involve masquerading IDs (e.g. with Sqids ), usin
related reading
- On Idempotency Keys - Gunnar Morlingmorling.dev
- Databases in 2024: A Year in Review // Blog // Andy Pavlo - Carnegie Mellon Universitycs.cmu.edu
- homepages.cwi.nl/~boncz/lsde/papers/p215-dageville-snowflake.pdfhomepages.cwi.nl
- Why We Don’t Trust the Database With Authentication – Sturdy Statisticsblog.sturdystatistics.com
- The Beginner's Guide to Databasestechnically.substack.com
- Databases in 2025: A Year in Review // Blog // Andy Pavlo - Carnegie Mellon Universitycs.cmu.edu
- Snowflake key concepts and architecture | Snowflake Documentationdocs.snowflake.com
- A guide to threat hunting and monitoring in Snowflake | Datadog Security Labssecuritylabs.datadoghq.com
- Snowflake Defrosts The Data-Intensive Applicationforbes.com
- Snowflake S-1 & IPO Teardownblog.publiccomps.com
- A More Human Approach To Databasesccorcos.github.io
- The Problem with Using a UUID Primary Key in MySQL — PlanetScaleplanetscale.com