Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7634789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:16:09+00:00 2026-05-31T07:16:09+00:00

Trying to model some highly connected, but also hierarchical data in app engine. Here

  • 0

Trying to model some highly connected, but also hierarchical data in app engine.

Here is an example:

Person:
    Phone Numbers:
        Number: 555-555-5555, Ext: 123, Notes: Work
        Number: 444-444-4444, Ext: 456, Notes: Mobile

One entity, contained data structures stored as JSON blobs:

One way to do this would be to store the phone_numbers collection as an unindexed blob of JSON text, and then add a search property so that a person could be queried by phone number:

p_entity = Person()

p_entity.phone_numbers = dbText(simplejson.dumps([{'Number':'555-555-5555', 'Ext':'123', 'Notes':'Work'},{'Number':'444-444-4444', Ext:'456', Notes:'Mobile'}]))
p_entity.phone_numbers_search_property = ['5555555555', '4444444444']

p_entity.put()

Multiple entities with parent-child relationships:

Another way would be to use child and parent entities:

person_entity = Person()
person_entity.put()

phone_entity1  = PhoneNumber(parent=person_entity)
phone_entity.Number = '5555555555'
phone_entity.Ext    = '123'
phone_entity.Notes  = 'Work'

phone_entity2  = PhoneNumber(parent=person_entity)
phone_entity.Number = '4444444444'
phone_entity.Ext    = '456'
phone_entity.Notes  = 'Mobile'

A use case:

This is highly connected data. A person object contains multiple phone numbers. But phone calls can also be made to and from those phone numbers. Records of phone calls will also need to refer to these phone numbers.

The purpose of parent-child entity relationships:

After reading over the documentation, I was under the impression that the purpose of parent-child entity relationships was for performing transactions.

However, could they also be appropriate in this case? Is it almost as efficient to pull a parent and all of it’s children out of the datastore as to pull one entity out with its “children” instead stored as JSON text blobs?

Basic question

Is there a normal and accepted way to handle this kind of data in google app engine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:16:11+00:00Added an answer on May 31, 2026 at 7:16 am

    There’s no special bonus for pulling children entities out of the datastore. If you get two entities, the cost is the same whether they’re in the same entity group or not. The only purpose of entity groups in app engine is transactions.

    Should your records of phone calls change when the phone number is changed? My initial thought is that the records should have a separate copy of the phone number data, not a reference to a phone number object. You can still query the call log by phone number. It makes more sense to store a reference to the contacts involved, so that if their name changes or something the call log can be updated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to count daily records for some model, but I would like
I am trying to build an example app in Google App Engine using django-nonrel.
I am trying to move some model code to a module. The original model
I'm trying to figure out a way to serialize some Django model object to
I'm trying to manually manage some geometry (spatial) columns in a rails model. When
I have a very basic model - User I am trying to do some
I'm trying to get a list of some products' model & all models are
I am trying to fill my view model with some drop down options from
I'm trying to set up some database tables and create some model classes for
I am trying to make a before_save in a rails app conditional, but it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.