Re: some design questions
Date: 2000/06/23
Message-ID: <8ivrmi$iaa$1_at_bob.news.rcn.net>#1/1
You need three tables:
Customer, Contacts, Warehouses
Customer_ID is in each table.
If you need to know which contact is in which warehouse, then put Warehouse
ID in the Contacts Table, or use the next method:
If a contact can be at more than one warehouse, then you need a m:n
connecting table:
Contacts_Warehouses
which contains the Contact_ID and the Warehouse_ID
If contacts can move around from one customer to another, then you need another m:n connecting table (this scenario is rather unlikely, I suspect.
Steven Tolleneer wrote in message
<395359ba$0$12838_at_bru5-newsr1.be.uu.net>...
>Hi,
>
>I hope this is the right group, if it isn't, I would appreciate a pointer
to
>the correct group.
>
>I have a database (Interbase 6) in which to store data regarding
production,
>parts, employees, customers etc.
>
>After wading through some books regarding relational databases, I'm fairly
>satisfied with the design I've come up with so far, except for one thing
>that I don't really know how to model.
>
>I have a table "Customers" which stores info about the customer such as
>address, name, legal tax number, and so on. This customer receives the
>invoice. This table is linked 1-n to "Cust_Warehouses" in which I store
>information regarding the warehouses a particular customer has (address,
>phone of the warehouse etc.).
>
>However, I also have "Contacts" which stores information about contacts
>(fairly obvious <grin>).
>
>I would like to link the contact information to Customers (mandatory) and
to
>Cust_Warehouses (optional).
>
>Is this 'acceptable' or should I use two tables, Cust_Contacts and
>Cust_WareHouses_Contacts ?
>
>I'd really appreciate any suggestions or tips you'd like to share.
>
>TIA
>
>Steven Tolleneer
>
>
>
Received on Fri Jun 23 2000 - 00:00:00 CEST