niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Berkeley DB
btree or b+tree
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
Kenneth Sørensen
*nix forums beginner


Joined: 03 Mar 2005
Posts: 6

PostPosted: Thu Apr 07, 2005 8:35 am    Post subject: Re: btree or b+tree Reply with quote

Hey,

It seems like BDB by default does not coalesce the nodes in the B+-tree.

It does the same whether I have specified the DB_REVSPLITOFF flags on the
creation of the database or not.

The scenario i'm trying to run is the following.

1. open the database (with or without the DB_REVSPLITOFF flag -> same
observation as below)
2. fill in 50 entries (which is more than what can be inside a single
leafnode) -> observation: The tree splits into the a root-node and 2
leafnodes (one with 48 entries and one with 2 entries)
3. deleting the 40 first entries -> observation: the tree now still contains
tree nodes (leafnodes now have 8 and 2 entries)

After doing this i guess it should be expected that the 10 entries back
where coalesced into the root node? The behavior seams like the REVSPLIT is
always turned off. Is there an explanation for my observation?

Regards,
Kenneth


"Michael Cahill" <mjc@sleepycat.com> wrote in message
news:1112273035.741722.288450@z14g2000cwz.googlegroups.com...
Quote:
Hi Claus,

Yes -- what you call coalescing is what Berkeley DB calls a reverse
split. You can turn it off with the DB_REVSPLITOFF flag:

http://www.sleepycat.com/docs/api_c/db_set_flags.html#DB_REVSPLITOFF

Regards,
Michael.
Back to top
Michael Cahill
*nix forums Guru Wannabe


Joined: 26 May 2005
Posts: 219

PostPosted: Thu Mar 31, 2005 10:43 am    Post subject: Re: btree or b+tree Reply with quote

Hi Claus,

Yes -- what you call coalescing is what Berkeley DB calls a reverse
split. You can turn it off with the DB_REVSPLITOFF flag:

http://www.sleepycat.com/docs/api_c/db_set_flags.html#DB_REVSPLITOFF

Regards,
Michael.
Back to top
Claus Jensen
*nix forums beginner


Joined: 21 Mar 2005
Posts: 5

PostPosted: Thu Mar 31, 2005 9:40 am    Post subject: Re: btree or b+tree Reply with quote

Thank you for your answer.

In addition we have a question with regards to nature of the implemented
b+tree structure. With regards to the traditional b+tree theory, nodes may
be coalesced upon deleting data entries from the leafnodes. However. looking
at the tree structure in Berkeley DB, we have noticed that this does not
seem to be the case for this database.

However, we have noticed in the code comments that something called a
"reversed split" exists. Is this similar to the case where we combine nodes
or does Berkeley not support this?

If it does support this, is it then something we can switch on and off? (we
are asking because it appears from the code comments that this is possible)

Thanks
Claus


<ubell@sleepycat.com> wrote in message
news:1112026660.963621.165330@o13g2000cwo.googlegroups.com...
Quote:
Berkeley DB supports b+trees in that the key/data pairs are stored
in the leaf nodes.

Michael Ubell
Sleepycat Software.
Back to top
ubell@sleepycat.com
*nix forums beginner


Joined: 06 Jun 2005
Posts: 49

PostPosted: Mon Mar 28, 2005 2:17 pm    Post subject: Re: btree or b+tree Reply with quote

Berkeley DB supports b+trees in that the key/data pairs are stored
in the leaf nodes.

Michael Ubell
Sleepycat Software.
Back to top
Claus Jensen
*nix forums beginner


Joined: 21 Mar 2005
Posts: 5

PostPosted: Fri Mar 25, 2005 9:36 am    Post subject: btree or b+tree Reply with quote

Hi,

could someone please confirm whether the btree in Berkeley DB is a regular
btree or a b+tree?

Rgds
Claus
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 4:05 am | All times are GMT
navigation Forum index » Databases » Berkeley DB
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Bug#379104: ITP: complearn-mpi -- parallel quartet tree s... Rudi Cilibrasi devel 0 Fri Jul 21, 2006 11:30 am
No new posts Good Representation for an Abstract Syntax Tree johan.tibell@gmail.com C 9 Tue Jul 18, 2006 1:28 pm
No new posts Tix Tree open/close issue Sori Schwimmer python 0 Fri Jul 14, 2006 2:56 pm
No new posts cairo 1.0.4 build failing on newly installed box/ports tree rloef@interfold.com FreeBSD 9 Fri Jul 14, 2006 12:56 am
No new posts Tix Tree open/close issue Sori Schwimmer python 1 Thu Jul 13, 2006 6:34 pm

Bankruptcy | Loans | Magazine Subscriptions | McDonalds | Bleach
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2311s ][ Queries: 20 (0.1488s) ][ GZIP on - Debug on ]