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 6474829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:38:01+00:00 2026-05-25T06:38:01+00:00

I am moving from PHP/MySQL to Google App Engine and using JDO as interface

  • 0

I am moving from PHP/MySQL to Google App Engine and using JDO as interface with the datastore. What’s the recommended way of migrating a Modified Preorder Tree Traversal (MPTT) enabled table to a JDO model?

  • 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-25T06:38:02+00:00Added an answer on May 25, 2026 at 6:38 am

    After spending some time searching on the different ways to implement hierarchical data storage on GAE datastore, I decided to try a direct MPTT implementation. The following code snippet presents the model:

    @PersistenceCapable(identityType = IdentityType.APPLICATION)
    public class MPTTObject {
    
        @PrimaryKey
        @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
        @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
        private String encodedKey;
    
        @Persistent
        private String parentEncodedKey;
    
        @Persistent
        private int left;
    
        @Persistent
        private int right;
    

    The solution works pretty well if the datastore operations are read intensive, but it’s quite “heavy” when the operations are write intensive. This fact in combination with the time limitations within which an operation must be completed in GAE, makes this solution less appealing.

    Another approach that seems to be more efficient is to store the full list of parents and children for each node in the hierarchy.

    Some useful links on hierarchical data storage on GAE datastore are the following:

    • Tree structures in a nosql database
    • Recommendations with hierarchical data on non-relational databases?
    • http://groups.google.com/group/google-appengine/browse_thread/thread/c311c8fdde369f18/0554a24ea63bcbeb
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking at moving my company's internal business app from VB.NET to PHP.
Our company is looking at moving authentication from our web app which is PHP
I'm moving from a PHP background into Django development via python, mostly for the
I'm in the process of moving an application from PHP to Java and there
Im moving from django to pylons, is there an admin app?
I'm new to rails after moving from PHP and am having no end to
I'm moving from Globals and Singletons (=bad?) to Dependency Injections (=good?) in PHP and
I am moving from the PHP AJAX library xajax to jQuery AJAX. With xajax,
I am moving some code from SimpleXML to PHP's DOM and don't quite get
I'm moving a PHP site from development to a production server and testing the

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.