M
Microsoft
Greetings,
I am building an application to track my B&B guest stays and purchases, etc.
I am not a very experienced DB designer although I have a lot of experience
with using Access 2000 after design. I want to find out if my tables are
normalized. I just read Understanding Normalization by Michael J. Hernandez
and I now have a little clearer understanding about the subject, but I am
very unsure about what I can do in regard to linking tables and I would like
some input on my structure.
Here is my table structure and how I plan to link them. I would like to
know also if I need to have a field in each table to link to the other
tables (as I have now) or can I just link each table through the primary
keys?
Customer Table (tblCustomer)
* customerID (primary key)
1 staysID (link to tblStays: customerID)
2 customer_typeID (link to tblLU_customer_type: customer_typeID)
3 gcID (link to tblGift_Certificate: customerID)
4 purchaseID (link to tblItems_Purchased: itemID)
7 referralID (link to tblReferral_Type: referralID)
firstname
mi
lastname
address1
address2
city
state
province
country
postalcode
homephone
workphone
cellphone
fax
e-mail
company
title
customer_notes
Customer Type Table (tblLU_customer_type)
* 2 customer_typeID (primary key) (link to tblCustomer:
customer_typeID
customer_type
Stays Table (tbleStays)
* staysID (primary key)
5 room_stayID (link to tblLU_Rooms: roomsID)
6 stay_paymentID (link to tblLU_Payment_Type: paymentID)
1 customerID (link to tblCustomer: customerID)
room_rate
reserve_date
arrive_date
stay_length
guest_per_room
tax_exempt
cash_sale
weekly_stay
Rooms Table (tblLU_Rooms)
* 5 roomsID (primary key) (link to tblStays: room_stayID)
rooms_description
Items Purchased Table (tblItems_Purchased)
* 4, 8 itemID (primary key) (4 link to tblCustomer: purchaseID) (8 link
to tblLUItems_Type: item_typeID)
amount
date_purchased
Items Type Table (tblLUItems_Type)
* 8 item-typeID (primary key) (link to tblItems_Purchased: itemID)
item_description
Gift Certificate Table (tblGift_Certificate)
* gcID (primary key)
3 customerID (link to tblCustomer: gcID)
gcamount
date_purchased
gcnotes
Payment Type Table (tblLU_Payment_Type)
* 6 paymentID (primary key)
payment_type
Referral Type Table (tblReferral_Type)
* 7 referralID (primary key) (link to tblCustomer: referralID)
referral_type
Any feedback would be greatly appreciated. Thanks in advance for your help.
Best regards,
Scott B
I am building an application to track my B&B guest stays and purchases, etc.
I am not a very experienced DB designer although I have a lot of experience
with using Access 2000 after design. I want to find out if my tables are
normalized. I just read Understanding Normalization by Michael J. Hernandez
and I now have a little clearer understanding about the subject, but I am
very unsure about what I can do in regard to linking tables and I would like
some input on my structure.
Here is my table structure and how I plan to link them. I would like to
know also if I need to have a field in each table to link to the other
tables (as I have now) or can I just link each table through the primary
keys?
Customer Table (tblCustomer)
* customerID (primary key)
1 staysID (link to tblStays: customerID)
2 customer_typeID (link to tblLU_customer_type: customer_typeID)
3 gcID (link to tblGift_Certificate: customerID)
4 purchaseID (link to tblItems_Purchased: itemID)
7 referralID (link to tblReferral_Type: referralID)
firstname
mi
lastname
address1
address2
city
state
province
country
postalcode
homephone
workphone
cellphone
fax
company
title
customer_notes
Customer Type Table (tblLU_customer_type)
* 2 customer_typeID (primary key) (link to tblCustomer:
customer_typeID
customer_type
Stays Table (tbleStays)
* staysID (primary key)
5 room_stayID (link to tblLU_Rooms: roomsID)
6 stay_paymentID (link to tblLU_Payment_Type: paymentID)
1 customerID (link to tblCustomer: customerID)
room_rate
reserve_date
arrive_date
stay_length
guest_per_room
tax_exempt
cash_sale
weekly_stay
Rooms Table (tblLU_Rooms)
* 5 roomsID (primary key) (link to tblStays: room_stayID)
rooms_description
Items Purchased Table (tblItems_Purchased)
* 4, 8 itemID (primary key) (4 link to tblCustomer: purchaseID) (8 link
to tblLUItems_Type: item_typeID)
amount
date_purchased
Items Type Table (tblLUItems_Type)
* 8 item-typeID (primary key) (link to tblItems_Purchased: itemID)
item_description
Gift Certificate Table (tblGift_Certificate)
* gcID (primary key)
3 customerID (link to tblCustomer: gcID)
gcamount
date_purchased
gcnotes
Payment Type Table (tblLU_Payment_Type)
* 6 paymentID (primary key)
payment_type
Referral Type Table (tblReferral_Type)
* 7 referralID (primary key) (link to tblCustomer: referralID)
referral_type
Any feedback would be greatly appreciated. Thanks in advance for your help.
Best regards,
Scott B