Newbies schu Posted March 12, 2010 Newbies Posted March 12, 2010 Hello I have a table of contacts and a table for business reviews. I want to link these two together so I can pull the business info from contacts into the business review table, but not sure exactly how to do this. I keep thinking in my head that a business in the review table will only have one address and one address can only be associated with one business, isn't that a one-to-one? Or is my thinking wrong? I have read many times that one-to-one's are very rarely used. I did set up a relationship using primary key in contacts to foreign key in business reviews and this shows as a one(contacts) to many(business reviews). This does seem to work, I set up the foreign key field on the business review layout as a pop up menu thats populated from the business name field in contacts and when a business is selected it pulls in the info I want. For some reason tho, the relationship doesn't seem right to me... and a 2nd related question, assuming I did this correctly, how do you set up a find so someone can search the review table for a business name when in reality the Business Name field on the review layout is the foreign key field that just holds a number? Thanks
Vaughan Posted March 12, 2010 Posted March 12, 2010 One-to-ones are not used often, and it often means that the information should be in the same table. However the assumption about addresses isn't valid. Multiple companies can have the same address. I'd be asking how you want to relate the contacts and reviews: if the reviews need to be related to particular companies then I'd put a company picker in the review and allow a company to be selected. Since reviews could have more than one company in it you have a many-to-many relationship between company and review: so you need a join table. That way one review can be linked to multiple companies. The join table need only have 2 fields: the pk for the company, and the pk for the review.
Newbies schu Posted March 12, 2010 Author Newbies Posted March 12, 2010 Thank you, I knew something didn't look right.
Recommended Posts
This topic is 5429 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now