Implementing the Tree Join Functionality for the H2 DBMS

73 views
Skip to first unread message

Tharindu

unread,
Mar 23, 2012, 5:28:57 AM3/23/12
to H2 Database, ddasanka...@gmail.com, hatim...@gmail.com, hirantha....@gmail.com
Hey All,

We are doing a tree join implementation for the H2 Database as the
project part for our Final Year Advanced Database Module. This idea
was specified in the site roadmap. Can anyone of you please direct us
to the classes that we should refer to get a start to this.
Thanks in advance.

Regards,
Tharindu Jayasinghe

Thomas Mueller

unread,
Mar 23, 2012, 6:48:18 AM3/23/12
to h2-da...@googlegroups.com
Hi,

That would be a rather simple project, because it's already
implemented :-) unless, you mean something else with "tree join". What
I meant with "tree join" is nested joins in the form of a tree, for
example:

drop table a;
drop table b;
drop table c;
drop table d;
create table a(x int);
create table b(x int);
create table c(x int);
create table d(x int);
select * from (a inner join b on a.x=b.x) left outer join (c left
outer join d on c.x=d.x) on c.x=a.x;

... and not just as a chain as in:

select * from a inner join b on a.x=b.x left outer join c on c.x=a.x
left outer join d on c.x=d.x;

This was originally not possible, but was eventually implemented. I
forgot to remove it from the list. By the way, it was really tricky to
implement, if you really want to implement a join mechanism (for
example full outer join or merge join) I would probably do that
outside of the database, for example using TreeMaps or (for full outer
joins) by converting SQL statements to other SQL statements (for full
outer join possibly a "union all" or similar).

Regards,
Thomas

> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to h2-database...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
>

Tharindu Jayasinghe

unread,
Mar 25, 2012, 6:45:08 AM3/25/12
to h2-da...@googlegroups.com
Hey Thomas,

Thanks for the information. Could you just let me know where I can find these classes in the code. 

Regards,
Tharindu.

Thomas Mueller

unread,
Mar 28, 2012, 1:15:17 PM3/28/12
to h2-da...@googlegroups.com
Hi,

The main class is TableFilter.

Regards,
Thomas
--
Reply all
Reply to author
Forward
Message has been deleted
0 new messages