I don't know if anyone has tried this kind of thing before. The only idea I have right now is to alias your table objects. This MIGHT work, or might make things worse :) Either way, try this and see if it works (no promises):
db.define_table('person12345',
Field('name'),
)
db.person = db.person12345
db.define_table('dog12345',
Field('name'),
Field('owner', db.person)
)
db.dog = db.dog12345

