Can a Table Field relate to Multiple Tables?

W

Will

I've created a table named tblContacts.

Two of the fields are idContact and Type where Type may be Vendor or
Customer or whatever

The Question:

Can the idContact field in tblContacts relate to multiple tables...

For instance to tblVendors and to tblCustomers and tblETC.

I'm trying to do this so that we can put all "Contacts" in a single table.

Maybe this isn't smart but if I'm not careful we will end up with a bunch of
tables that have all the same fields except one will be for vendors, another
for customers, another for etc.

thanks for any help.
 
A

Allen Browne

Yes, it does make sense to put all the tables with similar fields into one
table, with a field to disinguish whether they are a "contact" or a "vendor"
or whatever.

This is a really useful design technique. For example, in the Northwind
sample database, you might consider putting the Employees, Shippers, and
Customers all in the one table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top