gerky
gerky

Reputation: 6417

Why is it called NoSQL?

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!

Upvotes: 2

Views: 3443

Answers (4)

FluffyCheeks
FluffyCheeks

Reputation: 1

I lived through the evolution of this buzzword and here's what I saw:

  • 1990s: Mainstream databases were all using Structured Query Language (SQL) and the relational model. (ie. MySQL, PgSQL, Oracle) These databases increasingly competed for a monolithic kitchen-sink model--one database that could do it all, but required expensive consultation and support packages in order to tune configuration. Drivers were also required as the protocols and serialization formats were often opaque proprietary binary formats.
  • 2000s: Individuals in the open-source community began a counter-culture of small/specific data storage software solutions that managed one specific kind of data exceptionally well. (ie. Redis, AWS S3, Couchbase) In each case, the authors took a first principles approach, reinventing the query language from the ground-up, which was an inevitable reflection of how the data model had also changed in each case. Notably, using SQL was not an option with ANY of these storage solutions. Increasingly, HTTP requests and JSON were becoming the popular query, driver, and serialization mediums. Likewise, data models were moving toward highly customizable user-defined formats including binary structures and unstructured document data.
  • 2010s: Google's MapReduce paper made a splash that gave birth to an entire ecosystem of data storage solutions specializing in Big Data. (ie. MongoDB, Cassandra, Hadoop family, Riak, and Cloud Provider proprietary hosted/managed clones) In many cases, they tried to win market share by bridging the gap for older engineers/customers who only understood SQL, by offering SQL-like query syntax which would be translated/augmented to fit the new formats behind the scenes.
  • At this point Oracle, moves to buy MySQL, and from that point on we witness an irreversible decline and consolidation in the market for classic SQL-based relational databases.

Notice: SQL is a term in reference to a language syntax, not a data model. It's not specifically bound to relational table data (e.g., Hadoop Pig vs. Hadoop Impala)

What I remember: When NoSQL debuted as a buzzword, it truly meant "without structured query language".

What I believe: At some point, Big Corps like Oracle and Microsoft felt pressure to compete with these solutions, by expanding their monolithic solutions to support data models and query languages "in addition to SQL". Therefore their marketing teams moved to co-opt/confuse the terminology to mean "Not only SQL", in an attempt to stay relevant.

But "Not only Structured Query Language" does not make sense, because it has the exact opposite connotation of its original meaning. If we were referring to the family of data storage solutions, including those using SQL, then we are not making any meaningful distinction--that category would include all databases even pre-1990's, yet exclude the modern innovative databases that originally popularized the use of the term in 2000's.

Upvotes: 0

Andrew Orsich
Andrew Orsich

Reputation: 53675

The name "NoSQL" was in fact first used by Carlo Strozzi in 1998 as the name of file-based database he was developing. Ironically it was relational database. Wiki

Here is what famous peoples say about 'nosql':

Eric Evans (rackspace):

"I've spent the last couple of days at nosqleast and one of the hot topics here is the name "nosql". Understandably, there are a lot of people who worry that the name is Bad, that it sends an inappropriate or inaccurate message. While I make no claims to the idea, I do have to accept some blame for what it is now being called. How's that? Johan Oskarsson was organizing the first meetup and asked the question "What's a good name?" on IRC; it was one of 3 or 4 suggestions that I spouted off in the span of like 45 seconds, without thinking.

My regret however isn't about what the name says, it's about what it doesn't. When Johan originally had the idea for the first meetup, he seemed to be thinking Big Data and linearly scalable distributed systems, but the name is so vague that it opened the door to talk submissions for literally anything that stored data, and wasn't an RDBMS."

Martin Fowler:

"Indeed there's often a twist in the name itself: many advocates of NoSQL say that it does not mean a "no" to SQL, rather it means Not Only SQL. On this point I think it's useful to separate an individual database from the kind of ecosystem that NoSQL advocates see as the future. When we say "x is a NoSQL database" I think it's silly to interpret NoSQL as "Not Only" because that would render the term meaningless. (You could then reasonably argue that SQL Server (say) is a NoSQL database.) So I think it's best to say a "NoSQL database" is a "no-sql" database."

Upvotes: 6

Thilo
Thilo

Reputation: 262464

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).

Upvotes: 5

ElderMael
ElderMael

Reputation: 7101

As wikipedia says:

[NoSQL] is a broad class of database management systems identified by non-adherence to the widely used relational database management system model.

That means that it is a database that does not adhere a relational model (the one by Codd) and by consequence it does not use SQL.

Upvotes: 1

Related Questions