Relationship/Query Problem

K

Kelly

I am building a database with the following design:

Table 1: Company info (e.g.: adress, main phone, etc.)
Table 2: Contacts (datasheet to list multiple contact
names, extensions, etc.)
Table 3: Mailings (specific categories for each contact
(e.g.: newsletter, calendar, etc.--all yes/no)

At the moment, I'm having a query dilemma. If I have
Joe, Jane and John all at ABC Company, with only John to
receive the Calendar...all three contacts come up as
output for the Calendar-Yes query. It's as if the Org ID
is linked to the Calendar instead of the Contact ID.

Any thoughts as to how the relationship should look?
 
A

Adrian Jansen

I did that same setup not long ago. You need

tblOrgs
OrgID PK
etc

tblContacts
ContactID PK
OrgID FK
etc

tblMailouts
MailID PK
ContactID FK
etc

So you relate many Contacts to one Organisation, and many Mailouts to one
Contact

In fact in my case I had to allow many Organisations to many Contacts, with
a junction table to relate them, but still relate the Mailouts to the
Contacts.
--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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