In that case, I would hash the unique ids into a fixed length strength and then concatenate the ancestry into a string string that uniquely represents the node and its relationship to the tree. Then since the string is fixed length, you can find the unique id at any level by finding the string at the index that is the fixed length multiplied by the level you want. You can then take the left of that string and use it with a SQL like operator to return all the children.

-Matt


On Mar 1, 2004, at 8:39 PM, Joe Eugene wrote:



I guess I am missing what you are asking for.

I am looking for the best Performing way that can accomodate
a binary data structure (Either Database Model or a Java Data Structure).


Java TreeMap would work but i am not sure of the efficiency since the Tree
would basically have to hold about 150,000 Unique ID's in the format of
Left/Right
going down probably 1000 levels.


I want to be able to extract any Level Info (e.g Level 20 and Below Info)
from the Binary Tree without coding any kind of Recursive Methods.


Appreciate your help.

Thanks,
Joe Eugene


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Matt Liotta
Sent: Monday, March 01, 2004 8:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] OT: A Good Data Structure for a Large Binary Tree



I guess I am missing what you are asking for. Are you looking for a tree implementation or are you looking for something else?

-Matt


On Mar 1, 2004, at 8:11 PM, Joe Eugene wrote:



Anybody can help brain storm ideas?


Thanks,
Joe Eugene


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Joe Eugene
Sent: Sunday, February 29, 2004 1:44 PM
To: cfczone; CF-Talk
Subject: [CFCDev] OT: A Good Data Structure for a Large Binary Tree



I am trying to solve a Binary Tree data structure problem, i think
this
can be done from a DataBase Perspective with relations but then that
might involve doing something like a matrix to develop the relations
between nodes.

The other thought i have is solve the problem by using some
native(Java/C++)
data Structure (Binary Tree /TreeMap) and store keys of the database
structure
as keys of the Binary Tree... that might relate to a simple select.

Any ideas are much appreciated.

Thanks,
Joe Eugene

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]


---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to