So you programers and database guys out there can you help me understand the difference between NoSQL and a relational database? When would I want to use a NoSQL database in comparison to MySQL?
I am working on a web app for myself and have been toying with the idea of a NoSQL db but don't really know where those fit in applications. I have talked to some people who made it sound like both a NoSQL db and MySQL db would be needed for some apps.
If you need scalability for large sets and are mainly doing retrieval and append type operations with key/value pairs (ala trendy new "big data" applications) then NoSQL paradigm fits.
If you need fast insert to indexed data, complex join and search criteria and/or any sort of foreign key support then a relational database is what you are looking for. MySQL is an Oracle product via acquisition of Sun via gazillion dollar buyout of the MySQL OSS group and may or may not be that platform. There are many other vendors of sql database products.
What your web app is trying to do will determine what you need (capt obvious says!) and maybe you do need both but more than likely... a regular old RDBMS will be involved.
I've only done SQL databases, but is NoSQL literally just a bunch of key/value pairs?
scardeal wrote:
I've only done SQL databases, but is NoSQL literally just a bunch of key/value pairs?
Not strictly speaking, there are different storage models but they are all very "C data structure-like" in the key/payload sort of way. Think lists, sets and hash tables and you are pretty close.
https://en.wikipedia.org/wiki/NoSQL
It is my opinion based on 25 years in this business that there is nothing new. Just new names and uses for old paradigms. I haven't met a new problem that wasn't an old solution away from being gone in a long time. Scale and speed change dramatically but not much else. You would never know that by the marketing hype though.
In reply to Giant Purple Snorklewacker:
What is an example of an application for NoSQL? I can understand the large data like twitter for an example where there are a lot of messages going on and being shared across a lot of user accounts.
My NoSql experience is limited to Mongo, but here's my 2¢...
I consider NoSql DBs to be interesting toys for programming geeks. There are very few critical applications I would even consider using them for. I would not use one in any case where data integrity or reliable writes were important to me. And I would not try to make one the primary DB with any of today's common web frameworks (Django, Rails, Cake, etc).
I would use one for non-critical PARTS of a web app in a quick data lookup is more important to me than absolute integrity or reliability. For example, if I wanted to track page views -- and I was too stupid to use the Google Analytics API -- that might be a good use for one. If I miss a few, it's no big deal.
For anything mission-critical? No. In my admittedly limited experience, I haven't even seen the much-vaunted scalability compared to a decently optimized Sql DB.
For a web app yourself, no way would I suggest it, unless you just want to geek out on the tech or are feeling a bit masochistic.
+1 for what Tim said...there aren't that many situations where they make sense in place of what SQL is usually used for.