473,786 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ 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 1322
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.GetChil Rows(
"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******** *********@nwrdn y01.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.mach in AT dot.state.fl.us > wrote in message
news:ur******** ******@TK2MSFTN GP09.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.GetChil Rows(
"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******** *********@nwrdn y01.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
18290
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 category, sometimes more, additionally, categories may also be members of any number of categories. Well -- Thats the vision at least. I'm looking for some pointers, tutorials, white paper, napkins, whatever explaining how this can be done.
2
3528
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 the way down through the subcategories. I was thinking maybe in each category it would have a field which lists all the root categories. I hope this is a good explanation... it's kinda hard to explain I guess. I figure there were probably some...
3
1821
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 product. I all ready have it so I can pick form a list of categories and unlimited sub categories. Now I need it so I can select mutable categories from a list, and the product gets displayed on them all.
0
3258
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 parent_id 3. products in each category or subcategory.
1
1870
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 CategoryId int ParentCategoryId Nullable
1
1169
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 therefore i'm giving the users a option of CheckBoxList control for the categories. The checkboxlist control is Database Databinded with categories. When a user selects couple of checkboxes, i'm storing both the categories seperated with a comma in...
13
3883
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 the modified preorder tree transversal algorithm. What I wanted was on the first page is to display the catogories as follows Books (35) Electronics(23) The number inside the parenthesis being the number of products in that
4
2512
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 cross-posting. I am trying to build a "checklist", where a user can navigate to an ASP page on the intranet which shows a list of "questions" that the user can check off. I am trying to figure out how to do this so that it is scalable, but I am...
1
3891
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
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.