Turn two database tables into one?

后端 未结 3 1202
借酒劲吻你
借酒劲吻你 2021-01-27 01:33

I am having a bit of trouble when modelling a relational database to an inventory managament system. For now, it only has 3 simple tables:

  1. Product

    
    
            
3条回答
  •  无人共我
    2021-01-27 02:05

    If the tables really are and always will be identical (and I have my doubts), then name the unified table something more generic, like "InventoryTransaction", and then use negative numbers for one of the transaction types: probably sales, since that would correctly mark your inventory in terms of keeping track of stock on hand.

提交回复
热议问题