Hello,

I'm transitioning an existing PHP + MySql web application over to
python GAE. It's essentially an inventory management application for a
plant nursery. The relevant mysql tables are basically:

Plant:
plant_id                int(8) PRIMARY KEY autoincrement unsigned
sci_name                varchar(60)
variety         varchar(60)
common_name     varchar(60)
....
description             text
last_modified   timestamp ON_UPDATE_CURRENT_TIMESTAMP


PlantItems:
item_id         int(8) PRIMARY KEY autoincrement UNSINGED
plant_id                int(8) FOREIGN KEY
size                    varchar(10) // something like 1_gallon, 2_gallon, etc
retail_price            decimal(5,2)
wholesale_price decimal(5,2)
quantity                int(5)
last_modified   timestamp ON_UPDATE_CURRENT_TIMESTAMP


So the main issue is that each plant, which has lots of info, has
multiple sizes. There's flats, quart-sized containers, gallon
containers, etc etc. All the plant-related details are the same
between them, but they each have a unique quantity and price. In a
RDMS, I can JOIN on these tables and match up plant_id. I'm trying to
think of something for the DataStore model that will minimized
duplicated code.

I know you can store Lists in a db.Model derived class, but not a list
of tuples. I also though about doing dynamic properties ala
db.Expando, but that didn't seem to gain much.. Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to