January 10, 200818 yr Newbies Absolute newby, trying to get to grips with RDBS and FMP v9. I read that one feature of relationships is to avoid data duplication, but I'm clearly misunderstanding how this works. I set up a very simple FMP file as a learning example, but I can't get it to work as I expecetd: Two tables, each has an auto enter serial number field as I read this is 'best practice'. Company: CompanyID (auto enter serial) CompanyName (text) CompanyTown (text) People: PeopleID (auto enter serial) FirstName (text) LastName (text) CompanyID.fk (number) I defined a match key relationship on CompanyID to CompanyID.fk On the people layout I added the CompanyName and CompanyTown fields from the Company table. I expected that if I added 3 people records, all with exactly the same Company Name and Company Town, I would end up with 3 people records, but only 1 company record. I don't I end up with 3 company records as well. Where am I misunderstanding? Thanks, Mike A.
January 10, 200818 yr I suspect you have enabled the creation of new company records in the definition of the relationship - so that each time you enter a company name, a new record is created. You shouldn't be entering anything into the related fields from Company. In fact, it would be best to make them non-enterable entirely. Instead, you should enter the CompanyID into the CompanyID.fk field. A value list based on the CompanyID field, showing also the CompanyName, would work well for this.
January 10, 200818 yr Author Newbies Thanks for that - yes, you're quite correct. I can see what you are saying, and I've just been having a play with the value lists. Thanks, Mike A.
Create an account or sign in to comment