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

TimLeung picture TimLeung · Apr 11, 2009 · Viewed 6.9k times · Source

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.

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?

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

Answer

TimLeung picture TimLeung · Apr 11, 2009

Here is a good link: One to Many Join using Google App Engine.

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:

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

Personally I find this comment in the discussion very informative about the Google App Engine Data Store:

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. Or read the posts about how many database instances FaceBook is running.

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

Searched around a bit more and came across this Google Doc Article:

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. Use ReferenceProperty when you need to associate an arbitrary number of repeated types of information with a single entity. 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.