I want to fetch list of similar items from inventory as a user role for Online shopping app. For instance,I wish to purchase laptop,then I should be able to view laptop items only. How should I achieve this sort of functionality?
You can achieve this with an enumeration of categories or something like a tag system with a string or multiple strings. An Enumeration requires some effort to set up, but it's foolproof. It depends on your use case.