3 ms·
> people who still naively think that Rest/JSON is cool and schemas and databases should be flexible and "NoSQL" is nice and Yes, and no. Yes: REST / JSON is
by adekok 10y ago
> people who still naively think that Rest/JSON is cool and schemas and databases should be flexible and "NoSQL" is nice and
Yes, and no.
Yes: REST / JSON is nice. I've used them widely as a kind of cross-platform compatibility layer. i.e. instead of exposing SQL or something similar, the API is all REST / JSON. That lets everyone use tools they're familiar with, without learning about implementation details.
The REST / JSON system ends up being a thin shim layer over the underlying database. Which is usually SQL.
No: databases should NOT be flexible, and "NoSQL" has a very limited place.
SQL databases should be conservative in what they accept. Once you've inserted crap into the DB, it's hard to fix it.
"NoSQL" solutions are great for situations where you don't care about the data. Using NoSQL as a fast cache means you (mostly) have disk persistence when you need to reboot the server or application. If the data gets lost, you don't care, it's just a cache.
- fail2fail2ban 10y ago> SQL databases should be conservative in what they accept. Once you've inserted crap into the DB, it's hard to fix it. You can make your schema very light and accepting almost like NoSQL which is how you get into the situation you described; the solution is to use stricter schema. That and it helps to hire a full time data engineer/administrator. > Using NoSQL as a fast cache I'd rather use caching technology, specifically designed for caching, like Redis or Varnish or Squid.
- teddyc 10y ago"Once you've inserted crap into the DB, it's hard to fix it." Agreed, it is hard to fix. NoSQL databases can be really hard to fix when they are full of crap, too.