next up previous contents
Next: Data segments Up: The JSOC data record Previous: Primary index   Contents

Links

A data record contains zero or more named links. Links are pointers between data records and make it possible for data records to inherit keyword values from each other, and to capture other dependencies between them such as processing history. For example, a data record can contain links to the data records that were used in creating it, such as a dopplergram data record pointing to the filtergrams from which is was created. Links come in two varieties, static and dynamic:

Notice: This corresponds to a simple query link. I think the most efficient way to implement it in Oracle is using two steps. The first step creates a temporary table with just the subset of records we are interested in. The second step extracts just the records with the highest version for each principal index:

create or replace view tmpview as 
       select * from <series> where <primary index>=<value in link>
with read only;

select * 
from tmpview, (select max(<record number>) as tmp_recnum 
               from tmpview 
               group by <primary index>
              ) 
where <record number>=tmp_recnum;

This form also works for extracting the newest version of all records satisfying a more general condition, just replace ``<primary index>=<value in link>'' in the first step with a general query condition.


next up previous contents
Next: Data segments Up: The JSOC data record Previous: Primary index   Contents
Philip Scherrer 2006-06-17