Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Guidance on Binary Search Tree for a Database

807603Dec 16 2007 — edited Dec 16 2007
Hey everybody. Im trying to use a linked binary search tree to create a student database and just need some help figuring out how I should implement it.

The student records (ID, first name, last name, year (sophomore etc.)) are to be stored in an array and will be sorted by student name and student ID. So there will be two BST's, one sorted by name, one sorted by ID. The database should insert, remove, find a student, and list the entire contents of the database.

I already have the BST classes and the nodes. I'm just confused as how to set up the database. I am going to need a Student class, a database class, and a driver? The student class will just define the student record which is the ID, first name, last name, and year. Is that all it needs? And then the driver will call on a database class to call on all my search trees? Is that how it should work? If so, what should my database class look like methods-wise? If not, any advice is greatly appreciated. Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2008
Added on Dec 16 2007
0 comments
560 views