dbTalk Databases Forums  

Tree structure on the Java Edition

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Tree structure on the Java Edition in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
xlex(0x835)
 
Posts: n/a

Default Tree structure on the Java Edition - 12-06-2005 , 06:07 AM






Hello,

does anybody can point on the persisten tree storage based on the
Berkeley DB Java edition or probably just give a hint what is a best
generic tree structure storage realisation using BDB JE?

Thank you in advance.

Regards,
/Alexander.


Reply With Quote
  #2  
Old   
Linda Lee
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-06-2005 , 12:17 PM






Alexander,

I am not sure what the goal of your application is, but you may want to
note that Berkeley DB Java Edition implements a btree internally to
store data. Because of that, it is not usually necessary for the
application itself to implement a tree data structure on top of JE.

Regards,

Linda


Reply With Quote
  #3  
Old   
xlex(0x835)
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-06-2005 , 01:10 PM



Hi Linda,

thank you for the information, but I need to implement linked tree on
top of some well known and well designed DB, so I do not see any way of
using internal implementation...

Regards,
/Alexander.


Linda Lee wrote:
Quote:
Alexander,

I am not sure what the goal of your application is, but you may want to
note that Berkeley DB Java Edition implements a btree internally to
store data. Because of that, it is not usually necessary for the
application itself to implement a tree data structure on top of JE.

Regards,

Linda


Reply With Quote
  #4  
Old   
Linda Lee
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-07-2005 , 08:12 AM



Alexander,

Perhaps you are asking instead how a tree data structure might be
designed on top of JE. For example, you could have a class like this:


class Node {
long id;
long parentId;
....
}

The id field would the primary key and parentId field a secondary key.
Using the secondary database on parentId, all children can be iterated
by getting all duplicates for a given parentId key.

Is that more along the lines of what you are asking?

Linda


Reply With Quote
  #5  
Old   
xlex(0x835)
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-08-2005 , 03:32 AM



Hi Linda,

yep, and that too =)
I guess, that it can be done just like in any relational DB with a
structure mentioned by you.

I just suppose, that probably somebody already done that job and share
it or just could recomend the most efficient and "right" way of doing
that.

Regards,
/Alexander.


Reply With Quote
  #6  
Old   
Linda Lee
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-08-2005 , 11:50 AM



In that case, you may want to pose the question to the bdbje email
list, where there is more JE specific correspondence. There are
definitely users who have put a variety of data structures on top of
JE. Of course, they may feel that their applications are too specific,
and may not reply, but it's worth a shot. See
http://dev.sleepycat.com/community/discussion.html

Linda


Reply With Quote
  #7  
Old   
xlex(0x835)
 
Posts: n/a

Default Re: Tree structure on the Java Edition - 12-09-2005 , 01:03 AM



Hi Linda,

oops - I supposed it's a shared BDB and BDB JE list, sorry.

I will transfer the theme for the pointed maillist, thank you.

Regards,
/Alexander.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.