Re: DDL issue - Mailing list pgsql-general

From Rich Shepard
Subject Re: DDL issue
Date
Msg-id be59e730-dc1f-2ecc-202d-ee837cc58f9f@appl-ecosys.com
Whole thread Raw
In response to Re: DDL issue  (Tony Shelver <tshelver@gmail.com>)
List 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 by date:

Previous
From: Rich Shepard
Date:
Subject: Re: DDL issue
Next
From: Karsten Hilbert
Date:
Subject: Re: Reg: Size difference