使用Google云端点的Android应用:数据存储区与SQL

时间:2022-08-22 11:15:14

I want to develop a new Android application and I was wondering about the architecture to use. My idea is to host my app on Google App Engine, using the Google Cloud Endpoints as backend. The only problem is that Google Cloud Endpoints use Google Datastore (that is a non-relational database, while I wanted to use a relational one).

我想开发一个新的Android应用程序,我想知道要使用的架构。我的想法是使用Google Cloud Endpoints作为后端在Google App Engine上托管我的应用。唯一的问题是Google Cloud Endpoints使用Google Datastore(这是一个非关系数据库,而我想使用关系数据库)。

So my questions are:

所以我的问题是:

-Is there the possibility to change the logic of Google Cloud Endpoints using Google Cloud SQL ?

- 是否有可能使用Google Cloud SQL更改Google Cloud Endpoints的逻辑?

-If not, is there the possibility to use Google Datastore in a relational way (with references between tables) ?

- 如果没有,是否有可能以关系方式使用Google数据存储区(表格之间的引用)?

Thanks.

谢谢。

1 个解决方案

#1


6  

Is there the possibility to change the logic of Google Cloud Endpoints using Google Cloud SQL ?

是否有可能使用Google Cloud SQL更改Google Cloud Endpoints的逻辑?

Google Cloud Endpoints's purpose is to allow you to develop REST apis for your application. What's inside the implementation of the REST methods is totally your choice. You can call Google Data Store, Google Cloud SQL, call MemCache, call other services, whatever you want. Cloud Endpoints does not force you to use anything. Its main purpose is to handle the communication RESTfully. That's all.

Google Cloud Endpoints的目的是允许您为您的应用程序开发REST api。 REST方法的实现内容完全是您的选择。您可以调用Google数据存储,Google Cloud SQL,调用MemCache,调用其他服务,无论您想要什么。 Cloud Endpoints不会强制您使用任何内容。它的主要目的是RESTful地处理通信。就这样。

If not, is there the possibility to use Google Datastore in a relational way (with references between tables) ?

如果没有,是否有可能以关系方式使用Google数据存储区(表格之间的引用)?

If that's all you want , entity references are managed using Keys in Google Data Store. But That does not make it relational. For example it will not complain if you delete an entity referenced by other entities like RDMSs normally do.

如果这就是您想要的,则使用Google Data Store中的密钥管理实体引用。但这并没有使它成为关系型的。例如,如果您删除其他实体(如RDMS)通常所引用的实体,则不会抱怨。

#1


6  

Is there the possibility to change the logic of Google Cloud Endpoints using Google Cloud SQL ?

是否有可能使用Google Cloud SQL更改Google Cloud Endpoints的逻辑?

Google Cloud Endpoints's purpose is to allow you to develop REST apis for your application. What's inside the implementation of the REST methods is totally your choice. You can call Google Data Store, Google Cloud SQL, call MemCache, call other services, whatever you want. Cloud Endpoints does not force you to use anything. Its main purpose is to handle the communication RESTfully. That's all.

Google Cloud Endpoints的目的是允许您为您的应用程序开发REST api。 REST方法的实现内容完全是您的选择。您可以调用Google数据存储,Google Cloud SQL,调用MemCache,调用其他服务,无论您想要什么。 Cloud Endpoints不会强制您使用任何内容。它的主要目的是RESTful地处理通信。就这样。

If not, is there the possibility to use Google Datastore in a relational way (with references between tables) ?

如果没有,是否有可能以关系方式使用Google数据存储区(表格之间的引用)?

If that's all you want , entity references are managed using Keys in Google Data Store. But That does not make it relational. For example it will not complain if you delete an entity referenced by other entities like RDMSs normally do.

如果这就是您想要的,则使用Google Data Store中的密钥管理实体引用。但这并没有使它成为关系型的。例如,如果您删除其他实体(如RDMS)通常所引用的实体,则不会抱怨。