After listening to the wonderful things being said about SQLAlchemy at PyCon, I wondered if the following idiom could be implemented as a Domain Object with SQLAlchemy.

Often we have legacy data that we have read only access, to which we need to associate additional meta information. Before this has always meant that the application had to be aware of the relationship of the meta data record in the ExoTagging DB and how to map it to the legacy read-only data. If we could map the two into a single Domain Object it would make are apps a lot cleaner. I spoke to Mark Ramm and he believed that it would be possible and in fact it might even be easy although he hadn’t attempted it before.

I call the idiom ExoTagging because it is logically quite like the idea of Tags, except that tags are kept in a table that resides in a database that is separate from the data that is being tagged. Hence Exo-Tag.

Has anyone else already implemented something like this with SQLAlchemy, if so would you mind sharing your experiences?