if you need to "do" common operation with the two "sets" (old and new), 
create a table that maps the "larger" (as in "attributes") set and leave 
for the other set the fields not relevant to NULL.
In your case, if "old" table has more columns, just insert the values from 
"new" leaving all the non relevant fields to NULL.

Il giorno mercoledì 18 aprile 2012 00:44:54 UTC+2, leftcase ha scritto:
>
> I'm a new adopter of web2py and I'm trying to learn the framework by 
> building a simple property site. 
>
> I have two types of properties, new or old. 
>
> New properties have a few core attributes, let's say name, price, 
> location, bedrooms 
>
> Old properties have the same core attributes with a few more added on, for 
> instance utilities, land, lease type.
>
> I've tried making a table for new properties and a table for old 
> properties but it seems to complicate things if I for instance want to list 
> all types of properties (new and old) and order by price (I've been 
> struggling to figure out how to aggregate the results from both tables then 
> order by price).
>
> Would it make more sense to have one table with all of the fields for new 
> and old properties and simply create two different forms with different 
> fields exposed depending on whether or not the user wants to create a new 
> or an old property?
>
> Thanks in advance,
>
> Chris
>

Reply via email to