I have the following relational schema (say MySQL, it's really in my head):
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
I want to rewrite the schema as a Google App Engine High Replication Datastore (HRD) schema: Does anyone know how to do that?
Here is as far as I got:
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?
I am using python 2.7.