I'm having trouble deciding how I should proceed in designing my database.
What I want is to maintain a Store Front separate from my Inventory. Part of the reason for this is that I want to maintain my inventory in one place, but I will eventually have several stores selling different products form the same list of inventory. I also have several products that refer back to the same type of thing, i.e. the metadata is the same.
Currently, I'm working with the notion of "Products" are in the Store and "Items" represent the inventory. For example, an Album would be an item in my inventory, it has metadata for artist, label, etc. In the Store the abstract item (album) would manifest itself as multiple products CD, LP, Digital Album.
So originally I thought about the following
item
item_id
item_type (album, tshirt, etc)
item_album
item_id
<custom metadata>
item_tshirt
item_id
<custom metadata>
map_item_product
item_id
product_id
product
product_id
product_type (cd, lp, digital_album, digital_track...)
<product details>
Now, this all works fine, until I introduce the concept of an album track, which is logically a child of the Album table and could also be sold as a "digital track" product. Would I make a track an "item" too? It makes me feel funny.
What are your thoughts on such a database design?
How do people typically model a situation where you have an Item but there could be any number of different types each requiring their own custom data?
Any comments would be greatly appreciated!! Thanks for the help.