Re: data modeling question

2002-10-31 Thread olinux
I think the best solution would be TABLE ITEMS [ item_id | parent_id | item_name ] data 1, 0, foo 2, 0, bar 3, 2, baz 4, 2, quux 5, 1, fee 6, 1, fi So above baz and quux are subcats of bar and fee/fi are subcats of foo This structure allows for unlimited levels of sub-categories to be added. G

data modeling question

2002-10-31 Thread Wellington Fan
Hello all, I have an 'items' table with 2 'types' of items -- 'foo' & 'bar' Say that items of type 'bar' may be further classified as 'subtypes' 'baz', 'quux', etc. Now I build an online store so that visitors may buy items. Contstraints 1.) I would like to, as much as possible, use the same c