views:

2545

answers:

6

I've been hearing things about NoSQL and that it may eventually become the replacement for SQL DB storage methods due to the fact that DB interaction is often a bottle neck for speed on the web.

So I just have a few questions:

  1. What exactly is it?

  2. How does it work?

  3. Why would it be better than using a SQL Database? And how much better is it?

  4. Is the technology too new to start implementing yet or is it worth taking a look into?

+2  A: 

It's like Jacuzzi: both a brand and a generic name. It's not just a specific technology, but rather a specific type of technology, in this case referring to large-scale (often sparse) "databases" like Google's BigTable or CouchDB.

Joel Coehoorn
+6  A: 

I assume you are refering to this meaning of NoSQL.

If I recall correctly, it refers to types of databases that don't neccessarily follow the relational form. Document databases come to mind, databases without a specific structure, and which don't use SQL as a specific query language.

If I am recalling correctly, its generally better in web applications that rely on performance of the database, and don't need more advanced features of Relation Database Engines. For example, a Key->Value store providing a simple query by id interface might be 10-100x faster then the corresponding SQL server implementation, with a lower developer maintenance cost.

One example is this paper for an OLTP Tuple Store, which sacrificed transactions for single threaded processing (no concurrency problem because no concurrency allowed), and kept all data in memory; achieving 10-100x better performance as compared to a similar RDBMS driven system. Basically, it's moving away from the 'One Size Fits All' view of SQL and database systems.

CoderTao
+2  A: 

NoSQL the actual program appears to be a relational database implemented in awk using flat files on the backend. Though they profess, "NoSQL essentially has no arbitrary limits, and can work where other products can't. For example there is no limit on data field size, the number of columns, or file size" , I don't think it is the large scale database of the future.

As Joel says, massively scalable databases like BigTable or HBase, are much more interesting. GQL is the query language associated with BigTable and App Engine. It's largely SQL tweaked to avoid features Google considers bottle-necks (like joins). However, I haven't heard this referred to as "NoSQL" before.

Matthew Flaschen
A: 

As the author of NoSQL I'm pleased to learn that Matthew gave me the due credit by posting a link to NoSQL's Wiki site. I'm really disappointed by learning that mr. Johan Oskarsson, who's behind that newborn "nosql movement", has carefully avoided to mention the original implementation of NoSQL in his posts, events and web pages, in spite of the fact the if one googles for nosql the thruth pops up right away. By doing so, mr. Oskarsson also denies to give due credit to the many who have contributed with creating and evolving NoSQL over the last 15 years or so, and who are dutifully listed on NoSQL's home page. As if that was not enough, some others, who obviusly have never heard of Google, have gone to the point to closely mimic the NoSQL logo, as you may see in this Italian translation of a recent Computerworld article about said "nosql movement". Those folks too, of course, did not give any credits either. And I do not blame you for saying about NoSQL "I don't think it is the large scale database of the future.", because it never indended to be. Thank-you Matthew, I mean it.

Carlo Strozzi
This has nothing to do with the question, a blog post (or somewhere else) would be a more appropriate place for that.
AgileJon
Not entirely true. Albeit I did take the opportunity to get things right, mine was also a reply to Matthew, who I seconded when he said that (the original) NoSQL is not really meant for large-scale databases. But you are also partly right, so I'm going to post a second and more technical post.
Carlo Strozzi
You could have just posted this as a comment to his question if you wanted to thank him. Leave the Answer section for Answers.
Matt
BTW, if you keep downrating my post you may end-up with attracting more attention to it from readers :-) But I quit the debate here, I don't want to take more bandwidth with this. Sorry for having jumped-in.
Carlo Strozzi
Carlo, you're a new SO user that hasn't read the FAQ, hence the downvotes. Answers section belongs to.. answers indeed, and others to comments. Once you have 50 reputation you will be able to leave comments.
Ertugrul Tamer Kara
+6  A: 
  1. What exactly is it?

On one hand, a specific system, but it has also become a generic word for a variety of new data storage backends that do not follow the relational DB model.

  1. How does it work?

Each of the systems labelled with the generic name works differently, but the basic idea is to offer better scalability and performance by using DB models that don't support all the functionality of a generic RDBMS, but still enough functionality to be useful. In a way it's like MySQL, which at one time lacked support for transactions but, exactly because of that, managed to outperform other DB systems. If you could write your app in a way that didn't require transactions, it was great.

  1. Why would it be better than using a SQL Database? And how much better is it?

It would be better when your site needs to scale so massively that the best RDBMS running on the best hardware you can afford and optimized as much as possible simply can't keep up with the load. How much better it is depends on the specific use case (lots of update activity combined with lots of joins is very hard on "traditional" RDBMSs) - could well be a factor of 1000 in extreme cases.

  1. Is the technology too new to start implementing yet or is it worth taking a look into?

Depends mainly on what you're trying to achieve. It's certainly mature enough to use. But few applications really need to scale that massively. For most, a traditional RDBMS is sufficient. However, with internet usage becoming more ubiquitous all the time, it's quite likely that applications that do will become more common (though probably not dominant).

Michael Borgwardt
+3  A: 

Since someone said that my previous post was off-topic, I'll try to compensate :-) NoSQL is not, and never was, intended to be a replacement for more mainstream SQL databases, but a couple of words are in order to get things in the right perspective. At the very hart of the NoSQL philosophy lies the consideration that, possibly for commercial and portability reasons, SQL engines tend to disregard the tremendous power of the UNIX operating system and its derivatives. With a filesystem-based database, you can take immediate advantage of the ever increasing capabilities and power of the underlying operating system, which have been steadily increasing for many years now in accordance with Moore's law. With this approach, many operating-system commands become automatically also "database operators" (think of "ls" "sort", "find" and the other countless UNIX shell utilities). With this in mind, and a bit of creativity, you can indeed devise a filesystem-based database that is able to overcome the limitations of many common SQL engines, at least for specific usage patterns, and this is the whole point behind NoSQL's philosophy the way I see it. I run hundreds of web sites and they all use NoSQL to a greater or lesser extent. In fact, they do not host huge amounts of data, but even if some of them did I could probably think of a creative use of NoSQL and the filesystem, to overcome any bottlenecks. Something that would likely be more difficult with traditional SQL "jails". I urge you to google for "unix", "manis" and "shaffer" to understand what I mean.

Carlo Strozzi