I've recently worked with MongoDB and learned about its schemaless design. However, I'm confused with the term NoSQL? Why is it called that? Doesn't it use SQL or SQL-like queries?
I've also read from an article that the main difference lies in how data is stored. Is this true? In the case of MongoDB, it's stored like JSON documents.
Also, I'm confused why I always see 'NoSQL vs relational databases'. Aren't NoSQL databases relational? I believe documents in MongoDB are still related/linked through some keys (please correct me if I'm wrong). So why is it labeled as non-relational?
Thanks in advance!
Doesn't it use SQL or SQL-like queries?
While "non-relational databases" might be a more accurate name, most of them do in fact not use SQL or something similar.
Aren't NoSQL databases relational? I believe documents in MongoDB are still related/linked through some keys (please correct me if I'm wrong). So why is it labeled as non-relational?
NoSQL databases are non-relational databases.
They come in a variety of flavours (mainly "document databases", "key-value stores", and "graph databases"), but you usually don't get any or all of the following "relational" features:
Defining tables with a schema (named and usually typed columns)
Ability to join multiple tables in a single query
Long-running, isolated transactions of arbitrary scope
Ad-hoc queries that can take a long time, and many ways to index the data to speed them up (as opposed to having to change the whole database layout)
(What you get by giving up some of these handy features is improved performance, availability and scalability).