473,471 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Categories Hierachy

Hello,

I have a list of product categories and each category may or may not have
children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was thinking
of store the ID#'s and category names as well as parent ID's but actually
using an XML file to store the hierachy.
Would be an efficient way of doing this?

Thank you
Nov 15 '05 #1
2 1298
Hi,

You can keep the parent ID as an attribute of the Category node, and filter
the XML for a particular value. I have no idea how efficient this solution
is though.
What I would do is create a DataSet with a Category table, including a
column ParentID , you can create a Foreign key to the same table to the ID
column then you could use some construction like DataRow.GetChilRows(
"Parent_FK" ); which return a DataRow[]

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"A. Elamiri" <ab************@NOSPAMnexnevo.com> wrote in message
news:D2*****************@nwrdny01.gnilink.net...
Hello,

I have a list of product categories and each category may or may not have
children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was thinking of store the ID#'s and category names as well as parent ID's but actually
using an XML file to store the hierachy.
Would be an efficient way of doing this?

Thank you

Nov 15 '05 #2
I will do that, thank you

"Ignacio Machin" <ignacio.machin AT dot.state.fl.us> wrote in message
news:ur**************@TK2MSFTNGP09.phx.gbl...
Hi,

You can keep the parent ID as an attribute of the Category node, and filter the XML for a particular value. I have no idea how efficient this solution
is though.
What I would do is create a DataSet with a Category table, including a
column ParentID , you can create a Foreign key to the same table to the ID column then you could use some construction like DataRow.GetChilRows(
"Parent_FK" ); which return a DataRow[]

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"A. Elamiri" <ab************@NOSPAMnexnevo.com> wrote in message
news:D2*****************@nwrdny01.gnilink.net...
Hello,

I have a list of product categories and each category may or may not have children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was

thinking
of store the ID#'s and category names as well as parent ID's but actually using an XML file to store the hierachy.
Would be an efficient way of doing this?

Thank you


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Brian | last post by:
Greetings, I'm working on a project that involved that has need of a categorization system. Logically speaking, the system will have elements, these elements will belong to at least a single...
2
by: Troy Lynch | last post by:
I'm working on writing a website which I need to have lists of products listed in categories and subcategories, and need to keep track of whats in the tree. Like how many products from the root all...
3
by: Jeremy Ross | last post by:
Hello, I am looking for a tutorial, or some help with a slight problem that I am having. What I need to do is create a bit of code that will allow me to select multiple categories for a...
0
by: Ralph Guzman | last post by:
TASK: I have to generate a report with all categories, subcategories and products in database. PROBLEM: I want to write one query that will return: 1. category 2. subcategory: determined by...
1
by: Neil McGuigan | last post by:
Hi, I want to store product categories in my db and am a little lost as to where to start. They can be hierarchical, such as "Books" > "Cook Books", so my table is like this: int...
1
by: savvy | last post by:
I'm using MS SQL 2000. I developing a shopping cart where on the admin side when we are inserting or updating the products, there is a chance that a single product can fall into two categories...
13
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
1
realayumi
by: realayumi | last post by:
ACCESS 2003 WIN XP Hi, i'm new in access, just a view days, this is my first post. Sorry for my bad English. I have 3 tables. tbl_product
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.