Skip site navigation (1) Skip section navigation (2)

Re: Data (Table) Structure Question

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: Data (Table) Structure Question
Date: 2006-11-24 17:40:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
> i have contacts, customers and employees that i want
> to manage in a db application.
> i can think of two ways to do this.
> first, have a table for each and fill each with all
> the relevant data:
> 1. t_custoemrs
> 2. t_employees
> 3. t_contacts
> second, have a contacts table that records data that
> is repeated throughout each table (ie, name, address,
> phone, etc...)
> i could then have a t_employees table with a foreign
> key to the t_contacts table id.  this table would only
> have employee related information and would link back
> to contacts.
> t_customers would do the same - list only customer
> specific information.
> i think the latter way is the way to go, but i'm not
> sure.  i don't particularly like t_contacts as the
> name of the general table.  maybe i need to name it
> persons.
> anyway, i'd value the input of some more experienced
> developers.

Are you trying to find a way to relate an employee to one or more customers?


Richard Broersma Jr.

In response to

pgsql-novice by date

Next:From: operationsengineer1Date: 2006-11-24 19:51:30
Subject: Re: Data (Table) Structure Question
Previous:From: Tom AllisonDate: 2006-11-24 16:42:34
Subject: Re: Triggers and Functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group