On 07/05/2011 03:09 PM, Vlad K. wrote:
>
> Hi.
>
> I have a situation where I have X data models, and while each has its
> own properties, they all share a set of fields with common meaning,
> like id, title, description, and some others.
>
> What way would you recommend to approach this problem? If I wasn't
> using SQLAlchemy, I'd have one main table with serial pkey and several
> subtables (not using database inheritance functionality) in one to one
> relation via the pkey. The backend is Postgres.
>
>
> Thanks!

SQLAlchemy can model this via joined table inheritance:
http://www.sqlalchemy.org/docs/orm/inheritance.html#joined-table-inheritance.
You are still responsible for setting up the tables in the way you
described, but SQLAlchemy will take care of the rest.

-Conor

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to