Because the Google Application Engine Datastore is dependant on Bigtable and that we know that isn't a relational database, how can you design a database schema/data model for programs which use this kind of database system?

Creating a bigtable schema is definitely an open process, and essentially requires you to definitely consider:

  • The access designs you'll be using and just how frequently each is going to be used
  • The associations involving the types
  • What indices you will need
  • The write designs you'll be using (to be able to effectively spread load)

GAE's datastore instantly denormalizes your computer data. That's, each index consists of a (mostly) complete copy from the data, and therefore every index adds considerably to time taken to carry out a write, and also the space for storage used.

If the weren't the situation, creating a Datastore schema will be a much more work: You would need to consider the main key for every type, and think about the effect of the decision around the locality of information. For instance, when rendering your blog publish you'd most likely have to display your comments ought to to accompany it, so each comment's key would most likely start with the connected post's key.

With Datastore, this isn't this type of large deal: The query you utilize will appear something similar to "Choose * FROM Comment WHERE publish_id = N." (If you wish to page your comments ought to, you'd in addition have a limit clause, along with a possible suffix of " AND comment_id > last_comment_id".) When you add this type of query, Datastore will build the index for you personally, as well as your reads is going to be like magic fast.

Something to bear in mind is the fact that each additional index produces some additional cost: it's best if you're able to use as couple of access designs as you possibly can, because it will reduce the amount of indices GAE will construct, and therefore the entire storage needed because of your data.

Reading through over this answer, I've found it just a little vague. Perhaps a hands-on design question is needed to scope this lower? :-)

See this, which asks pretty much exactly the same factor.

You should use You build the model and also the application once also it creates GAE but additionally witl SQLite, MySQL, Posgres, Oracle, MSSQL, FireBird

As GAE develops how information is handled in Django there's lots of info regarding how to address similar questions within the Django documentation (for instance see here, scroll lower to 'Your first model').

In a nutshell you design you db model like a regular object model and let GAE straighten out all the object-relational mappings.