Implementing Equi-Joins 
Author Message
 Implementing Equi-Joins

Hi,

Instead of using a database system I want to manipulate datasets in the
machines memory as the sets are only temporary and quite small. Actually
I am using perl and my "database" is a hash (database) of hashes
(tables) of arrays (rows) of hashes (columns). But that's not really
important...
What I need is an algorithm to perform equi- and non-equi joins on my
"tables" so that I can do something like:

 UPDATE %hash1 SET $hash1{foo}= $hash2{bar} WHERE  $hash1{boo}=
$hash2{far}

(Well that's a simple example for an update as it only uses two
"tables"). Well, I had a look at the source code of mysql; but I guess
it would take me a year or so to figure out how it works ;-) I am
looking for a simple general solution (not necessarily in perl). Is
there somebody who could help me (or tell me where to look)?

Thanks in advance for any help!

Cheers,

    Marko



Mon, 26 Aug 2002 03:00:00 GMT
 Implementing Equi-Joins

Hallo Marko,

Quote:
> UPDATE %hash1 SET $hash1{foo}= $hash2{bar} WHERE  $hash1{boo}=
>$hash2{far}

your should take a look at foreach, keys and values

Regards,
Joachim



Fri, 30 Aug 2002 03:00:00 GMT
 Implementing Equi-Joins

Quote:

> Hallo Marko,

> > UPDATE %hash1 SET $hash1{foo}= $hash2{bar} WHERE  $hash1{boo}=
> >$hash2{far}

> your should take a look at foreach, keys and values

> Regards,
> Joachim

Hi, Joachim,

that's what I've done to implement a simple inner join between two
tables, no problems with that. The fun starts as soon as more
tables/auto joins/functions get involved. I guess without a good parser
and some knowledge about the relational data model you will need loads
of "foreach, keys and values".

Regards,
Marko



Sun, 01 Sep 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Self join VS equi join

2. Sub query - Equi Join

3. Thoughts on equiJOINs - no JOIN word - old style

4. Equi-Joins....

5. Non-Equi-Joins: Any tricks to improve performance ?

6. Non-Equi-Join

7. What is Equijoin and Self-Join Query?

8. sql syntax implementations for odbc aliases and equi-joins

9. Non-Equi-Joins: Any tricks to improve performance ?

10. How to implement Outer Join?

11. Implementing a new Join Algorithm

12. Implementing outer joins in Ingres?


 
Powered by phpBB® Forum Software