Links define the relationships between the Tables in the relational database applications that your Systems connect to.

 

Links are used to control the way in which you assemble your inmydata Subjects, ensuring that they are only built using Tables with a known relationship.

 

Most of the Links you use will be those which are inherent to the Tables and Indexes in your application, but sometimes you may also wish to define Links of your own.

 

To make the process of defining Links as easy as possible, you can let inmydata do the work, and Import Links From The Database.  inmydata  does this by analysing the common fields and indexes within the database.

 

For those times when you need to Link tables that do not have an obvious connection,  the Link Wizard will guide you through the process letting you Create Or Modify Links quickly and simply.

 


Links Wizard - Import from Database


To Import Links from the database go to the imnmydata Configure Data Sources screen.

Click the Import Export Button

clip673


This will open the Import/Export Wizard. 


After the introduction screen 

Select "Import Links from Database" this will open the Load Default Links Wizard



Links - Create or Modify Links


As well as allowing you to Import Links From A Database, inmydata gives you the facility to create and modify your own Links.

 

To Create or Modify Links you must be in the inmydata Configure Data Sources Application

 

You can then use the appropriate Menu Item or Toolbar button to Create A New Link or Modify An Existing Link.

 

 

Links Wizard - Create a New Link


To Create Or Modify Links, in the inmydata Configure Data Sources Application  screen first choose the system you wish to work with using the System Selection Combo box, and then click on the Links tab.  Any existing Links which have been previously created or imported will be displayed in the List View.

 

TO CREATE A NEW LINK...

 

Ideally Select the System prior to creating a Link using the Tree view, this will preselect the System in the Wizard

clip683

Click on the 'New Link Icon on the toolbar.

 

You will then see the

Link Wizard - Introduction Form

clip681

clip680

OR ALTERNATIVELY...

 

Click on File (On the menu bar), and then click on New Link

 

This will also open the

Link Wizard - Introduction Form.

The Link Wizard will start, and if you have not previously chosen to skip it, the Link Wizard - Introduction screen will be displayed unless you have previously opted to skip that screen.



Links Wizard - Modify an Existing Link


To Modify a Link you must be in the inmydata Configure Data Sources Application screen.

 

TO MODIFY AN EXISTING LINK...

clip693

1.Select the System name in the Treeview,
2.Select 'Links'
3.Select the Link you want to amend.

 

The Details will be displayed on the right hand side.

 

 

To amend the type of Join 'Select Tables to Join' Tab.

 

To modify the definition of the Join select the 'Define Join' Tab

 

After making any Changes, ensure you Save your Changes


Links Wizard - Introduction


When you Create A New Link or Modify An Existing Link using the Link Wizard,

the Link Wizard - Introduction screen will be displayed.

 

If you wish, click on the 'Skip this screen in the future' Check box to prevent the Introduction from being displayed again.

 

clip682

 

Click on the 'Next >' button to move on to the next step.  If you are creating a new Link this will be the Link Wizard - Select System form, and if you are modifying an existing Link this will be the Link Wizard - Select Tables To Join.  To exit the Link Wizard at any time without saving your changes click on the 'Cancel' button.

 

 


Links Wizard - Select System


The Link Wizard - Select System form allows you to choose which system you are creating a link for.  This Form Only appears when you are creating a New Link, as it is not possible to transfer existing Links between systems. If a System was selected prior to opening the wizard the system will already be selected.

 

clip684

 

Once you have chosen a system using the drop down combo, its name will be displayed in the list view underneath.  If you are not already connected to the chosen System, DataPA will display a message letting you know that it is now connecting.  DataPA needs to be connected to the chosen System so it can read the structure of the Database.

 

Click on the 'Next >' button to move on to the Link Wizard - Select Tables To Join form.  At any time, you can click on 'Cancel' to quit the Link Wizard without saving your changes, or '< Back' to return to the previous screen.

 

 


Links Wizard - Select Tables to Join


The 'Link Wizard - Select Tables To Join' screen lets you specify the tables you wish to Link together, and the nature of the join you wish to link them with.

 

clip685

 

