| От | Thomas |
|---|---|
| Тема | How to tell PostgreSQL about a relationship |
| Дата | |
| Msg-id | 55da14450810260244nb03c79drb5bf64274fb02c97@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: How to tell PostgreSQL about a relationship
Re: How to tell PostgreSQL about a relationship |
| Список | pgsql-general |
Hi, I have jumped from MySQL to PostgreSQL, and I wanted to know how we declare that a table depends on another one. Currently I have 3 tables: Product(id, title, price) Item(id, product_id, order_id, quantity) Order(id, amount, paid) In pgAdmin I have removed a few order entries, but the items associated to them are still here, now I have zombie items floating around that don't belong to any order. So how do I tell PgSQL that when I remove a given order, it should remove all associated items also? Best regards,
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера