This sounds good for using ReferenceProperty, which is part of the Datastore API for App Engine. Here is an idea to get you started:
class Satellite(db.Model): name = db.StringProperty() class Channel(db.Model): satellite = db.ReferenceProperty(Satellite, collection_name='channels') freq = db.StringProperty()
With this, you can assign these channels:
my_sat = Satellite(name='SatCOM1') my_sat.put() Channel(satellite=my_sat,freq='28.1200Hz').put() ... #Add other channels ...
Then skip the channels for this Satellite object:
for chan in my_sat.channels: print 'Channel frequency: %s' % (chan.freq)
In any case, this largely follows in this article , which describes how to model entity relationships in App Engine. Hope this helps.
source share