I'm having difficulty implementing a requirement in database modeling, this requirement corresponds to product returns.
This is the scenario where returns and different ways of returning products occur:
- Customer buys only one product and returns it ;
- Customer buys two or more products and returns only one of them ;
- Customer purchases a Kit containing several products and returns the Kit integer ;
- Customer purchases a Kit containing several products and returns some products of this Kit ;
I created an example to illustrate the modeling of the sales module, so that you understand the logic, it follows the image:
The diagram above illustrates how my database is in relation to product sales, but I did not put all the fields if it was not going to contain a lot of information making it difficult to understand, but the logic is this, I also did not put the Sales and Customer , but both are related to the Sales table.
You will need to register the following return information :
- The customer responsible for the return ;
-
The seller to whom the customer returned the product (s) ;
- The corresponding sale ;
-
Return Time and Date ;
Developed products or Kits ;
With the information above how can I model the table (s) corresponding to product returns?