

Ask HN: When to use NoSQL? - ashitvora

There's too much Buzz around NoSQL these days? But I'm still confused when to use NoSQL? Is NoSQL replacement of RDBMS? Or should it be used only in specific scenarios?<p>I've only tried CouchDB and had to write my own Map and Reduce function. Wondering how can it be faster than RDBMS query engine.
======
roder
When your data isn't relational and you're trying to store objects, then NoSQL
is a pretty good choice.

ORM's have always kinda shoehorned objects into the RDBMS data model and the
abstraction isn't always pretty.

With NoSQL, if you're just trying to store some cache or session objects and
you need super high read/write time, NoSQL shines. If you have massive
datasets, like "timeline statuses" and you need to search for the needle in
the haystack, NoSQL (map reduce) shines.

If you're trying to analyze what region of the united states your product
sells best to the 12-18 year old range, then RDBMS is usually the ticket.

~~~
ashitvora
My concern is related to that. We write our own Map Reduce functions and loop
thru all the records (say in millions) in the Database to select the ones we
need. Isn't this (looping thru all the records) costly in terms of time?

I mean in RDBMS, query engine will handle this and optimize the query. In
RDBMS we can even specify the indexes to make search fast but in case of NoSQL
there's no schema so how does NoSQL index the data.

I hardly have any experience with NoSQL so just curious. Would be nice if you
can point me to some link for more detailed intro.

Thanks :)

------
Travis
I'm about to build a feature for my startup that puts a widget on our
customers' websites. The fields on their site need to be customizable by them.
Sure, I could have a regular SQL table with `fieldname` and `value`, but that
table will get crowded quickly.

So I think I'll use the schema-less aspect of NoSQL to try this out. NB: I
haven't played w/ any implementations yet, so if someone out there wants to
persuade me to go a different route, please do so!

