public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: DDL issue
Date: Fri, 13 Sep 2024 05:42:10 -0700 (PDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAG0dhZDFYNzCSvAgs3rTmnarXJrR38SLMRb96kq_0k+zam9ZjA@mail.gmail.com>
References: <[email protected]>
<CAPnRvGt_=bWgTKaZSaK=K_TXJYHQ3oOJckvzUByfotCuGoMNzw@mail.gmail.com>
<CAG0dhZDFYNzCSvAgs3rTmnarXJrR38SLMRb96kq_0k+zam9ZjA@mail.gmail.com>
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
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: DDL issue
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox