Now, if I am in the grandchild category, and say I need to present a link that contains both the father and the grandfather, what is the most efficient way to do this?
The best way to handle this is
Table shouldBe
Category : Table Name
Columns
ID :Primary key
CategoryID
Description
ParenetID : Foreign Key of Category table's ID column
So if ParentID is null then its main paranet data other wise it contains its any of the parenet id. So in this way you can handle n number of child parent relation ship
Let me know still you have any questions.
My Tech Blogs MCPD Enterprise and Web Application
MCTS Web, Window and Enterprise Application
amitpatel.it
Star
7946 Points
1865 Posts
Re: Designing a three level category item
Apr 18, 2012 07:20 AM|LINK
The best way to handle this is
Table shouldBe
Category : Table Name
Columns
ID :Primary key
CategoryID
Description
ParenetID : Foreign Key of Category table's ID column
So if ParentID is null then its main paranet data other wise it contains its any of the parenet id. So in this way you can handle n number of child parent relation ship
Let me know still you have any questions.
MCPD Enterprise and Web Application
MCTS Web, Window and Enterprise Application