Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Google App Engine

You're reading from   Mastering Google App Engine Build robust and highly scalable web applications with Google App Engine

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784396671
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Summary

In this chapter, we started with the need for data modeling and examined how to model data using the ndb's Model class. Then we dived into how it is stored internally, with all the properties serialized into a single column. Next we examined in detail how datastore constructs unique row keys for an entity by using the application ID, the current namespace, the Kind (the model's class name), and a unique identifier. We also studied how the identifier can be either a string or an integer. In the case it is an integer, we learned that datastore generates numeric IDs, and we can allocate our own range of IDs as well if we want to.

Next we examined the ndb.Key class and how it allows us to weld keys together to achieve some interesting effects. We introduced two approaches to modeling data. The first approach included the key of another entity as its property. The other approach included the key as a part of the entity's key itself. We compared both approaches briefly,...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime