4 ms·
Is your app pushing the limits of SQL databases? Is there any reason to look at NoSQL other than the fact that it's 'cool'? Currently all the NoSQL databases
by justinsb 17y ago
Is your app pushing the limits of SQL databases? Is there any reason to look at NoSQL other than the fact that it's 'cool'? Currently all the NoSQL databases are very early adopter products, and each have their own strengths and weaknesses, so you'll have to choose a NoSQL database whose strengths match the area where a SQL database is failing you, and where the weaknesses aren't deal breakers.
Of course I'm biased, and tend to lean towards using SQL/relational databases... FathomDB is all about trying to eliminate the pain points of running a (My)SQL database. I feel a lot of the NoSQL marketing hype is picking on weaknesses of MySQL (rather than relational databases per-se), and so we're thinking about how to make MySQL better, and we don't think it's a good idea to abandon the relational model entirely. After all, our industry started with NoSQL back in the 60s, and there were good reasons for adopting the relational model 30 years ago!
- olalonde 17y agoMy ultimate goal is to increase productivity - I'm getting tired of writing and maintaining all those SQL queries. I felt the driving force behind NoSQL databases was cutting through the pain of SQL, but I can see from other comments that it is not really the case.
- justinsb 17y agoI believe that simplifying querying is a non-goal for NoSQL, in fact most NoSQL databases actually push more of the burden of querying onto you. CouchDB is arguably a bit better here with its concept of views. SQL is incredibly powerful for expressing very complex queries succinctly, and it's pretty difficult to beat. CRUD queries are tedious in SQL or NoSQL, and an ORM or similar abstraction layer definitely helps productivity when programming those bread-and-butter operations.
- olalonde 17y agoThanks, that's exactly the answer I was looking for. For some reason, I was under the impression that simplifying queries was actually a design goal of NoSQL whereas it really is about scalability and performance... right?
- justinsb 17y agoYes - that's my understanding of the goal of NoSQL. As for whether they've achieved it, that's a more complex question :-)
- cperciva 17y agoNoSQL simplifies queries to the extent that it makes complex queries impossible and thereby forces people to design their data structures in such a way as to allow them to do everything they need using only simple queries. :-)
- justinsb 17y agoThat's a great way to look at it. The problem here comes when you want to add a new feature, and you find that your design doesn't allow for the new queries needed. The relational model and data normalization are reasonable at stopping you painting yourself into a corner, and SQL's bulk data manipulation operations can get you out of trouble. With NoSQL, you're on your own, which is great for those that are infallible and omniscient. Ironically enough, I think that means that only Larry Ellison should be using NoSQL, to twist the well known joke.
- richcollins 17y agoHow are complex queries impossible? You could easy write a declarative language for querying graphs.
- simonw 17y ago"I'm getting tired of writing and maintaining all those SQL queries." - learn a good ORM. The Django ORM is a heck of a lot better at writing SQL than I am, especially the kind of queries that make up 95% of a web application.
- olalonde 17y agoThat sentence was for illustration purposes: I was wondering if NoSQL databases acted on the same level as ORMs (and I was apparently wrong). I am very well aware of ORMs (actually wrote my own in PHP: http://www.getdorm.com http://www.getdorm.com).