I have done my couple of applications in Rails, basically informative, but this time I was asked for an inventory system, I was trying to translate the logic before doing it, and I made a sketch in Excel, taking that idea, I wanted pass it to Rails, only that I find a small problem, in Excel, created 3 sheets, for Inventory, Inputs and Outputs, where the inputs or purchases to suppliers, fed to Inventory, but to prevent data from being created duplicates, manually added the product to Inventory and from purchases, by means of formulas, I only called the product code, and it brought me the data I needed, and only added the quantity, price and supplier, however, I am not sure if it is the correct way to do it, because through this logic, I take the idea that there will be 3 models, one of Inventory, Entries and Exits, the question is: who belongs to whom? thinking more in detail I deduce that inventory itself, are products, therefore, these products belong to an Entry, and outputs, always belong to Entries? I would greatly appreciate helping me to clarify this question of this trio of models, Regards!