scenario - Categories, Subcategories and Products tables.
belong to a corresponding main category
belong to a corresponding subcategory
problem is that not all products do that. Some of them belong directly to a
main category because that category has no subcategories. So if I wish to query
those products I have to use a main category field in the products table.
course I need a subcategory field in the products table also for those products
that do belong to a subcategory.
does not seem like a good normalized schema.
Now if I
use the Adjacency list model the categories and subcategories tables become one
(parentID column) and I only have to use a single CatId in my queries.
Is that a
good technique or is there some other more correct way to do it.
View Complete Post