Hi Robin,

Thanks for the explanation. But I still couldnt quite get it right. This is
what I have.

For example in case of cricket match,

   1. Each match has many teams(say 2)
   2. Each team has many players
   3. Each Player belongs to many teams

So we have many-to-many relationship between match & team, team & player

If I can use ListProperty, I can define them as

db.define_table("Match",
      SQLField("Team_ids", "*list_of_integers*"),
      SQLField("ground", "string"),
      SQLField("result", "string"))

db.define_table("Team",
      SQLField("name", "string"),
      SQLField("player_ids", "*list_of_integers*"),
      SQLField("Match_ids", "*list_of_integers*"))

db.define_table("Player",
      SQLField("name", "string"),
      SQLField("Team_ids", "*list_of_integers*"))

db.Team.Match_ids.requires=IS_IN_DB(db, 'Match.id')
db.Player.Team_ids.requires=IS_IN_DB(db, 'Team.id')

If I have to do the same in relational db way, i have to,

   1. create a join table Match_Team & define a HABTM between match & team
   2. create a join table Player_Team with HABTM again.

Although the second approach works perfectly in relational db, I am
wondering is this the right way to represent the data in a Flat database
like BigTable.

Portability is not an issue for me. But I would like to make use of app
engine to full extent.

Sorry for my ignorance. I m learning all three(python, gae & web2py) at the
same time ;)
Sudhakar.M
A mind once stretched by a new idea never regains its original dimension. -
Oliver Wendell Holmes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to