I’m developing a CRM system using ASP.NET MVC 3(C#.NET) and SQL Server 2008.
The system will have a products table and one of the functionality of the system is to allow users to group products into different packages. This way they can just add a package to a sales order and all products associated with that package will automatically be added to the sales order.
The user should be able to see all products by selecting “Show All Products” or View by Groups.
How to design the database for this particular functionality?
You need three tables for this:
And then use them for building all you need in your application.
If the product can belong to the only group, then there is no needs in
GroupOfProductstable, just an extra column in Products table