Solved

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

Posted on 2002-07-01
18
300 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
  • 7
  • 6
  • 3
  • +1
18 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 25 total points
Comment Utility
0
 

Author Comment

by:makineni_rk
Comment Utility
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
Comment Utility
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
 
LVL 35

Expert Comment

by:girionis
Comment Utility
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
Comment Utility
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
Comment Utility
 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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 35

Expert Comment

by:girionis
Comment Utility
> 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
Comment Utility
0
 
LVL 35

Expert Comment

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

Expert Comment

by:CEHJ
Comment Utility
:-)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
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
Comment Utility
> 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
Comment Utility
Thanks. I was fairly sure some of the Sun compilers didn't as well...?
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 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
Comment Utility
Hmm yes. So my notion of javac *.java might not be quite as unnecessary as some would think perhaps?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
network + 7 73
Systems talking to each other 5 107
Groovy:unable to resolve class error 2 28
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now