Re: DDL issue

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: DDL issue
Date: 2024-09-13 12:42:10
Message-ID: be59e730-dc1f-2ecc-202d-ee837cc58f9f@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2024-09-13 13:52:11 Re: Reg: Size difference
Previous Message Rich Shepard 2024-09-13 12:40:49 Re: DDL issue