| От | Miles Keaton |
|---|---|
| Тема | Re: brain-teaser with CONSTRAINT - any SQL experts? |
| Дата | |
| Msg-id | 59b2d39b0510092021p776e120bubce1f591a599f0bd@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: brain-teaser with CONSTRAINT - any SQL experts? ("Uwe C. Schroeder" <uwe@oss4u.com>) |
| Список | pgsql-general |
Uwe said: > how about using 2 tables with according unique/primary key constraints and a > view to actually access the data (mixing the 2 tables into one) ? Oliver said: > Create a separate table with the two columns name and isbn which are > that table's primary key; on the main table, create a foreign key to the > new table But my original email said: > > I know it's tempting to say, "just link a separate table for the book > > and don't store the book name" but let's just pretend that's not an > > option For reasons not worth going into, creating a separate table for the code and name is not an option. It has to be a self-contained restriction inside this table. Perhaps there's another way, using triggers or something? Any other ideas?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера