saada logo

 
  SAADA OVERVIEW
Home  
News  
Tutos and Links  
Download  
  Tutorial
Getting started  
Doing More  
SaadaQL  
The Web Interface  
VO Publishing  
Tips & Troubelshooting  
  COMMUNITY
Mailing List  
Saada Sites  
How to Contact us ?  
  DEVELOPER CORNER
Contributors  
Next Step  
Old Releases  
Inside Saada  
Using UWS  

 

SourceForge.net Logo


HOME ART > Tutorial > Doing More > DB Populating
Building Relationships



 Build a new Relationship : This process is in 2 steps. The relationships must fisrt be created and the it can be populated.

  • Set first the relationship name : Open the Relation tab of the tab panel of the admintool and click on the New button. A popup prompts for the relationship name. This name must only contain letters, digits and ’_’ and it musn’t start with a digit. A brief description can only be given. Click OK to validate.

New Relationship

  • Set the collections linked by this relation : The relationship has a direction. It starts from the primary category of the primary collection and it points toward the secondary category of the secondary collection.
    • Primary category/collection : Drag and drop the category node (IMAGE, SPECTRUM..) of the starting collection from the data panel to the Primary text field.
    • Secondary category/collection : Drag and drop the category node (IMAGE, SPECTRUM..) of the secondary collection from the data panel to the Secondary text field.
  • Add Qualifiers. Qualifiers are numeric (double precision) values added to ewach relationship link. Set the qualifier name in the Qualifier Name text fields and then click on Add. The new qualifier is added into the combobox below. It cab be removed by using the remove button. The qualifier name must only contain letters, digits and ’_’ and it musn’t start with a digit.
  • Build the relationship. Once the name of the relationship, its description and the qualifier list are OK, click on Create Relation button. These parameters can no longer be modified once the relations is created. Once the correlator is setup, it can be used to populate the relationship with the populate button. This operation can take time if one (or both) of the involved collection is large. New links computed at this time are appended to the links already ito the relationship.

 Populate the relationship. Due to a GUI bug, the relationship must be reloaded before the correlator setup. Click on the load button, select your relationship and then click OK. They are distinct sort of correlation criteria : correlation by keywords and correlation by distance. Both criteria can be used in parallel.

  • Distance Criteria. The relationship manager will automatically create links between primary records and secondary records matching a distance constraint. Distance criteria onle makes sense if both primary and secondary collections have positions (category SPECTRUM, IMAGE or ENTRY)
    • Link to the Closest neighbour : Select 1st-NN in the Neighbourhood Constraint combobox. Set the dist Max with its unit. That is the maximum distance to consider a link. Link will be set between the primary records and the closest secondary record located at less the dist Max if it exist.
    • Link to the K Closest neighbours : Select K-NN in the Neighbourhood Constraint combobox. Set the maximum number of neighbours to consider in the K = text field. Set the dist Max with its unit. That is the maximum distance to consider a link. Link will be set between the primary records and the at most K closests secondary record located at less the dist Max.

Correlation by distance

If a qualifier named distance exists, it will be set with the distance computed by the correlator and expressed with the unit given here.

  • Keywords Criteria : Correlation links can be computed according keyword criteria. The condition to link records is written in the Keyword Based Condition text-field. Keywords referring to the primary collection must be prefixed with p. and keywords of the secondary condition must be prefixed with s.. Keywords used by the correlator can be restricted to one class of the primary (or secondary) collection. In this case, only data from that class can be linked by the relationship. The class must be selected in the Primary/Secondary Class combo box. If ANY is selected ; only collection level attributes can be used, but the whole collection can be linked. If the correlation criteria require using attribute of multiple classes ; you have to run one correlator for each class. In a future release UCDs and UType could be used to write correlator
    • Select the Primary/Secondary Classes. Never change the Primary/Secondary Classes after the correlator condition or qualifier values have been set.
    • Write the Correlator Condition : Activate the Keyword Based Condition text-field with a simple click on it. Select keywords in the combo box below. The correlator statement is simple SQL. Any operator known by the Postgres SQL can be used.
    • Set a Qualifier : Activate the text field of that qualifier by clicking on it and proceed as for the correlator.
last update 2011-05-23