Newbies Sergej Ivanov Posted June 11, 2016 Newbies Posted June 11, 2016 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!
comment Posted June 11, 2016 Posted June 11, 2016 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?
Newbies Sergej Ivanov Posted June 11, 2016 Author Newbies Posted June 11, 2016 I thought of it - but then I'll have the same problem, as I would need statistics for the documents - which features they describe
comment Posted June 11, 2016 Posted June 11, 2016 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?
Newbies Sergej Ivanov Posted June 11, 2016 Author Newbies Posted June 11, 2016 I am sorry - yes. Normally there's around 20 documents describing a feature, and each document may contain information on up to 20 features
comment Posted June 11, 2016 Posted June 11, 2016 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.
Newbies Sergej Ivanov Posted June 11, 2016 Author Newbies Posted June 11, 2016 Now it works. Thank you!
Recommended Posts
This topic is 3360 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