I am using modified preorder traversal algorithm to store product categories in database (like image shown above). But i don't understand how to reference it in my products table. Here is my products table
product
id | name | supplier | price | description
--------------------------------------------------------------------------------------
1 | T shirts | Rana Enterprises | 200 | Run faster than light!
2 | Shoes | RS Shirts | 100 | If you're going to San Francisco...
This is my categories table
Tell me how to link my categories table to products table ?
categories
table, like you did forproducts
?