Re: DDL issue

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: DDL issue
Дата
Msg-id be59e730-dc1f-2ecc-202d-ee837cc58f9f@appl-ecosys.com
обсуждение исходный текст
Ответ на Re: DDL issue  (Tony Shelver <tshelver@gmail.com>)
Список pgsql-general
On Fri, 13 Sep 2024, Tony Shelver wrote:

> Or if you want to get even more flexible, where a dairy could have more
> than one owner as well as one owner having more than one dairy, you could
> create an intersection / relationship table.
>
> Something like
>
> -- Create people table (one entry per person)
> CREATE TABLE people_dairy_map ( pdm_id SERIAL PRIMARY KEY,
> first_name VARCHAR(100),
> last_name VARCHAR(100),
> email VARCHAR(100) UNIQUE );
> phone_number VARCHAR(15),
> person_id INT REFERENCES people(person_id)
> dairy_id INT REFERENCES dairies(dairy_id);

Thanks, Tony.

Regards,

Rich



В списке pgsql-general по дате отправления: