Do they have a table for all categories and another for all sub-categories (and another for sub-categories, etc.) or what? How do all levels interact with each other?
I am starting to work on a project that can have such a level of complexity, and from time to time it revolves around this.
I work with Rails, but I also appreciate answers in database schemas, pointers for further reading, etc.
I assume that you are dealing with hierarchical data here.
. . :
CategoryID CategoryName ParentCategoryID ---------------------------------------- 1 Computers NULL 2 Programming 1 3 Games 1 4 Python 2
, . :
CategoryID ItemID Description ---------------------------------------------- 4 1 Book – Programming in Python 3 1 World of Warcraft
, . " ". , (, Python -/Computers/Programming/Python) ( ). , , SQL. , .
( " " ). , " MySQL" , , ( "Adjacency List" "Nested Set" ).
- , " " .
, A, B ( A).
, , , , A, B Cat_ID Sub_ID .
, , , , , Product_Categories product_id category_id. ( ) table, product_subcategories, sub sub, sub sub sub, blah blah blah .. .. ..