I am making a ecommerce site. In this site I want to categorise the items into three different layers
primary category sub category sub category
>>electronic >>smart phone samsung
cameras tablets nokia
laptop apple
headphone
In the above table, I want to display the sub category after the customer selects the primary one. At the same time the 'samsung' also comes under 'camera'. Like this a parent can have any number of children and one child can have many parents. In the future we may change the primary and secondary.
What is the best solution for this? Which model will adopt our category: tree or nested?