For example, if you wanted to produce reports on Customers and include Customer Order information, you would need to create a Link between the Customer Table and the CustomerOrder Table.  The Customer Table would be the Source Table,

and its name would be entered into the appropriate combo box shown above.  In the second combo box you would enter the Target Table, which in this case would be the CustomerOrder Table.

 

If the drop down boxes are not showing the tables you expect, or Newly added  tables are not visible clicking on the Refresh buttons will

 

Once you have selected the Tables you can specify the nature of the join between them by clicking on either Inner Join or Outer Join.

 

The basic difference between an Inner Join and an Outer Join is that if you had an Inner Join between a Customer and their Orders, you would only see the Customer's details if the query found any Orders for them.  With an Outer Join you will see the Customer details regardless of whether any Orders are found or not.

 

Once you have selected the tables to be joined :-

In Create mode click 'Next >'
In Modify mode select the Define Join Tab

 

to move on to the Link Wizard - Define Join screen where you can specify the column which Link the tables together. In the Case of a Customer Table and a Customer Order Table the linking field might be CustNum.


Links Wizard - Define Join


It is very important to ensure that you define the appropriate Link Conditions.  In the example of 'Customers' and 'CustomerOrders' if you did not define any Link Conditions you would retrieve every Customer Order on your system every time you found a Customer.

 

Clicking on the 'Add' button will open up the Link Condition form where you can define your Link Conditions.  Alternatively click in the 'Allow manual editing' Check box to write your own conditions in the List View.

 

There is also an option to automatically create a Link condition by selecting the 'Suggest join based on indexing' button.

 

clip686

 

After they have been created, your Link Conditions are displayed in the List View, as shown below.

 

To Delete, Edit or change the order of a Link Condition, first select it by clicking on it in the List View.

 

To delete the selected Link Condition you then click on the 'Delete' Button.

 

To edit the selected Link Condition you would then click on the 'Edit' Button to open up the Link Condition form.

 

To change the order of the Link Condition click on the Up or Down arrow to move the selected condition up or down the list of conditions.

 

clip687

 

Once you have created all your conditions, either through manually editing, or by using the Link Condition form, you can then click on the 'Next >' button to move on to the last stage, the Link Wizard - Finished screen.

 

 


Links Wizard - Link Condition


The Link Condition form lets you build your Link Conditions quickly and simply. 

 

clip689

FIRST...

 

select the column in the Target Table that you wish to compare with a column in the Source Table.

 

To do this, click on the Combo box button to show a list of the Target Table columns, then click on the column you require.

clip690

NEXT...

 

In the same way that you selected the Target Table column, use the Operators Combo Box to select the appropriate Operator that describes the relationship between the Target Table and  Source Table columns.

 

THEN...

 

Use the Source Table Combo box to choose from a list of suitable Source Table columns.

On occasion you may not want to build a Link Condition which relates a Target Table column to a Source Table column, but you may wish to compare the Target Table column to an 'Expression' or  Fixed Value.  See the example below.

clip691

FIRST...

 

select the Target Table column and Operator as before.

 

NEXT...

 

If it is not already checked, click on the 'Expression' Check box,  to make the 'editing' area active.

 

THEN...

 

Enter the Expression or Value that you want the Target table column to be compared against. You can use any valid Progress expression.

DATA PREVIEW

 

The data preview allows you to check the data contained in a particular column. Select the data preview button to launch the data preview screen which will retrieve a pre-specified number of rows (default - 10) and display them in a grid.

REFRESH

 

The Source and Target Dropdown lists can be refreshed using the Refresh Button.

FINALLY...

 

Click on 'OK' to complete your Link Condition and return to the Link Wizard - Define Join form.

 

At any time, if you wish to return to the Link Wizard - Define Join form without saving any changes to your Link Condition, just click on 'Cancel'.


Links Wizard - Finished

 

To complete your Link and return to the inmydata Configure Data Sources screen, click on the 'Finish' button.

 

If you wish to check your work before completing your Link you can step back through the previous screens by clicking on the '< Back' button.

 

To quit out of the Link Wizard, and return to the inmydata Configure Data Sources screen without saving any of your changes, click on the 'Cancel' button.

 

clip688