I have three tables to link, and I am experiencing confusion about how to identify and link Primary and Foreign keys.I
When setting up a data model, you must identify your entities/processes and their relationships/cardinality; a common way is to write a prose description of what are essentially your business rules, then find/extract the pertinent nouns and verbs from that text (essentially, your business rules):
"Teams attend Visits in Facilities"; "Facilities can be visited by multiple teams, and each team can visit multiple facilities"; "a team is formed by a person and a dog"
which could be translated into
Facility --< Visit >-- Team --< Contact (Dog/Person )
Not really sure about the Team part, though; if any person/dog could be member in many (well, more than one) teams, you may want to consider
Facility --< Visit >-- Team --< TeamPartner >-- Contact (Dog/Person )
which is more flexible, and should even be considered if contacts will be limited to one team for the lifetime of your database (or their own) …
Next step is finding the correct attributes for your existing entities – which sometimes requires their re-evaluation – but this is an iterative process, and you need to start somewhere …
It seems that a portal can have information from one table only.
No, in fact you can put fields from any table occurrence that is “behind” a portal's table occurrence into that portal (with certain caveats). So in the data model outlined above, a portal into Visit would show all related Visit records and allow you to combine fields from Visit and Team.
Be aware, though, that a portal can only show records from one table. So while you could even “look into” Contacts, a Facility has more related Contact than Visit records, so there it would get tricky …
Once you got that right, you can think about the workflow – e.g. use a value list of Teams to add Visits into a portal in Facilities, or a value list of Facilities to add a visit into a portal in Team? (There are more elegant ways of adding related records, but that method is a good start.)
If you do add data via a portal, don't forget to check the relationship setting “Allow creation of related record in this table …”.).