Solved

How to perform insertion and deletion on table data using BTree algorithm

Posted on 2002-07-01
18
335 Views
Last Modified: 2010-03-31
I require to perform sorting of rows and also insertion  of new rows,Deletion of rows for a huge amount of data(around 10,000 records) using BTree search algorithm in JAVA. I need to sort based on date,time and category id(These are the primary fields present in my records).
So please help me out in solving this problem. As i heard Btree algorithm is best used for Insertions and deletions.

If any one of have the source code for B-tree search algorithm in JAVA please share with me.

It's  very urgent
Thanks in advance....
0
Comment
Question by:makineni_rk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 3
  • +1
18 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 25 total points
ID: 7121719
0
 

Author Comment

by:makineni_rk
ID: 7124257
Hi CEHJ,
I think B-Tree refers to Balanced Tree instead of Binary tree.

0
 
LVL 3

Assisted Solution

by:yasser_helmy
yasser_helmy earned 25 total points
ID: 7126471
hi,
try this link which says much about the btree structure

http://www.public.asu.edu/~peterjn/btree/

i hope this clears things up
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:girionis
ID: 8893623
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to CEHJ

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0
 
LVL 3

Expert Comment

by:yasser_helmy
ID: 8908142
Hi Girionis,
thanx for you help cleaning the questions..
but as you may note.. makineni_rk refused the answer given by CEHJ.. CEHJ gave a very useful link for binzry trees.. but the question was about b-trees which are a completely different data structure.. i wanted to add more comments to this question, but i thought the link i gave explains many aspects of b-trees.. and i waited for more questions from makineni.. i think i can help him.. but he must read and then all experts -not only me- can help..
i hope i made didnt upset anyone.. :)
0
 
LVL 35

Expert Comment

by:girionis
ID: 8908285
 Hello yasser_helmy,

  First of all your link does not work (I am sure it was working when you first posted) so I cannot tell if it was of help or not.

  Second,

> CEHJ gave a very useful link for binzry trees.. but the question was about b-trees which are a completely different data structure..

  Is a balanced-tree not a binary tree? AFAIK a binary tree can either be a balanced-tree or an unbalanced tree. Of course I might be wrong so if you have any more information on that please let me know and I will reconsider my comment.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8908295
Balancing is just a question of splitting up the tree AFAIK. Essentially the structures are the same.
0
 
LVL 3

Expert Comment

by:yasser_helmy
ID: 8908975
Hi all,
i am sorry about the link.. i assure you it was working one year ago..
i have some notes:
1- b-tree does not stand for balanced tree.. as i read in a great book of data structures, the history of the name is not known..
2- a binary tree is a structure in which every node points to a max of 2 other nodes called its right and left children..
3- a binary search tree insures that the left child of a node is less than the node and the right child is greater than the node..
4- binary trees dont have to be balanced.. some binary trees are balanced, like avl trees..
5- b-trees are balanced in the sense that all leaf nodes are in the same level.. the node are classified into internal and external nodes..
0
 
LVL 35

Expert Comment

by:girionis
ID: 8909024
> i am sorry about the link.. i assure you it was working one year ago..

  I am pretty sure it was too :-) That's one bad thing when you go through past questions, several links are no longer valid so the comments cannot be evaluated properly.

  As for the rest, you are right, a binary tree can be balanced but a balanced tree is not always a binary tree.

  Honestly, if I could see the link you posted I would probably have recommended a split since I believe that both links could have provided a valid help. But I can't evaluate it now :-(... Maybe if you search and find it somewhere else and post it here a moderator will consider a split.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8909155
0
 
LVL 35

Expert Comment

by:girionis
ID: 8909295
 Nice work CEHJ :-) I completely forgot for the wayback archive.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8909304
:-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8909410
girionis - i wonder if you'd be kind enough to jog my memory (talking of 'way back')? Is the observation i made at 07/12/2003 02:56AM PDT in http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20676050.html#8907572 correct?
0
 
LVL 35

Expert Comment

by:girionis
ID: 8909633
> Is the observation i made at 07/12/2003 02:56AM PDT in http://www.experts-exchange.com/ Programming/Programming_Languages/Java/Q_20676050.html#8907572 correct?

  Yes it is correct. A few older versions of java compilers didn't automatically compile dependent classes.

  One example was jikes. AFAIK original versions of jikes do not compile dependent classes automatically (you have to use the -depend switch or something like this)  but better take a look at the jikes home page, just to be completely sure.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8909638
Thanks. I was fairly sure some of the Sun compilers didn't as well...?
0
 
LVL 35

Expert Comment

by:girionis
ID: 8909721
 Not 100% sure here but even javac won't compile all files automatically. If you have a Son.java that calls the "Father" class, a Father.java that calls the "GrandFather" class and a GrandFather.java files and there are no class files in existance then if you do: "javac Son.java" then all .java files (Son, Father and GrandFather) will be compiled.

  However if Son.java is changed and GrandFather.java is changed (and there is a Son.class and a  GrandFather.class) but Father.java is *not* changed then by doing: "javac Son.java" will not result in recompilation of GrandFather.java automatically.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8910483
Hmm yes. So my notion of javac *.java might not be quite as unnecessary as some would think perhaps?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question