Scott,
The basic concept to follow, is that if there are two entities, both
represented by a table, that are in a one-to-many relationship with each
other, then the table on the "many" side of the relationship needs to
have a field (aften referred to as a Foreign Key) which has data in
common with the Primary Key of the table on the "one" side of the
relationship.
It doesn't work, for example, to have a CustomerID field in the Gift
Certificate table, and also a GCID field in the Customer table. In this
case, I would assume that any given customer could have more than one
gift certificate, but any given gift certificate only belongs to one
customer. In this case, then, the GCID field in the Customers table is
wrong and should be removed. As regards the relationship between
Cuatomers and stays, obviously any given customer can Stay more than
once. It is not clear from your design whether more than one customer
is recorded for each Stay. In either case, the StaysID field in the
customers table is wrong, and should be removed. If the Stay is only
recorded in the name of one customer, then it is correct to leave the
CistomerId field in the Stays table. If the Stay is meant to identify
more than one Cuatomers, you will need to remove the CustomerID field
from the Stays table, and you will need another table to record the
CustomerStays.
Sorry for the incomplete response, but hopefully these comments will
prove useful.

Signature
Steve Schapel, Microsoft Access MVP
Scott wrote:
> Greetings,
>
[quoted text clipped - 89 lines]
> Best regards,
> Scott B
Microsoft - 19 Jan 2004 18:09 GMT
Steve,
Thanks for the response.
The basic idea for the DB is that there is only one record for each
customer. One customer can stay multiple times, buy multiple gift
certificates, purchase multiple items. So the relationship between
customers and gift certificates, customers and items purchased and customers
and stays are all one to many. Then the other tables are attempts to cut
down the amount of redundant data in the customer, stays, gift certificate
and puchases tables.
If I undersand you correctly, I need to have a foreign key in the stays,
gift certificate and purchases tables because they relate to the one side in
the customer table. But the customer table uses the primary key to relate
to the many side in the other tables?
So graphically,
One Many
- tblCustomers: ID (primary key) = tblGiftCertificate: GCcustomerID (foreign
key [not primary key])
= tblStays: STAYcustomerID
(foreign key [not primary key])
= tblItemsPurchased:
IPcustomerID (foreign key [not primary key])
The subsidiary tables that hold lists of data such as a list of rooms, a
list of items to purchase, type of contact the customer is or the source of
the referral (tblLU_customer_type, tblLU_referral_type, tblLU_rooms,
tblLU_payment_type, tblLU_items_type) are the one side to a one to many
relationship with a main table?
So graphically,
One
Many
- tblLU_customer_type: customer_typeID (primary key) = tblCustomers:
customer_typeID (foreign key [not primary key])
- tblLU_referral_type: referral_typeID (primary key) = tblCustomers:
referral_typeID (foreign key [not primary key])
- tblLU_rooms: roomsID (primary key) = tblStays:
roomsID (foreign key [not primary key])
- tblLU_payment_type: payment_typeID (primary key) = tblStays:
payment_typeID (foreign key [not primary key])
- tblLU_items_type: items_typeID (primary key) =
tblItemsPurchased: items_typeID (foreign key [not primary key])
I am I gettng the idea?
Best regards,
Scott B
> Scott,
>
[quoted text clipped - 117 lines]
> > Best regards,
> > Scott B
Steve Schapel - 19 Jan 2004 18:43 GMT
Scott wrote:
> I am I gettng the idea?
Yes :-)

Signature
Steve Schapel, Microsoft Access MVP
Microsoft - 19 Jan 2004 19:17 GMT
Many thanks for all the help.
Best Regards,
Scott B
> Scott wrote:
>
> > I am I gettng the idea?
>
> Yes :-)