self-referring table?

2001-06-27 Thread Jennifer Knoblock

Hi!

I have an Access table that holds the hierarchy of headings (for a
topical index) for a large law and policy journal, and I'm very,
very confused about how to use it. The columns it has are
parentheadingID, childHeadingID fields, and haschildren (which
somehow relates to the number of levels). When the ParentID and
Child ID are equal that's a top heading. Then you bounce down the
rows to the final heading for that branch by matching the
childheading id of the first row to the parentheading id of
another row, then take that row's childheadingid to find the next
parentheadingid...ad nauseum... until the last childheadingid
doesn't appear as another parentheadingid.

I'm sure this type of table or logic has a name and has been used
before. What is it called? Are there some examples I can see to
better understand how to use this in my CF code?

Thanks!
Jen







~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: self-referring table?

2001-06-26 Thread Jeffry Houser

At 11:48 AM 06/26/2001 -0400, you wrote:
Hi!

I have an Access table that holds the hierarchy of headings (for a
topical index) for a large law and policy journal, and I'm very,
very confused about how to use it. The columns it has are
parentheadingID, childHeadingID fields, and haschildren (which
somehow relates to the number of levels). When the ParentID and
Child ID are equal that's a top heading. Then you bounce down the
rows to the final heading for that branch by matching the
childheading id of the first row to the parentheading id of
another row, then take that row's childheadingid to find the next
parentheadingid...ad nauseum... until the last childheadingid
doesn't appear as another parentheadingid.

   It sounds confusing.  Typically when i use a self-referencing table, I 
have one field (parentID) that references back onto itself.  The top level 
is when ParentID is equal to zero.  Without seeing the code, my guess is 
that the 'childheadingID and 'haschildren' fields are used to make the code 
more efficient, although whether it actually does that or not I can't 
say.  Is haschildren an integer, or a boolean?  I can't even guess what 
childheadingID is used for.

I'm sure this type of table or logic has a name and has been used
before. What is it called? Are there some examples I can see to
better understand how to use this in my CF code?

  I'll email you off-list.


--
Jeffry Houser | mailto:[EMAIL PROTECTED]
AIM: Reboog711  | ICQ: 5246969 | Phone: 860-229-2781
--
Instant ColdFusion 5.0  | ISBN: 0-07-213238-8
Due out June 2001
--
DotComIt, LLC
database driven web data using ColdFusion, Lotus Notes/Domino
--
Far Cry Fly, Alternative Folk Rock
http://www.farcryfly.com | http://www.mp3.com/FarCryFly


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists