NoSQL – Back to the Future or Yet Another DB Feature?
speakerdeck.com
speakerdeck.com
It is literally equivalent to the NoSQL "we don't do joins" algorithm problem. Unlike most NoSQL databases, the basic operation of a graph database is built on join algorithms (edge traversal is a relational join). If you figure out how to parallelize ad hoc joins on large clusters then graph databases become a viable solution for non-trivial databases.
0: http://cs-www.cs.yale.edu/homes/dna/papers/calvin-sigmod12.p...
what they describe there basically is the current state of affairs: different database technology for different purposes (in-memory, hierarchical and journal). I love the paper for it shows how things do actually not change.
At the end of the day, both have important roles to play and, in many respects, compliment each other.
http://news.ycombinator.com/item?id=3202081
http://news.ycombinator.com/item?id=3982142
http://news.ycombinator.com/item?id=3954596
Real databases have real features like transactions, and guaranteed writes to disk, and not retarded security. Crazy shit like a commonly-used query language and tool support.
If they aren't "prime time" I don't know what is.
E.g. Google App Engine's GQL, Facebook's FQL and Yahoo YQL not to mention Hive all have a very SQL like syntax. So what about all this is NoSQL ? SELECT, WHERE and FROM are OK in a NoSQL database?
Dig further and you'll find that these are all "No-Join" data bases and it's the badly scaling cost of the Join operation that gave SQL a bad name and the NoSQL community a bad category name.
Bottom line there needs to be a unifying formalism to talk about NoSQL as a category. Which ("Tada Boom!") gives me a seque and a pun to refer to a paper published in the IEEE about using Category Theory to describe NoSQL.
I will critique it elsewhere, but suffice it to say that if I have to do a PhD in Pure Math to design a database it's a non-starter. (Aside I have a "PhD" in Pure Math - everything but thesis)
So anyhoo bottom line - Missing: a formal framework to reason about databases that don't use SQL or Joins.
Without that it is not even possible to decide what is the membership criterion for something to be called NoSQL, especially when NoSQL is defined as "Not Only SQL" = SQL UNION ~SQL = the whole Fing universe.
So NoSQL is a label that has no ability to make logical distinctions. And NoSQL as a grab bag of technologies has no formal way to reason about it.
To make any sense this needs to be fixed, before any arguments about this are even worth having.
[My creds: 20+ years in the DB world as developer, architect, instructor; including 4+ yrs in the NoSQL business, including one year as emp #2 and VP of BizDev at CouchOne, and including lead developer of a project that used CouchDB in an National Science Foundation funded project back in 2008/2009 (slashdotted and survived) and currently using Couch, Mongo, NodeJS in various projects]
It's historically inaccurate to state we went from file-based databases to relational ones and are now slipping back to file-based ones.
Rather, both the relational and non-relational DB worlds have taken many ideas from the post-relational world (even if not intentionally.)
The SQL/NoSQL + ORM + MVC stack of today is much closer to what postrelational DB's were like rather than what SQL apps were like back in the day. Every generation thinks they invented sex, and high level database programming...
Moreover, NoSQL does not equal NoSQL—there're so huge differences between a Mongo, a Riak and a Couch. And there's much more than that beyond SQL (graph based DB etc.).
What matters: The experience.
I used MongoDB with Node one or two weeks ago for this first time and I was really impressed when I got it. There are many uses case where I wouldn't employ NoSQL or Mongo but there're as many where I would go w/ Mongo when usually relied on SQL.
Why: working completely without schemes and even migrations is awesome. Just save a record in Node/Mongo with the native interface and the system is setting up the respective table and even DB in the same moment if not existant. Schemeless is not always the way to go but if you want to prototype or to get quickly out of the door, it's an mind-blowing experience (and it's enough for many web projects). And with the JS interface it's just incredible and totally different to other NoSQL counterparts.
NoSQL is about choice. Period.
edit: 'the ability to'
Say I have a domain model that involves a primary object e.g. User with lots of maps and arrays then how is SQL going to be better then ? Lots of tables and joins better than a single document. I think not.
For a lot applications/use cases, schema free get/put/delete is a lot more concise than any SQL concoctions. Besides, using RDBMS/SQL to store/retrieve complex graph is neither beautiful or concise.
Just because you can use your Swiss army knife to kill a few roaches doesn't mean you should.
Relational databases and sql should be considered the pride and joy of computer science AND software engineering (with logic and math being the grand parents in this increasingly confused and mixed metaphor).
Politically, yes. SQL/relational wins the popularity contest. But so what?
Technically, no, it's not the center. It's merely the most popular, for the time being. This is a temporary state of affairs.
However, relational databases provide unprecedented ability to query information. Imagine one person puts data into a black box. 100 other people can ask it questions which were never intended by the original designer, and the system is able to answer those questions fairly efficiently.
The language used to query is orders of magnitude simpler than 'normal' programming languages.
If you query your database and the answer takes too long, you can add an index and the exact same query will start running more quickly!
Two different people can create two different tables. A third person can come in and 'join' these two tables.
I see nosql being a low level technology, higher than blocks/files/b-trees but lower than relational databases. Another way to say it is that relational algebra is the theoretical model while large parts of modern nosql tools are implementation details.
Not that most RDBMS conform to the relational theory 100% (or even 90%), but everything else is mere re-invention of the wheel badly.
As in: "Hey, let's trade ACID, security, uniform access to data by all apps" for cheap speed and ill-thought developer convenience.
No. RDF is formally proven via its Model Theory (as was KIF before it). That's arguably a stronger basis that relational "algebra"
Someone led you down the garden path.
There is absolutely no proof that RDBMS is objectively correct in any meaningful sense whatsoever. Did someone invent an arbitrary standard to measure it by, and then prove that it met that standard? Sure. But that's a far cry from a claim that RDBMS's are somehow "formally proven." That's just pure mathematical silliness and marketing propaganda.
Actually it's both technically AND scientifically.
Relational algebra is MATH describing the properties of relational data (that is, all kinds of data one would ever care to use), based on set theory.
All the other ways are just ad-hoc BS non-solutions, that happen to have this or that property because they forgot the tradeoffs.
It's irrelevant that you can concoct an arbitrary mathematical theory and then create a system to match. You must also prove that that theory is the most relevant and important way of looking at the data for the given problem at hand. RDBMS theory doesn't even bother trying to worry about the real world.
They only way to do this is if you have an ad-hoc faulty theory.