June 11, 20169 yr Newbies Hi, I got stuck with building a proper relationship scheme. I'm making an database with several tables. One table contains information on archaeological features (key field Feature ID), another contains data on documentation. One document may contain information on several features, for this reason in documentation table I've created several fields (Feature ID 1, Feature ID 2, etc). The two tables are related through Feature ID=Feature ID 1; in the second table I've made a self-relation between all Feature ID fields. In the Features layout I've made a portal displaying related records from Documentation table. Unfortunately it only displays related to the first field (Feature ID 1), while other fields (Feature ID 2, etc) seem remain unrelated. What do I do wrong? Thank you!
June 11, 20169 yr 5 minutes ago, Sergej Ivanov said: One document may contain information on several features, How about the other way? Can one feature be related to several documents?
June 11, 20169 yr Author Newbies I thought of it - but then I'll have the same problem, as I would need statistics for the documents - which features they describe
June 11, 20169 yr This doesn't answer my question. I am not asking about the problems you might have, but about the real-world scenario: can there be more than one document describing the same feature?
June 11, 20169 yr Author Newbies I am sorry - yes. Normally there's around 20 documents describing a feature, and each document may contain information on up to 20 features
June 11, 20169 yr Well, then you have a many-to-many relationship - and the proper way to resolve it is through a join table. See a basic demo of a join table here:http://fmforums.com/topic/50942-portal-grouping-problem/?do=findComment&comment=239210 Note: In some cases, you may use a multi-key field in one of the tables instead of a join table. For example, you could use a checkbox field in the Documents table to tick off all the features that the document describes. But there are severe limitations to this method: mainly, you cannot record any attributes of a specific join - for example, the page on which this feature is described in this document. You also won't be able to produce a proper report of documents by feature, or features by document.
Create an account or sign in to comment