Linking Files
From Informer 4 Wiki
A Link represents a simple defined relationship between two of your mapped tables, very much like a join in traditional SQL vernacular. These relationships can be defined as being local Links, meaning the two tables involved are mapped from the same datasource, or remote, meaning the tables involved are mapped from two different datasources.
Defining your link structure to create a meta-schema of all the datasources in your organization provides your report consumers tremendous power to retrieve information seamlessly from many different sources, never needing to know that one field was retrieved from an Oracle database, while another from a UniData database, and yet another from MySQL. You have the ability therefore to create a “reporting schema” for your organization which spans multiple databases.
Internal Links
An internal link defines a relationship between two mapped tables from the same datasource. The types of links available to you depend on the type of the datasource from which the source table was mapped. Though some datasources do not support all, there are potentially three types of links available: Foreign Key, Reverse Foreign Key, and Key from Third Table. Note MultiValue datasources support only Foreign Key links for internal relationships.
- Foreign Key : If you know that a field within your source table mapping is the key to another table mapping, you can create a Foreign Key link. For example, a hypothetical Person mapping links to a Company mapping with a Foreign Key link built from the companyId property on the Person mapping.
- Reverse Foreign Key : If you know that the key of your source mapping is a property on another mapping, you can create a Reverse Foreign Key link. This is the opposite of the Foreign Key link as the source is the opposite table mapping. For example, the same hypothetical Company mapping links to a Person mapping with a Reverse Foreign Key built using the key of Company to point to the companyId property of the Person.
- Key from Third Table : If you know that you have a standard third-normal table defining relationships between two of your mapped tables, you can create a Key from Third Table link. Let’s modify our Person / Company example and assume a Person can work for multiple Companies. In this case, you would not have the companyId field defined on the Person table, but instead you would have the relationship between Persons and Companies defined in a third-normal table hypothetically named persons_companies.
Remote Links
Remote Links allow you to define a meta-schema of all useful reporting data from all datasources in your organization – all seamlessly to your end users.
If you have more than one datasource mapped in Informer you can create Remote Links between them so users can include properties from multiple sources for display in results. Remote Links can be created between datasources of any supported type, meaning you can create a join-like relationship between two SQL datasources, between a SQL and a UniData datasource, between a UniData and MySQL datasource, etc.
The link types available for Remote Links are Foreign Key and Reverse Foreign Key, both described in the previous section.
Adding Links to Informer
In order for your users to create selects against and include fields from a multiple tables in a report, the relationship between the tables must be defined as Links in Informer. Managing which links are included for use in Informer is done through the Links tab on the associated Mapping Detail page.
To add a new link to Informer, browse to the links tab on the table mappings page by following the path Datasource > Table > Links tab. Click the Add button in the menu bar to create an internal link, click the Add Remote button in the menu bar to create a link to a table mapping from another datasource. This will bring up a dialog allowing for you to define the link on the selected table. The options within the dialog depend on both the datasource type of the source table mapping and the type of link (internal / remote) you choose to create. Refer to the previous section for descriptions of each of these types. Once you’ve provided the information required to create your link, click Save and your new link will appear in the Links listing and is now available for use in reports. Note a table mapping can and should have many links defined; the quality of your Informer implementation will improve as you allow your end users the ability to traverse your datasources.
Note : Informer does not check to see if the links you create are in fact valid given your data schema, but instead assumes they are correct.
