Just have one table with all of the pages in which inclues the following
fields:
id - Unique ID for entry
parentid - ID of parent page (this value is 0 for category pages)
That way you have a heirachical data structure within 1 table. Querying the
table becomes a bit trickier but still ont tat complex. The advantage of
this is that you are not restricted to 3 levels should you wish to expand.
where you have
-----Original Message-----
From: Cody [mailto:[EMAIL PROTECTED]]
Sent: 11 June 2001 15:23
To: CF-Talk
Subject: Database Design Help
Hello. I'm trying to build an application but I'm stuck on designing the DB.
I'll try to explain how the site is going to be made, and hopefully someone
can help.
There are only going to be 3 levels of pages. Category pages, sub pages,
and sub-sub pages. I want to be able to call any page, whether it's a
sub-sub, sub, or category page, just by it's id (like pageid=3).
Then, using only the pageid information I want to be able to get all the
other pages in that category... so, for example:
If pageid 3 was a sub-sub page... when someone goes to that page, I want to
be able to list the main category page it's under, the sub pages under that
category, and then the sub-sub pages under the sub page (which the current
page belongs to). Can anyone help me figure out how I should build the DB
to handle this?
I feel like an idiot because it seems like it would be so simple (especially
since I know the pages will always be only 3 levels deep) but I just can't
figure out how to make the DB. Please help!
Cody
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists