I have to create database structure for shopping cart project where i got stuck.
1.) I have one product table that is like
and i have to maintain some properties of this product that is not fixed
like (products T-Shirt have properties colours, size, pattern etc.) these are not fixed bt i have to insert records like
T-shirt XL Red 5bt these properties Size, Colours are not fixed they can more or less so how can i insert them in one table?
asked Aug 10, 2012 at 06:57 AM in Default
Just add the columns to the product table, make them varchar(x) date type. You have a choice of leaving them Null is there is no values, or what I like to do is place NA (for Not Applicable) in the column. The NA value helps with not having to remember to add WHERE Columnname Is Not Null or Is Null to queries.
You can see an example of this in the AdventureWorks database from CodePlex.Thanks, Thomas
answered Oct 17, 2012 at 03:53 PM