r/csharp • u/Aljosa_Suman_ • 2h ago
How do you plan your database schema for a new backend? Do you design everything upfront or adapt on the go?
Hey everyone,
I'm learning backend development and I always find myself struggling with database design at the beginning of a project.When you need to create a database for a new feature or an entire backend, how do you know exactly which columns you need in your tables?
Do you sit down and map out the entire schema upfront (Entity Relationship Diagrams, DDD aggregates, etc.), or do you figure it out on the go as you code and realize you need to store a new piece of data?
In the Entity Framework Core world, migrations make it very easy to change things later, but I'm curious about the industry best practices. How much planning is "too much planning" before writing code?
Also, what are your best tips for database design? Are there any common pitfalls I should avoid or specific patterns you follow to keep your database flexible but clean?
Would love to hear about your workflow and any advice you can share!
Thanks!


