| От | Louis-David Mitterrand |
|---|---|
| Тема | Re: 'image' table with relationships to different objects |
| Дата | |
| Msg-id | 20100210172942.GA10086@apartia.fr обсуждение исходный текст |
| Ответ на | Re: 'image' table with relationships to different objects (Rob Sargent <robjsargent@gmail.com>) |
| Список | pgsql-sql |
On Tue, Feb 09, 2010 at 08:01:35AM -0700, Rob Sargent wrote: > You can also invert this, making all the image owner share a common base > table and then images are dependent on that base > > base (id, type) where type is an enumeration or some such > person (id, name, etc) where id is FK to base id > locations (id, address, etc) where id is FK to base.id > events(id, date, etc) where id is FK to base.id > images(id, baseid) where baseid is FK to base.id > > views across base to the "data" tables for easier sql if desired > ORM: person location and event would inherit from base This is intriguing. How do I manage the auto-incrementing 'id' serial on children tables 'person', 'location' and 'event'? Thanks, -- http://www.critikart.net
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера