I'll give you a simple example.
class a(osv.osv):
_name = 'a'
_columns = {
'f1': fields.many2one('b', 'Creates new column "f1" in "a" table'),
'f2': fields.one2many('b', 'xxx', 'Creates new column "xxx" in "b" table'),
'f3': fields.many2many('b', 'aaa', 'a_id', 'b_id', 'Creates new table "aaa" with column "a_id" related to "a" object and column "b_id" related to "b" object'),
}
a()
class b(osv.osv):
_name = 'b'
b()
You can always look on your database and compare it with code if my example wasn't clear.