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

  • SEARCH
  • Home
  • 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.
I'm in the process of moving an application from PHP to Java and there
I'm considering moving from PHP to Python (for personal projects), and I really don't
I am moving a site from normal php to wordpress and currently they use
We are moving our server to a new server, and going from PHP 4.x
My team is moving from Visual SourceSafe to Subversion soon, while developing/supporting a legacy
We're looking at moving from a check-out/edit/check-in style of version control system to Subversion,
I am moving from classic ASP to ASP.NET and have encountered what many of
We are looking at moving from Visual Studio 2008 Professional to Visual Studio Team
We are moving from regular 2.0 webforms with no testing to TDD MVC I'm

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.