4 ms·
I see some value in that, but in my experience it's actually the queries that inform much of what the table shema and indexes should look like. Especially when
by kevindamm 1y ago
I see some value in that, but in my experience it's actually the queries that inform much of what the table shema and indexes should look like. Especially when joins and/or ordering are involved, it's the details about what the application wants to extract from the DB that are important, and I'd rather have those details at the code's call site not at the schema definition, because if/when they change or are removed it will be clearer from the context.
- zigzag312 1y agoWhat I'm proposing doesn't change that. It's just to information necessary to keep strongly typed data in sync between the database and dtos. To help with serialization and mapping. Compile time type safety. When querying db for schema you don't get enough information to be able to generate very good code in all cases. Language-first way (define schema in language and generate database schema/migrations) ties you to just one language. And usually these tools don't support using all database features.