Why are NoSQL databases so much faster than SQL databases?

curiouswebster
curiouswebster used Ask the Experts™
on
Why are NoSQL databases so much faster than SQL databases?

I am curious about the steps needed todo something like insert a record for NoSQL versus SQL databases

I have never needed to understand what was under the covers on SQL Server, or any database. So I am curious about what step are simply removed by NoSQL

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
"Faster" is relative.  How are you defining it?  I'm guessing you've read a paper somewhere.  Can we see it?
curiouswebsterSoftware Engineer

Author

Commented:
Well, you tell me. I am newbieweb ;)

I thought the big advantage of a NoSQL database was that it stored data in JSON format, which meant there was no conversion to a tabular structure, which is filled with validations and potential data mis-matches, all of which take clock cycles.

I assume there are ways to write to a SQL database, like when you get a block of data and the rows are already in the clustered sequence in which they are stored in the database.

So, I am just asking about what steps are needed for a SQL DB that are not needed for a NoSQL database, and why NoSQL is sometimes considered the best choices for super high transaction volume.
Most Valuable Expert 2011
Top Expert 2012
Commented:
I wouldn't say "relative" but rather "conditional".

The conditions are quite simple.  If you use a nosql database as intended it's fast.
If you use a nosql database improperly it won't be fast.

If you use a relational db properly it's fast.
If you use it improperly it won't be fast.

That's the general conclusion, and true, but probably not very helpful.  It should be trivially obvious.

So, a specific case - scaling.  With nosql you can scale horizontally.  This means you can divide your data physically and process different portions completely independently.  A good example - sum all sales by customer and month.  If you have your data striped by month.  Each machine can process one month's values for each customer.  Then it's just a quick set of 12 additions to put them together.

With a relational db, you usually scale vertically meaning you buy a bigger computer but then that still means your processing competes with itself.  There are exceptions.  Oracle has sharding.  DB2 has db partitioning.  It's not quite the same thing but does allow for a similar type of processing.

So that's a case where a nosql db might be faster.

With relational databases, joins are much easier.  They're built for it.  Nosql generally aren't.   It might still be possible, but it's not what they are designed to do.
curiouswebsterSoftware Engineer

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial