4 ms·
> "Schemaless" here just means the default relational mechanisms don't work well for my use case for some reason. Agreed, but you're basically doing things as
by StavrosK 8y ago
> "Schemaless" here just means the default relational mechanisms don't work well for my use case for some reason.
Agreed, but you're basically doing things as they should be done. Not using the schema in a relational database because of valid reasons, still validating the schema, etc. I'm not sure if you're agreeing or if you meant it as a different viewpoint, but it sounds like we agree.
> But some schema always exists, and no matter how you slice it, you can not escape from issues of dealing with schema changes.
This is why I hate it when people say "oh I use MongoDB because I don't want to have to bother with migrations". No, your schema is always going to change, you're just going to migrate things in an ad-hoc manner instead of with a well-thought-out, established process.
- jerf 8y ago"I'm not sure if you're agreeing or if you meant it as a different viewpoint, but it sounds like we agree." Agreement. I was mostly arguing against a ghost argument of my past, where people get dogmatic that schemas must live in the database. I'm much less dogmatic about that. Mostly I just want DRY; the schema should try to live in as few places as possible, preferably one, though that is particularly hard here. But it doesn't bother me too much for the DB to not be any of them; in the past few years I think all my databases have ended up with JSON blobs in them. But by careful choice, and still with some careful design to it, not because "woo hoo, I can just throw whatever I want into these fields!".
- StavrosK 8y agoCompletely agreed, and I love postgres' support for JSON fields, I think it fills an important need. Not everything can be conveniently described with a schema.