K
Kelly
I'm pretty sure I have a design problem here but can't
seem to see it (although I'm sure it's right in front of
my face!)...
I have a database that stores library information
(location, employees, etc). In this database I've got
three tables that are starting to frustrate me: one is a
table that contains library information, one contains
staff members, and the last contains the people whom are
certain contacts for each library. These tables are
called Library, Staff and Contacts. The library table has
a primary key called library code. Library code is a
foreign key in the staff table (indicating where the staff
person works primarily) and is also a foreign key in the
contacts table (indicating which library they are a
contact for).
My problem is this: when I try to run a query that pulls
library information, staff information (those that work at
the library) and contact information (the contact people
for that library), I end up losing some data (usually the
library code field for staff or contacts). How can I
design this better? Contact people are staff members that
work at a single library but can be contacts for many
libraries. There are also about 5 different contact types
(I use a field called contact type in the contact table).
Any help would be appreciated!!!
Thanks,
Kelly
seem to see it (although I'm sure it's right in front of
my face!)...
I have a database that stores library information
(location, employees, etc). In this database I've got
three tables that are starting to frustrate me: one is a
table that contains library information, one contains
staff members, and the last contains the people whom are
certain contacts for each library. These tables are
called Library, Staff and Contacts. The library table has
a primary key called library code. Library code is a
foreign key in the staff table (indicating where the staff
person works primarily) and is also a foreign key in the
contacts table (indicating which library they are a
contact for).
My problem is this: when I try to run a query that pulls
library information, staff information (those that work at
the library) and contact information (the contact people
for that library), I end up losing some data (usually the
library code field for staff or contacts). How can I
design this better? Contact people are staff members that
work at a single library but can be contacts for many
libraries. There are also about 5 different contact types
(I use a field called contact type in the contact table).
Any help would be appreciated!!!
Thanks,
Kelly