Why Google's BigTable referred as a NoSQL database?

给你一囗甜甜゛ 提交于 2019-11-29 15:46:04

问题


From Wikipedia:

Notable production implementations [of NoSQL databases] include Google's BigTable, Amazon's Dynamo and Cassandra.

But Google's BigTable does have some variant of SQL, called GQL.

What am I missing?


回答1:


NoSQL is an umbrella term for all the databases that are different from 'the standard' SQL databases, such as MySQL, Microsoft SQL Server and PostgreSQL.

These 'standard' SQL databases are all relational databases, feature the SQL query language and adhere to the ACID properties. These properties basically boil down to consistency.

A NoSQL database is different because it doesn't support one or more of these key features of the so-called 'SQL databases':

  • Consistency
  • Relational data
  • SQL language

Most of these features go hand in hand.

Consistency

Consistency is where most NoSQL databases differ from SQL databases. You can pull the plug from a SQL database and it will make sure your data is still consistent and uncorrupted. NoSQL databases tend to sacrifice this consistency for better scalability. Google's Bigtable also does this.

Relational data

SQL databases revolve around normalized, relational data. The database ensures that these relations stay valid and consistent, no matter what you throw at it. NoSQL databases usually don't support relations, because they don't support the consistency to enforce these relations. Also, relational data is bad for performance when the data is distributed across several servers.

An exception are graph databases. These are considered NoSQL databases, but do feature relational data. In fact, that's what they're all about!

SQL language

The SQL language was designed especially for relational databases, the so-called 'SQL databases'. Since most NoSQL databases are very different from relational databases, they don't have the need for SQL. Also, some NoSQL databases have features that simply cannot be expressed in SQL, thus requiring a different query language.

Last, but not least, NoSQL is simply a buzzword. It basically means 'anything but the old and trusty MySQL server in the attic', which includes a lot of alternative storage mechanisms. Even a simple text file can be considered a NoSQL solution :)




回答2:


When people say "NoSQL" what they generally mean is "non-relational". To the best of my knowledge BigTable does not feature primary / foreign keys, JOINs, or relational calculus of any type.

The fact that BigTable features a query syntax that includes the words "SELECT" and "WHERE" does not mean it adheres to the principles of relational databases. It's more of a convenience, or a "hook", to make single-entity-type matches more familiar to programmers coming from relational databases.




回答3:


Google's BigTable does have some variant of SQL, called GQL

Well, that is the whole point. They do have a language that is No(t) SQL. Only that is reason enough to be classified apart.

The only thing that you should look in common across al NoSQL databases (graph, document, big table...) is that they do not answer to SQL queries.

Supporting SQL has a huge restriction on how data is organized internally and the algorithms you can use. NoSQL refuse those restrictions to implement alternative algorithms to improve important features that are victims of a full SQL compliance.



来源:https://stackoverflow.com/questions/4255895/why-googles-bigtable-referred-as-a-nosql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!