

What is NoSQL? - qq66

I've tried to read up on NoSQL because I hear so much about it, but I can't really seem to find a synthesis that uses terminology I can understand. What is a relational data store as opposed to a non-relational data store? What advantages does NoSQL confer and how does it achieve those?
======
jwegan
NoSQL is basically a hash table. They are much faster than relational
databases since hash table lookups are quick O(1). However they don't provide
the ability to query the database like you can in SQL. For example, you cannot
select all the items whose price is > $20 unless you iterate through every
item in the NoSQL store yourself and check if the price is > $20.

So why would you use NoSQL rather than just our own hashtable? NoSQL allows
you to keep a hash table separate from the application server so you can
devote an entire servers RAM to the table to increase performance. It also
allows you to distribute the table across multiple machines to in essence
create a big distributed hashtable. NoSQL is great replacement for any type of
data that you would have previously accessed by doing a "SELECT * FROM table
WHERE primary_key = ?". Furthermore since NoSQL doesn't have to do indexing,
or any of the other overhead associated with a normal relational database it
can be much faster.

~~~
qq66
Thanks. So when they say Facebook messages use NoSQL, how do they show you all
messages WHERE recipient=you if these queries are expensive?

~~~
jwegan
Well cubes says Cassandra isn't purely a key value store and I haven't used it
so I don't know its exact capabilities.

However, to answer your question, what you could do is keep another entry in
the table where the key is the user id and the value is a vector of all the
messages sent to that user id.

------
maxdemarzi
NOSQL stands for Not Only SQL. It is a label that is being applied to data
stores that provide alternatives to the standard SQL based relational
databases.

These alternative data stores can be a better match for the domain model,
volume, and usability of the application data.

------
dstainer
Just to repeat what others have already said. NoSQL is basically any data
store that is not relational. So it describes data stores that are key/value
pair, document, object, graph and column store just to name a few.

Basically a number of these solutions were created to address the scalability
issues that companies faced when trying to scale at extreme levels, think
Facebook and Twitter. Anyway, it's a really interesting topic, at least to me.

Derek

<http://nosqldatabases.com>

------
KERMIT
Well, "Cloud Computing" became pretty widely know. After some people tried to
actually use it seriously, they found out that it's actually quite shitty, and
nothing but marketing blabber. This forced the marketing and hype folks to
find something new to drivel on about. Behold, NoSQL.

