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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:22:17+00:00 2026-05-13T11:22:17+00:00

I’m trying my hand at google appengine and using the datastore with php and

  • 0

I’m trying my hand at google appengine and using the datastore with php and quercus.
I’m not familiar with Java or Python, so lots of learning going on here. I’ve got pages rendering, and i’m able to get data in and out of the datastore.

The app I am building has users, groups, topics and comments.
A group has users, and users can belong to multiple groups.
When a user logs in, I display the groups they are members of, and the topics of those groups.

I’ve got this currently built in MySql, and am now figuring out how to get it into appengine.

The way I see it, a group is a parent which has topics and users as children. Topics have comments as children.

However, I have to get the groups that a user belongs to when the user logs in. Therefore, I was thinking of a separate parent entity which stores the user, contact and login info, and that user would have children containing the group id which each user belongs to, so that I know what groups to fetch.

The users are children of the group so that I can display all the users of a group, but maybe there is a more efficient way to do it.

Like this

Groups(EntityGroup) - GroupName, Owner
↳ Topics - TopicName, Content, Owner
       ↳ Comments - Comment, Owner
↳ Users - userid

Users(EntityGroup) - userName, email, password
↳ userGroup - groupid

Then, when a user logs in, the logic looks like this

SELECT groupid FROM Users where password=hashofpassword+uniqueusername
foreach(groupid as group){
   SELECT users from group;
   SELECT topics from group
   foreach(topicid as topic){
     SELECT comments;
    } 
}

The reason I’m looking at it like this is because when a user logs in, I can’t very well go looking through each group for the user, and I only would want to store the login info in one place.

Please don’t recommend me to the code.google.com documentation, as I’ve gone through that many times already, but am not completely understanding what’s going on with appengine.

also, is the way I’ve outlined above the proper way to visualize the datastore? I think visualizing the data has been a struggle which might be causing some of the challenges.

  • 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-13T11:22:17+00:00Added an answer on May 13, 2026 at 11:22 am

    It looks to me like there is a many-to-many relationship between Users and Groups, yes? A user can belong to many groups, and a Group can have many users who are subscribed to it. The most logical way to represent this is AppEngine to is to give the User entity a ListProperty that holds the Key of the eahc of the groups to which he belongs. In Python, it would look like this:

    class User(db.Model):
        userName = db.StringProperty()
        email = db.EmailProperty()
        password = db.StringProperty() 
        groups = ListProperty(db.Key)
    

    Whenever the User subscribes to the group, you add the Group’s key to the groups list.

    Likewise, the Group entity will have a ListProperty that contains the Keys of each User who belongs to it.

    You wouldn’t want to make the Users children of the Group, as that would make it very difficult or impossible for a User to belong to more than one Group.

    The difficulty that you will have is that when a User joins a group, you will need to update the Group in a Transaction — you can only have one User being added to a Group at a time; otherwise, you have the possibility that one write will overwrite another. Presumably, the User can be updated outside of a transaction, as he or she should only be joining one group at a time.

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

Sidebar

Ask A Question

Stats

  • Questions 288k
  • Answers 288k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The .sln file contains a comment with the version used… May 13, 2026 at 5:25 pm
  • Editorial Team
    Editorial Team added an answer I tried opening the file in both Firefox and Opera.… May 13, 2026 at 5:25 pm
  • Editorial Team
    Editorial Team added an answer Often for such questions, the answer is in the question.… May 13, 2026 at 5:25 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.