7 ms·
Hey there -- article author here. Thanks for reading. Storing JSON data in a SQL database is possible but not practical. For one thing, it's very difficult to
by ibwhite 17y ago
Hey there -- article author here. Thanks for reading.
Storing JSON data in a SQL database is possible but not practical. For one thing, it's very difficult to query the individual fields within that JSON data. You also can't retrieve a portion of the data, or do atomic updates to individual fields, etc. It's something I've done before and it's just not pleasant.
The schemaless thing is to some degree a matter of taste, yes. What's not a matter of taste, as I mentioned in the article, is when you have to run an alter statement on your huge SQL dataset that takes down your site for hours.
But I don't believe that one size fits all. Some websites will be better off with a RDMS. Mongo's better for us. Again, thanks for reading and commenting.
- cx01 17y ago> For one thing, it's very difficult to query the individual fields within that JSON data. You also can't retrieve a portion of the data, or do atomic updates to individual fields I think this may be possible to some degree using the scripting capabilites of the RDBMS, but I don't know for sure. Even then, I have to agree that in Mongo it is much easier to do because it's built-in. > when you have to run an alter statement on your huge SQL dataset that takes down your site for hours. That's indeed a problem. I wonder if there's a SQL database that allows instant schema changes; I can't see a reason why it shouldn't be possible technically.