私は次のリレーショナルスキーマを持っています(たとえば、MySQL、それは本当に私の頭の中にあります):
Login, Customer, Friendship, Address, Child, School
そのような
Login(username, password)
Customer(id, firstName, lastName)
Friendship(customer_id, customer_id) //many to many
Address(customer_id, street, city, state, zip)
Child(id, firstName, lastName, customer_id, school_id)//each customer may have many children
School(id, name, city, state, zip)// there are many children per school
スキーマをGoogleAppEngineハイレプリケーションデータストア(HRD)スキーマとして書き直したい:誰かがそれを行う方法を知っていますか?
これが私が得た限りです:
class Login(db.Model):
username = db.StringProperty()
password = db.StringProperty()
class Customer(db.Model):
first_name = db.StringProperty()
last_name = db.StringProperty()
class Address(db.Model):
# what goes here?
class Friendship(db.Model):
# what goes here?
class Child(db.Model):
# what goes here?
class School(db.Model):
# what goes here?
私はPython2.7を使用しています。