4 ms·
Composite types can be atomic--a string is a composite type. The point (123, 456) is a composite type but is atomic. Good discussion at https://dba.stackexchan
by sa46 2y ago
Composite types can be atomic--a string is a composite type. The point (123, 456) is a composite type but is atomic.
Good discussion at https://dba.stackexchange.com/questions/2342/what-is-atomic-relation-in-first-normal-form https://dba.stackexchange.com/questions/2342/what-is-atomic-...
- sgarland 2y agoGood point. I’ll also add to my previous comment, that it’s fine to violate normal form if you are aware that you’re doing so, and have a good reason. There are some instances where an array happens to make excellent sense from a performance standpoint, for example, and storing it in RDBMS doesn’t magically make everything explode. I do disagree with people’s tendency to shift towards treating RDBMS as a way to store schema in JSON, though. Not only is it massively unperformant, and indexing it is a pain, but you can quite easily get yourself into situations where there are multiple versions of your schema-within-a-schema, and that can be a nightmare.
- josephg 2y agoI don't think I was clear above. I want embedded objects. I wish there was a more "database-native" way to do it than using JSON, and all the ugliness that JSON brings. (Like dynamic typing, schema-within-a-schema, more complex indexing & querying, etc.) Sounds like something the databases should be able to provide natively, without needing to use JSON at all. (And apparently support for this sort of stuff is slowly improving! Thanks to all the sibling comments for details!)