Data Structure help (hash/array)



Hi,

I am comparing two different datasets and trying to come up with the best data structure.

Data Set 1:

For each record, I get a pair like this:

$VAR1 = {
'TARGET' => '110974981305651',
'INTERNAL_ID' => '1000000000000005'
};
$VAR2 = {
'TARGET' => '111053548637000',
'INTERNAL_ID' => '111053624881107'
};
$VAR3 = {
'TARGET' => '111040401095000',
'INTERNAL_ID' => '111040426288012'
};

Data set 2:

For another record, I get a similar pair:

$VAR1 = {
'Instanceid' => 58538,
'Interfaceid' => 52
};
$VAR2 = {
'Instanceid' => 407401,
'Interfaceid' => 55
};
$VAR3 = {
'Instanceid' => 58536,
'Interfaceid' => 69
};
$VAR4 = {
'Instanceid' => 263954,
'Interfaceid' => 692
};

My goal is to connect this above two dataset based on another dataset (link table) that looks like this:

$VAR1 = {
'Interfaceid' => '52',
'TARGET' => '111053548637000'
};
$VAR2 = {
'Interfaceid' => '55',
'TARGET' => '110974981305651'
};
$VAR3 = {
'Interfaceid' => '69',
'TARGET' => '111040401095000'
}

The final output is to connect the internal id with the instanceid. How should I approach it? I was thinking each dataset could of array of hash.

--sharif
.



Relevant Pages

  • Re: Equation Library
    ... HP equation library or EQL+. ... get lost in your data set because of the tree structure. ... familiar with the data structure and just want to get there collection ... set with the builder is done "on the fly". ...
    (comp.sys.hp48)
  • Re: Data Structure help (hash/array)
    ... I am comparing two different datasets and trying to come up with the ... best data structure. ... Data Set 1: ... I was thinking each dataset could of array of hash. ...
    (comp.lang.perl.misc)
  • Mixed Data Handling
    ... I can not use autofilter or any other macro, this data set will be ...
    (microsoft.public.excel.charting)
  • Re: matching array element to hash key
    ... last level of the hash, at least without iterating through the hash. ... same data set, and about 85% of the data is the same. ... data set I'm putting in the array, and the array has about 30 or 40 ...
    (comp.lang.perl.misc)
  • Re: PX Deq Credit: send blkd
    ... can be a hash, merge or nested loop. ... the optimiser has used a hash join. ... the data set that will return the smaller volume of data (which is not ... If the second plan is unsuitable, it is because Oracle's estimate of the ...
    (comp.databases.oracle.server)