- A MsSQL DB to hold Products / services that will vary significantly, although there won't be many; hence, the N:N attributes for ProductTypes.
- Be able to keep a record of Product changes [Price, attribute additions, etc.]; hopefully facilitated via AttributeHistory Table, or a better proposed method.
- Be able to record an Order of said items for purchase/delivery; OrderItem / ItemAttributes
So DB design certainly isn't my forte, so understanding some basics, this is what I came up with [which is almost a carbon copy of a blog post at: www.codingblocks.net/programming/database-schema-for-multiple-types-of-products/ If you're interested
Are with the following:
- ItemAttributes and the ProductAttributeValues Tables are almost identical - so was wondering if I could/should combine them?
- Will such an AttributeHistory table work, or will it be an eventual nightmare. Straightaway, I see that sometimes values will be INTs and other times CHAR's; so perhaps two columns to suit, or just a CHAR that I have to handle any transposing via code?