Data Modeling: how to "normalize" same items identified to be different?
Say I have as my input inventory of store items coming from different merchants. Further, say that some of these items may be the same between different merchants (e.g. 2 merchants sell Xboxes, but have different fields, ids, etc to describe the item). How do I model a database such that I know that my inventory item 1 is the same as Merchant 1's inventory item 255 is the same as Merchant 2's inventory item 45 is the same as ....?
I want my users to be able to indicate they are interested i开发者_如何学JAVAn my item 1 -- and I need to know how this translate to how the various merchants identify the same product.
You need and item_x_merchant table.
With columns my_id, merchant_id, merchants_item_id.
精彩评论