google datastore nosql和google bigquery sql之间的实际区别是什么?

时间:2022-06-01 21:36:45

I want to know how to evaluate one tool over another.

我想知道如何评估一种工具而不是另一种工具。

My major concern is as following:

我主要担心如下:

In google datastore, we define 'kind'. Each 'entities' has 'properties'.
Then the datastore backends use those properties to index data for future query. The query itself use almost the same idea in SQL, though different syntax, to filter data and find what we want.
If you index every property, the index metadata would be even bigger than real data.

在Google数据存储区中,我们定义了“种类”。每个“实体”都有“属性”。然后,数据存储区后端使用这些属性来索引数据以供将来查询。查询本身在SQL中使用几乎相同的想法,虽然语法不同,但是过滤数据并找到我们想要的东西。如果索引每个属性,索引元数据甚至会比实际数据更大。

Google bigquery uses it's dialect of SQL. And it's fully managed so users don't have to worry about the scaling problem.

Google bigquery使用它的SQL方言。它完全受管理,因此用户无需担心扩展问题。

So my question is, what's the purpose of using nosql datastore, spending so many computing cycles and storage for indexes so that we could just query it like we naturally could in bigquery SQL database?

所以我的问题是,使用nosql数据存储区的目的是什么,为索引花费如此多的计算周期和存储空间,以便我们可以像在bigquery SQL数据库中那样自然地查询它?

Please share with me your evaluation process. Share with me what's the missing piece in my understandings. Thanks.

请与我分享您的评估过程。与我分享我理解中缺失的内容。谢谢。

1 个解决方案

#1


12  

The two services solve different problems.

这两项服务解决了不同的问题。

Datastore is designed to support transactional workloads, such as the backend for a web application. It's optimized for small transactions that read or write a limited number of rows per operation, with strong consistency guarantees.

数据存储区旨在支持事务性工作负载,例如Web应用程序的后端。它针对每次操作读取或写入有限行数的小事务进行了优化,具有强大的一致性保证。

BigQuery is designed for analytic workloads. It's append-only, and it's optimized for queries that scan/filter/aggregate entire tables of data to get answers out of your data.

BigQuery专为分析工作负载而设计。它仅附加,并且针对扫描/过滤/聚合整个数据表以从数据中获取答案的查询进行了优化。

So the real question is: what problem are you trying to solve? If you're building a web app and need a backend, use Datastore. If you have piles of data that you want to query to get answers about how your business is performing, use BigQuery.

所以真正的问题是:你想解决什么问题?如果您正在构建Web应用程序并需要后端,请使用数据存储区。如果您要查询大量数据以获得有关业务运营情况的答案,请使用BigQuery。

Finally, if you want to do both, you can use Datastore for your app, and then export to BigQuery for analysis: https://cloud.google.com/bigquery/loading-data-cloud-datastore

最后,如果您要同时执行这两项操作,可以将数据存储用于您的应用,然后导出到BigQuery进行分析:https://cloud.google.com/bigquery/loading-data-cloud-datastore

#1


12  

The two services solve different problems.

这两项服务解决了不同的问题。

Datastore is designed to support transactional workloads, such as the backend for a web application. It's optimized for small transactions that read or write a limited number of rows per operation, with strong consistency guarantees.

数据存储区旨在支持事务性工作负载,例如Web应用程序的后端。它针对每次操作读取或写入有限行数的小事务进行了优化,具有强大的一致性保证。

BigQuery is designed for analytic workloads. It's append-only, and it's optimized for queries that scan/filter/aggregate entire tables of data to get answers out of your data.

BigQuery专为分析工作负载而设计。它仅附加,并且针对扫描/过滤/聚合整个数据表以从数据中获取答案的查询进行了优化。

So the real question is: what problem are you trying to solve? If you're building a web app and need a backend, use Datastore. If you have piles of data that you want to query to get answers about how your business is performing, use BigQuery.

所以真正的问题是:你想解决什么问题?如果您正在构建Web应用程序并需要后端,请使用数据存储区。如果您要查询大量数据以获得有关业务运营情况的答案,请使用BigQuery。

Finally, if you want to do both, you can use Datastore for your app, and then export to BigQuery for analysis: https://cloud.google.com/bigquery/loading-data-cloud-datastore

最后,如果您要同时执行这两项操作,可以将数据存储用于您的应用,然后导出到BigQuery进行分析:https://cloud.google.com/bigquery/loading-data-cloud-datastore