Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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
like image 474
TimLeung Avatar asked Apr 11 '09 04:04

TimLeung


2 Answers

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.

like image 94
TimLeung Avatar answered Oct 18 '22 03:10

TimLeung


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

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

like image 2
Neil Trodden Avatar answered Oct 18 '22 02:10

Neil Trodden