4 ms·
You've just torn apart most NoSQL databases in a very short comment :-))
by oblio 5y ago
You've just torn apart most NoSQL databases in a very short comment :-))
- LAC-Tech 5y agoYou're familiar with every NoSQL database? Impressive!
- oblio 5y agoThere you go, I've edited my previous comment to account for pedantry.
- LAC-Tech 5y agoI guess I should just accept the term that "NoSQL" now pretty much means "Monngo and Dynamo". Because it feels weird to group key-value stores, columnar stores and graph DBs under one term.
- oblio 5y agoWell, I don't want to be super mean to you or NoSQL, but NoSQL itself was a bit of a fad. Columnar stores and graph DBs have always felt more like "real" tech, something promoted for specific use cases. Key-value stores I'm not even going to be denigrating at all since we've had them since forever and they do a great job at their tasks (BerkeleyDB, Memcache, Redis, etc.). They don't deserve being included into fads or niches, they're a very valuable universal resource. At least that's how I see it.
- LAC-Tech 5y agoYeah but in my mind columnar stores and graph stores are NoSQL databases. Because they're not relational. But the term has shifted underneath me. NoSQL means document database. And - in practice - it means using a document database as the primary store when it's not really the right choice (been there!)
- neuronic 5y agoSo this is just an observation and not a judgment. With only 4 years of professional experience I have never worked on a MongoDB project in which MongoDB somehow wasn't an issue. The proposed solutions merely being "improve the indices" or "scale the cluster", often without clearly defining what's going on. So granted I have a very limited experience, it's baffling to me mainly in comparison to the PostgreSQL projects I worked on. They definitely also had problems but these problems were clearly defined even if resolution wasn't quick or easy. It was usually an out-of-date or generally messy schema that was causing issues and folks usually were able to clearly define the schema problems.
- emptysongglass 5y agoI hear this about MongoDB (that it's a plague and you should stay far away) all the time but DynamoDB, which is also NoSQL? One of AWS' finest products; just launching an app on AWS? Use DynamoDB! So on and so forth ad nauseum. Why is DynamoDB the bee's knees but MongoDB is a thing to be despised?
- oblio 5y ago1. One has a better marketing machine than the other? 2. DynamoDB is pushed in slightly more balanced ways than Mongo was, at the start Mongo was supposed to be the second coming of the (database) Messiah. 3. I don't believe DynamoDB has defaults that lose your data.
- to11mtm 5y agoDynamo seems nice for some very specific use cases, but there are others where it falls short. There's limits on how big your data can be, which is a little annoying if you want to use it to store a couple larger things alongside all your small data. The C# API is absolutely painful IMO, and makes it easy for new developers to use it in a way that you would have been better off grabbing a different technology. I suppose one could argue S3 would be the better choice for large payloads, OTOH I'm a fan of minimizing potential points of failure so if we already are using DynamoDB I'd rather not toss in an additional S3 integration that could break or need maintenance later.
- cle 5y agoNoSQL databases are mostly useful for performance reasons. You can have the most beautifully modeled relational database schema but if it performs/scales outside your tolerance bounds, then it's useless. IMO, this is the main reason we have so many database technologies: they make important performance tradeoffs.
- oblio 5y agoTrue, but you really, really want to be sure that if you're going the NoSQL route, your manual schema management will be top notch or your data structures will be super simple and the query demands will also be super simple. Most of these high performance use cases actually fit this model well (well, the schema management being awesome is the wildly varying part). But for everything else, there's Mastercard and RDBMS.
- cle 5y agoYes, you should think about your domain and requirements, and the technical tradeoffs, before picking a DB technology. Don't just run with RDBMS b/c it has better theoretical modeling capabilities, your customers don't care about that. For enterprise stuff with relatively low traffic and high amounts of complex ad-hoc queries, RDBMS is without a doubt the best choice. If you have high traffic web services with strict availability and latency requirements, I would seriously consider avoiding RDBMS's as they tend to be difficult to operate and scale with those requirements, and they let you easily do terrible things in that context (e.g. locking behavior, txid exhaustion, etc.).
- EMM_386 5y agoIt isn't that difficult to optimize relational SQL databases. I've dealt with databases with billions of rows in hundreds of tables and the company's initial thought was to flatten the schema due to perf. complaints. We got queries down from 30+ seconds to 5 ms simply by properly indexing, defragmentation, analyzing query plans, SQL Stored Procedures, etc. I see a lot of complaints from developers claiming they have to join a "million row table to million row table" and reports are slow, and this gets blamed on the DB. These should not be slow outside of how much bandwidth is being pushed over the wire, which is often exactly what the problem is. They just didn't see it.
- skeeter2020 5y agoDon't worry; for every misuse of a NoSQL database when they should have used a relational DB there's a solution misusing a relational DB for a queue, event bus, etc. Nature likes a balance!
- kreeben 5y agoWould you remind a dumb-wit like myself why that's a problem, when the API of a relational db is virtually perfect for a queue or event bus? Push, pop, look-but-don't-touch, data available through the most scrutinized and battle-tested query language ever, what else do you need?
- bshipp 5y agountil Postgres added JSON fields I would have retorted that nosql is really handy for scraping purposes, when you just want to grab and store the collected data, which you then parse with another specific program into a relational database later. I've learned this by doing it the opposite way for years. however, website schemas can frequently change, which ruins the database schema if you're immediately parsing into a normalized structure. In other words, it's brittle. noSQL (or JSON fields) allow one to store unstructured data which is more forgiving when a schema changes (I.e. change the spelling of a dictionary key, etc.).
- oblio 5y agoWell, technically you could have done this since forever in an RDBMS. Key value table, have the table be a blob (or just varchar if a string). Then yes, you'd have to parse it yourself, but you'd be doing that anyway with JSON fields, more or less.
- bshipp 5y agoIndeed, you are correct. A lot of these lessons came hard-earned from doing it the wrong way first. I thought I was being such a good little programmer by normalizing my data as soon as possible. All it did was provide me job security (at the cost of headaches) every time the schema changed.