public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: DDL issue
Date: Fri, 13 Sep 2024 05:38:30 -0700 (PDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Thu, 12 Sep 2024, Adrian Klaver wrote:

> Quick and dirty:
>
> people_table
>   person_id  PK
>   name_last
>   name_first
>   email_address
>   ph_number
>   ...
>
> location_table
>   loc_id   PK
>   person_id_fk FK <--> people_table(person_id)
>   loc_name
>   loc_st_addr
>   loc_st_city
>   loc_st_st_prov
>   ...
>
> contact_table
>   contact_id  PK
>   loc_id_fk   FK <--> location_table(loc_id)
>   contact_ph_number
>   contact_email  --Can be null
>
> It can get more involved then this, depends on how flexible you want to get.

Adrian,

There are many companies with multiple locations, but few owners with
multiple companies, each with a different location. David's reminder about
many-to-many tables will do the job.

Thanks,

Rich






view thread (4+ messages)  latest in thread

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