Thankks a lot
2012년 6월 15일 금요일 오후 3시 37분 8초 UTC+9, Anthony 님의 말: > > db.define_table('person', >> Field('name'), >> Field('phone'), # ---> [‘000-000-1234’,'001-001-1245', ‘three’, >> ‘banana’] >> Field('email'), # ---> {‘office’: 'y...@gmail.com', ‘home’:' >> n...@yahoo.com'} >> ) >> > > For now, you could do something like: > > db.define_table('person', > Field('name')) > > db.define_table('phone', > Field('person', db.person), > Field('number')) > > db.define_table('email', > Field('person', db.person), > Field('type'), > Field('address')) > > Or to simplify, you could get rid of the 'phone' table and add 'phone' as > a list:string field to the 'person' table: > > db.define_table('person', > Field('name'), > Field('phone', 'list:string')) > > Eventually, you might also get rid of the 'email' table and instead add a > Postgres hstore 'email' field to the 'person' table, but the DAL doesn't > support that yet. Another option might be MongoDB, though again, the DAL > doesn't yet support storing dictionaries within a single field. There are > some other options as well. > > Anthony >