b-tree

Do DB indexes take same amount of disc space as column data?

If I have a table column with data and create an index on this column, will the index take same amount of disc space as the column itself? I'm interested because I'm trying to understand if b-trees actually keep copies of column data in leaf nodes or they somehow point to it? Sorry if this a "Will Java replace XML?" kind question. U...

What is a B-tree page

I think I know what a B-tree is but what is a B-tree page? ...

Do btrees and b+trees only store data at the leafs?

Do b trees and b+ trees only store data at their leafs? I am assuming that they use their internal nodes to search the required data. Is that the case or do they store data in every node? ...

Are keys in B-tree nodes duplicated when the node is split?

When a node in a B-tree is split, are keys from the original node duplicated in the new nodes? What's the purpose of doing this? Isn't this inefficient? ...

Maximum number of descendants in a B-tree

If you know the order of a B-tree, how do you figure out the maximum number of descendants from a page? ...

How can I do block-oriented disk I/O with Java? Or similar for a B+ tree

I would like to implement an B+ tree in Java and try to optimize it for disk based I/O. Is there an API for accessing individual disk blocks from Java? or is there an API that can do similar block-oriented access that fits my purpose? I would like to create something like Tokyo Cabinet in 100% Java. Is there anyone that knows what Java...

How many elements can be held in a B-tree of order n?

Is it 2n? Just checking. ...

Difference between B Trees and 2-3-4 Trees

Hi, Could someone please explain to me the difference between B Trees and 2-3-4 Trees? And also how would you find the maximum and minimum height of each? Thanks ...

In B-trees which element gets promoted when the node splits

Let's say there is a B-tree of order 8. This means it can have 8 pointers and 7 elements. Say the letters A through G are stored in this B-tree. So this B-tree is just a single node containing 7 elements. Then you try to insert J into the tree. There's no room, so you have to split the node and create a new root node. Which element...

What will this B-tree look like?

The B-tree is of order 4, meaning that a node can hold 4 pointers, and 3 keys. The following is inserted: A G I Y Since they can't all fit in one node, I know that the node will split. So I know there's going to be a root node with 2 child nodes after these things are inserted, but I don't know exactly what they'll look like. ...

Maximum depth of a B-tree

How do you figure out the maximum depth of a B-tree? Say you had a B-tree of order 1625, meaning each node has 1625 pointers and 1624 elements. What is the maximum depth of the tree if it contains 85,000,000 keys? ...

Are there any B-tree programs or sites that show visually how a B-tree works

I found this website that lets you insert and delete items from a B-tree and shows you visually what the B-tree looks like: java b-tree I'm looking for another website or program similar to this. This site does not allow you to specify a B-tree of order 4 (4 pointers and 3 elements), it only lets you specify B-trees with an even numbe...

Why does this B+ tree have repeated elements?

In this B+ tree 5 appears twice. B+ tree ...

How to implement B+ Tree for file systems ?

I have a text file which contains some info on extents about all the files in the file system, like below C:\Program Files\abcd.txt 12345 100 23456 200 C:\Program Files\bcde.txt 56789 50 26746 300 ... Now i have another binary which tries to find out about extents for all the files. Now currently i am using linear search to find extent ...

B-trees that use redistribution on insertion

If I insert the letters A, G, I, and Y into a B-tree of order 4 (meaning 4 pointers and 3 elements in each node), I get the following B-tree. G / \ A IY Would it look any different if redistribution on insertion were used? How does redistribution on insertion work? ...

What data is actually stored in a B-tree database in CouchDB?

I'm wondering what is actually stored in a CouchDB database B-tree? The CouchDB: The Definitive Guide tells that a database B-tree is used for append-only operations and that a database is stored in a single B-tree (besides per-view B-trees). So I guess the data items that are appended to the database file are revisions of documents, no...

B-Tree Revision

Hi, If we are looking for line intersections (horizontal and vertical lines only) and we have n lines with half of them vertical and no intersections then Sorting the list of line end points on y value will take N log N using mergesort Each insert delete and search of our data structue (assuming its a b-tree) will be < log n so the...

how to perform operations on oracle9i b-tree index??

Hi, i am using oracle9i. i have lot of questions to ask i want to create b-tree index on a table in the database. How can i do that?? are these index same as that of written on wikipedia b-tree page?? i want to perform b-tree operations(like insertion and deletion of entries) on these index b-trees.. can i do that?? please, help m...

B+ tree node sizing

I'm planning on writing a simple key/value store with a file architecture similar to CouchDB, i.e. an append-only b+tree. I've read everything I can find on B+trees and also everything I can find on CouchDB's internals, but I haven't had time to work my way through the source code (being in a very different language makes it a special p...

Any good guides and/or advice for indexing my objects in zodb?

I'm going to be writing a general object class for use with zodb. These objects will add themselves to a btree index once they are persisted to the zodb object graph. I've never really worked with any of this before, but would anyone have any resources and/or advice on doing this? With zodb's power when dealing with object references ...