b-tree

What is a good open source B-tree implementation in C?

I am looking for a lean and well constructed open source implementation of a B-tree library written in C. It needs to be under a non-GPL license so that it can be used in a commercial application. Ideally, this library supports the B-tree index to be stored/manipulated as a disk file so that large trees can be built using a configurable ...

Binary Search or Btree index Update problem

Imagine that you are handed a new book everyday from an author. The book is a work in progress. He does not tell you what he has changed or added. Your job is to identify the changes and additions, and pass ONLY these along to the publisher (who does not have time to read the entire book everyday) For the purposes of this problem, the ...

Techniques for Caching SQL Query Data

Having read some on this subject: http://stackoverflow.com/questions/37157/caching-mysql-queries http://www.danga.com/memcached/ My SQL Caching problem: http://www.petefreitag.com/item/390.cfm http://framework.zend.com/manual/en/zend.cache.html#zend.cache.introduction I have a very unique (narrow) set of Queries and I think I could ...

Larger than memory data structures and how they are typically handled

Say I have a file based data structure such as a B+ Tree. My understanding is that the data is expected to be stored on disk, but the index is usually loaded in memory. What if you have such a large file that even its index doesn't fit into memory? How is that typically handled? Secondly, since the index is a tree, not a linear set of...

What's the difference between B-Tree and GiST index methods (in PostgreSQL)?

I have been working on optimizing my Postgres databases recently, and traditionally, I've only ever use B-Tree indexes. However, I saw that GiST indexes suport non-unique, multicolumn indexes, in the Postgres 8.3 documentation. I couldn't, however, see what the actual difference between them is. I was hoping that my fellow coders migh...

saving Btrees to a disk file and read it

I want to save a Btree(not sure a binary one) in a disk file. and then read it to the memory. some Level-order traversal may be a good way for a binary Btree. but if it is not a binary one. I build up the Btree from the leafnode to the rootnode in memory. I believe that I have to define some structures in the disk file and output the tre...

Is there an API to draw a B-TREE?

Hi there, That's a simple question: is there an API to draw a B-tree in Java? I just dont want to spend much time reinventing the wheel. I am not having trouble with the algorithm per si, mine works perfectly fine after a lot of reading (specially Lafore's Data Structures & Algorithms in Java), I just dont know how to print a B-tree in ...

Which datastructure is appropriate for this situation?

I'm trying to decide which datastructure to use to store key-value pairs when only features needed are insertion lookup Specifically, I don't need to be able to delete pairs, or iterate through keys/values/pairs. The keys are integer tuples, the values are pointers (references, whatever). I'm only storing a couple million pairs spr...

javascript binary search tree implementation

Anyone know of any good examples of a simple BTree implementation in Javascript? I have a bunch of "things" arriving randomly, and want to insert each one efficiently. Ultimately, each new one will get inserted into the DOM based on where it ends up in the tree. I can code this from scratch but would rather not reinvent any wheels. t...

good ADT to implement BTREE

What data structure should I use to implement a BTree? Why? ...

Looking for a disk-based B+ tree implementation in C++ or C

Hi, I am looking for a lightweight open source paging B+ tree implementation that uses a disk file for storing the tree. So far I have found only memory-based implementations, or something that has dependency on QT (?!) and does not even compile. Modern C++ is preferred, but C will do too. I prefer to avoid full embeddable DBMS solut...

Does anyone know where I might find a file based multi-way B-Tree Class for c#?

I need to implement a file based multi-way B-Tree Class for c#. There is similar functionality available for C++ and C but I want to use it in C#. It also need to be available as source code as I wish to use with some alternative .NET implementations like MonoTouch. If anyone knows of a non file based Multiway b-Tree then this could ada...

size of B+ tree

Hai I am preparing for DBMS exam where i want to calculate the memory size (in bytes) occupied by the B+tree. thank u. ...

Using code from a book without plagiarizing

I have a book on data structures and programming, and I referenced it to implement a B-tree insertion function. I copied most of the algorithm and variable names from the code samples in the book, but adapted it to match the structures I had already prototyped. I'd like to release my code under a permissive license (e.g. the MIT Licens...

Advantages of BTree+ over BTree

Possible Duplicate: B- trees, B+ trees difference What are the advantages/disadvantages of BTree+ over BTree? When should I prefer one over other? I'm also interested in knowing any real world examples where one has been preferred over other. ...

C/C++: How to store data in a file in B tree

Hello, It appears to me that one way of storing data in a B-tree as a file can be done efficiently with C using binary file with a sequence (array) of structs, with each struct representing a node. One can thus connect the individual nodes with approach that will be similar to creating linked lists using arrays. But then the problem that...

How are B Tree nodes typically represented?

I've been doing some brushing up on my B-Tree and 2-3-4 tree (B tree with order 4), and I'm attempting to implement this in C#. My question to you is, given that a B-Tree node can contains N-1 number of items and N subtrees, what is the typical representation for one of these nodes? Is it an array, series of linked-lists, or something I...

Does anybody know how B-Tree got its name?

I'm reading CLRS 2nd and is studying B-Tree now. CLRS claims that B-Tree naming is not clear yet: [Bayer, McCreight, 1972] doesn't offer the reason that B-Tree is named to "B-Tree". I haven't investigated this issue any further... but does anyone know the reason? :) ...

Best data structure for crossword puzzle search

I have a large database for solving crossword puzzles, consisting of a word and a description. My application allows searching for words of a specific length and characters on specific positions (this is done the hard way ... go through all words and check each). Plus a search by description (if necessary) For instance find word _ _ A _...

how B-tree indexing works in mysql

my question is , when I create an index for a table in mysql, I see that the index_type is type BTREE . Now although I understand about btree(s), I do not quiet understand how it stores the index and how the database searches the records based on this. I mean, btree is excellent for databases to perform read and writes large blocks of d...