So it sounds like it's possible to do what I want, although if I do
want to do many to many perhaps GAE isn't the best fit. I'm going to
persevere and see if I can get it working, as GAE is very attractive
as a hosting option where I don't have to worry at all about scaling,
server maintenance or any of the usual hosting hassles.

In case it's useful to anyone reading this thread, this video (which
I'm watching at the moment) 
http://www.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html

has a great explanation of the datastore in GAE. It's from 2009 so it
may have changed a bit but the concepts are clearly explained by the
presenter.

Best wishes
Dave


On Aug 17, 1:40 pm, fishwebby <pastelva...@gmail.com> wrote:
> (posting Massimo's reply)
>
> > e.g. 1, "Physics 101", 4|5|6
> > Is that how data has to be modelled using the GAE datastore?
>
> No. On GAE 'list:reference' maps into a ListProperty of integers
>
> > If so, is
> > it possible to do the following:
>
> > - paginate the denormalised data, for example show a paginated list of
> > students on a course?
>
> You cannot. ListProperty does not allow this.
>
> > - have hundreds of IDs in the list:reference field (a course could
> > have hundreds of students) - or is there an upper limit?
>
> If there is it is a GAE limitation. I am not aware of it.
>
>
>
> > Also, how are updates to these fields handled? For example, remove one
> > student from a course that has hundreds enrolled? Are there mechanisms
> > in web2py to handle this?
>
> course = db.course(name='Phsysics 101')
> course.students.remove(4) # remove student with id==4
> course.update_record()
>
> > Also, it would seem that the two list:reference fields would need to
> > be kept synchronised somehow - if a student is deleted, any course
> > that they were enrolled on needs to be updated too, which (with my
> > mind still in relational database mode) would seem to be very
> > inefficient.
>
> I would use a many-2-many with a link table and I would not use GAE
> for this.

Reply via email to