简体   繁体   English

Google App Engine:为具有SQL背景的人员介绍他们的Data Store API?

[英]Google App Engine: Intro to their Data Store API for people with SQL Background?

Does anyone have any good information aside from the Google App Engine docs provided by Google that gives a good overview for people with MS SQL background to porting their knowledge and using Google App Engine Data Store API effectively. 除了Google提供的Google App Engine文档之外,是否有任何人可以获得任何有用的信息,这些文档可以为具有MS SQL背景的人提供良好的概述,以便有效地移植他们的知识并使用Google App Engine数据存储API。

For Example, if you have a self created Users Table and a Message Table 例如,如果您有自己创建的用户表和消息表

Where there is a relationship between Users and Message (connected by the UserID), how would this structure be represented in Google App Engine? 如果用户和消息之间存在关联(通过UserID连接),那么在Google App Engine中如何表示此结构?

SELECT * FROM Users INNER JOIN Message ON Users.ID = Message.UserID

Here is a good link: One to Many Join using Google App Engine. 这是一个很好的链接:一对多加入使用Google App Engine。

http://blog.arbingersys.com/2008/04/google-app-engine-one-to-many-join.html http://blog.arbingersys.com/2008/04/google-app-engine-one-to-many-join.html

Here is another good link: Many to Many Join using Google App Engine: 这是另一个很好的链接:多对多加入使用Google App Engine:

http://blog.arbingersys.com/2008/04/google-app-engine-many-to-many-join.html http://blog.arbingersys.com/2008/04/google-app-engine-many-to-many-join.html

Here is a good discussion regarding the above two links: 以下是关于以上两个链接的良好讨论:

http://groups.google.com/group/google-appengine/browse_thread/thread/e9464ceb131c726f/6aeae1e390038592?pli=1 http://groups.google.com/group/google-appengine/browse_thread/thread/e9464ceb131c726f/6aeae1e390038592?pli=1

Personally I find this comment in the discussion very informative about the Google App Engine Data Store: 就个人而言,我在讨论中发现此评论非常有关Google App Engine数据存储的信息:

http://groups.google.com/group/google-appengine/msg/ee3bd373bd31e2c7 http://groups.google.com/group/google-appengine/msg/ee3bd373bd31e2c7

At scale you wind up doing a bunch of things that seem wrong, but that are required by the numbers we are running. 在规模上你最终会做一些看似错误的事情,但这是我们正在运行的数字所要求的。 Go watch the EBay talks. 去观看eBay会谈。 Or read the posts about how many database instances FaceBook is running. 或者阅读有关FaceBook正在运行的数据库实例数的帖子。

The simple truth is, what we learned about in uni was great for the business automation apps of small to medium enterprise applications, where the load was predictable, and there was money enough to buy the server required to handle the load of 50 people doing data entry into an accounts or business planning and control app.... 简单的事实是,我们在uni中学到的东西对于中小型企业应用程序的业务自动化应用程序非常有用,这些应用程序的负载是可预测的,并且有足够的资金购买处理50人负载数据所需的服务器进入帐户或业务规划和控制应用....

Searched around a bit more and came across this Google Doc Article: 搜索了一下,并发现了这篇Google Doc文章:

http://code.google.com/appengine/articles/modeling.html http://code.google.com/appengine/articles/modeling.html

App Engine allows the creation of easy to use relationships between datastore entities which can represent real-world things and ideas. App Engine允许在数据存储实体之间创建易于使用的关系,这些关系可以代表现实世界的事物和想法。 Use ReferenceProperty when you need to associate an arbitrary number of repeated types of information with a single entity. 当您需要将任意数量的重复信息类型与单个实体相关联时,请使用ReferenceProperty。 Use key-lists when you need to allow lots of different objects to share other instances between each other. 当您需要允许许多不同的对象在彼此之间共享其他实例时,请使用键列表。 You will find that these two approaches will provide you with most of what you need to create the model behind great applications. 您会发现这两种方法将为您提供在大型应用程序背后创建模型所需的大部分内容。

Can I supplement the excellent answer further above with a link to a video: 我可以通过视频链接补充上面的优秀答案:

http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine

It's a great talk by Google's Brett Slatkin who talks for an hour about the special way you need to think about your application before you can expect it to scale well. 这是Google的Brett Slatkin的一次精彩演讲,他谈了一个小时关于你需要考虑你的应用程序的特殊方式,然后才能期望它能够很好地扩展。 There are some genuine WTFs (such as no count() in db queries) that will cause you to struggle if you are coming from a relational background. 有一些真正的WTF(例如db查询中没有count())如果你来自关系背景,会导致你挣扎。

I think this is the basics : Keys and Entity Groups look for it in appengine docs. 我认为这是基础知识:密钥和实体组在appengine docs中查找它。 (I'm new here so can't post a link) (我是新来的,所以无法发布链接)

These links are great, but are predominantly python biased, I am using GWT, and therefore have to use the java flavour of GAE, does anyone have any examples of how to achieve these "join" equivalencies in the java version of GAE? 这些链接很好,但主要是python偏向,我使用GWT,因此必须使用GAE的java风格,有没有人有任何如何在Java版本的GAE中实现这些“加入”等效的例子?

Cheers, John 干杯,约翰

The standalone GAE SDK is pretty difficult to use for putting data into and retrieving data from the Google App Engine data store. 独立的GAE SDK很难用于将数据放入Google App Engine数据存储并从中检索数据。

"Objectify" is a GAE extension that makes these operations much easier. “Objectify”是GAE扩展,使这些操作更容易。 The Objectify wiki and source code can be found here. Objectify维基和源代码可以在这里找到。 I strongly recommend using Objectify in your GAE project. 我强烈建议您在GAE项目中使用Objectify。

http://code.google.com/p/objectify-appengine/ http://code.google.com/p/objectify-appengine/

Here are a couple of tutorials on using Objectify with the app engine. 这里有一些使用Objectify和app引擎的教程。 Follow these tutorials and you will be storing and retrieving data in no time. 按照这些教程,您将立即存储和检索数据。

http://www.fishbonecloud.com/2010/11/use-objectify-to-store-data-in-google.html http://www.fishbonecloud.com/2010/11/use-objectify-to-store-data-in-google.html

I have worked on it but not a expert though Google app engine is very good thing and it is the future as it implements Platform as a Service and Software as a Service. 虽然谷歌应用程序引擎是非常好的事情,但它是未来,因为它实现了平台即服务和软件即服务。 Google app engine provides a non- relational database. Google应用引擎提供非关系数据库。 So you cantreally write relationships here. 所以你在这里写下关系。

Regards, Gaurav J 此致,Gaurav J.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM